在WPF中随机更改datagrid单元格值

时间:2015-07-17 12:04:45

标签: c# wpf xaml animation datagrid

我有一个Datagrid。对于状态列,我有3个固定值(Hello,Hi,GoodMorning) 我想在STATUS列中显示这些值。第一个值淡入淡出然后隐藏然后逐个显示下一个值。我怎么能在WPF C#

中做到这一点
   <DataGrid x:Name="dgUsers"  AutoGenerateColumns="False" Width="480" Height="128" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="10,10,0,0" GridLinesVisibility="None" AlternatingRowBackground="#FF333333" RowBackground="Black" FontSize="8" FontFamily="07x5" CanUserReorderColumns="False" CanUserResizeColumns="False" CanUserSortColumns="False" MinColumnWidth="8" Foreground="White" Background="Black" BorderThickness="0" HeadersVisibility="Column">
            <DataGrid.Resources>
                <Style TargetType="{x:Type DataGridColumnHeader}">
                    <Setter Property="Background" Value="#7B8200" />
                </Style>
            </DataGrid.Resources>

            <DataGrid.Columns >
                <DataGridTextColumn Width="52" Header="CARRIERS" Binding="{Binding CARRIERS}" />
                <DataGridTextColumn Width="34" Header="ID" Binding="{Binding ID}" />
                <DataGridTextColumn Width="116" Header="ROUTE" Binding="{Binding ROUTE}" />
                <DataGridTextColumn Width="116" Header="DESTINATION" Binding="{Binding DESTINATION}" />
                <DataGridTextColumn Width="78" Header="TIME" Binding="{Binding TIME}" />
                <DataGridTextColumn Width="60" Header="STATUS" Binding="{Binding TRK}" />
            </DataGrid.Columns>


        </DataGrid>

0 个答案:

没有答案