Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>add a converter something like this : </p> <pre><code>namespace System.Converters { //Converter for cell animation public class flashConverter : IValueConverter { public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { string cellvalue = value.ToString(); return cellvalue = ("place the condition here"); } public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) { return false; } } </code></pre> <p>} in your MainWindow.xaml.cs add the namespace </p> <pre><code> xmlns:loc="clr-namespace:YourProjectName.Converters" </code></pre> <p>in your resources add the following :</p> <pre><code> &lt;DataGrid.Resources&gt; &lt;loc:flashConverter x:Key="SomeConverter"&gt;&lt;/loc:flashConverter&gt; &lt;/DataGrid.Resources&gt; </code></pre> <p>In your DatagridTextColumn add the following :</p> <pre><code> &lt;DataGridTextColumn Header="yourDatagridHeader" IsReadOnly="True" Binding="{Binding Path=yourDatagridHeader}"&gt; &lt;DataGridTextColumn.ElementStyle&gt; &lt;!--Style to implement the datagrid cell animation for yourDatagridcell--&gt; &lt;Style TargetType="{x:Type TextBlock}"&gt; &lt;Style.Triggers&gt; &lt;DataTrigger Binding="{Binding yourDatagridHeader}" Value="Give your condition here"&gt; &lt;!-#E6F85050 is the hexadecimal value for RED--&gt; &lt;Setter Property="Background" Value="#E6F85050"/&gt; &lt;/DataTrigger&gt; &lt;DataTrigger Binding="{Binding yourDatagridHeader}" Value="Give your condition here"&gt; &lt;Setter Property="Background" Value="give the hexadecimal value for transparent here "/&gt; &lt;/DataTrigger&gt; &lt;/Style.Triggers&gt; &lt;/Style&gt; &lt;/DataGridTextColumn.ElementStyle&gt; &lt;/DataGridTextColumn&gt; </code></pre> <p>hope this helps !</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload