Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

wpf color picker setting forecolor in richtextbox not working

$
0
0

wpf color picker setting forecolor in richtextbox not working

private void ColorPicker_ColorChanged(object sender, RoutedPropertyChangedEventArgs<Color> e)
        {

          // richTextBox1.Foreground = ColorPicker.SelectedColor;


        }

<StackPanel Margin="109,0,207,0"><osc:SmallColorPicker
                x:Name="ColorPicker"
                SelectedColor="Black"
                ColorChanged="ColorPicker_ColorChanged"
                Width="48"
                Margin="4,4,0,4"
                HorizontalAlignment="Left"/><Rectangle Fill="{Binding SelectedBrush, ElementName=ColorPicker}" Stroke="Black" Margin="4" Width="48" Height="20" HorizontalAlignment="Left" ToolTip="Rectangle with binding to the ColorPicker.SelectedBrush property"/><Label Content="{Binding SelectedColor, ElementName=ColorPicker}" Margin="4" ToolTip="Label with binding to the ColorPicker"/></StackPanel>


Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>