hi every body
i use these color picker ComboBox:
<ComboBox x:Name="BorderBrushCmbo" FlowDirection="RightToLeft" ItemsSource="{Binding Colors}" SelectedItem="{Binding Color, Mode=TwoWay}" Width="140" Height="24">
<ComboBox.ItemTemplate>
<DataTemplate>
<Canvas Background="{Binding ., Converter={StaticResource StringToBrushConverter}}" Width="100" Height="18">
</Canvas>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>to display colors for users
it work very well but i could not read the value of selected color of ComboBox to display it on the symbol fore drawing graphic on the map
my question is how to read the value of selected color from color picker ComboBox
i try to do these:
lineSymbole.Color = new SolidColorBrush((Color)BorderBrushCmbo.SelectedItem);
then i try also these:
Color c = (Color)Convert.ChangeType(BorderBrushCmbo.SelectedItem.ToString(), typeof(Color),null);
lineSymbole.Color = new SolidColorBrush(c);
but I face a problem that i can not convert system color to solid color brush
any help please????