我填充Silverlight DataGrid
,如
grdActivities.ItemsSource = items;
XAML
<datagrid:DataGrid x:Name="grdActivities" AutoGenerateColumns="False">
<sdk:DataGrid.RowStyle>
<Style TargetType="sdk:DataGridRow">
<iv:Interaction.Triggers>
<ia:DataTrigger Binding=IsMarkedToDelete" Value="True" >
<ia:ChangePropertyAction PropertyName="Visibility" >
<ia:ChangePropertyAction.Value>
<Visibility>Collapsed</Visibility>
</ia:ChangePropertyAction.Value>
</ia:ChangePropertyAction>
</ia:DataTrigger>
</iv:Interaction.Triggers>
</Style>
</sdk:DataGrid.RowStyle>
<datagrid:DataGrid.Columns>
// Some columns are here
</datagrid:DataGrid.Columns>
</datagrid:DataGrid>
如果相对,Binding
我无法正常工作?
感谢您的帮助!
答案 0 :(得分:1)
您的Binding
必须包含关键字&#34; Binding&#34;。
<ia:DataTrigger Binding="{Binding Path=IsMarkedToDelete}" Value="True">