I do as here http://www.sql.ru/forum/929430/wpf-c-peredacha-cveta-iz-metoda-i-ispolzovanie-ego-dlya-fona-animaciya
After starting the program, the color of the Background TreeViewItem does not change.
<TreeView> <TreeView.ItemContainerStyle> <Style TargetType="{x:Type TreeViewItem}"> <Style.Triggers> <Trigger Property="IsSelected" Value="False" > <Setter Property="Background" Value="{Binding collection_node, ConverterParameter=color_text,Converter={StaticResource ConverterColor}}"></Setter> public class ConverterColor : IValueConverter { public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { try { return Brushes.Red; } catch { return null; } } But if you replace it with that, the color changes: <Setter Property="Background" Value="#FF0000"></Setter>
<Trigger Property="IsSelected" Value="False"><Setter Property="Background" Value="Red"/></Trigger>? - VladDConvert. - VladDreturn Brushes.Orange;"{Name = Orange, ARGB = (255, 255, 165, 0)}" - codename0082016