2012-07-06 37 views

回答

2

例如,您希望一行和一行的工具提示表示类GridRow。

在GridRow旁边添加:

class GridRow 
{ 
    GridRow() //or other constructor 
    { 
    ... 
    RowToolTip = "Tooltip for one row"; 
    } 

    public string RowToolTip {get; set;} 
} 

如果你想更新运行时提示,不要忘记实施和使用INotifyPropertyChanged的为GridRow。

与您的网格中添加下面的代码XAML:

<igDP:XamDataGrid.Resources> 
    <Style TargetType="{x:Type igDP:CellValuePresenter}"> 
    <Setter Property="ToolTip" Value="{Binding DataItem.RowToolTip}" /> 
    </Style> 
</igDP:XamDataGrid.Resources> 

如果您需要在一行小区不同的提示,那么这需要多一点的代码。

相关问题