Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
- {
- var x = value;
- if (x.ToString().Contains("ночь"))
- {
- return System.Windows.Media.Brushes.LightBlue;
- }
- else if (x.ToString().Contains("день"))
- {
- return System.Windows.Media.Brushes.LightYellow;
- }
- else
- {
- return value;
- }
- }
- <Style TargetType="DataGridCell">
- <Setter Property="Background" Value="{Binding Content.Text,RelativeSource={RelativeSource Self}, Converter={StaticResource IsPivotalEntryToColorConverter}, Mode=OneWay}"/>
- <Setter Property="Foreground" Value="Black"/>
- </Style>
- DataView buf = newDt.DefaultView;
- Schedule_table.ItemsSource = buf;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement