Quantcast
Channel: wpftoolkit Discussions Rss Feed
Viewing all articles
Browse latest Browse all 2157

New Post: ColorPicker Binding

$
0
0
Im new to wpf and got stuck for hours now with a, what I think, simple Problem.

I
m creating a paint app and want to implement a colorpickertool to pick the color of a pixel of an image.

I hope my Code pieces are enough to see what I`m doing(wrong)

XAML:
<xctk:ColorPicker x:Name="ClrPcker_Background" SelectedColor="{Binding Path=Test}" Margin="0,5,0,3" DisplayColorAndName="True">
cs file:
public Color Test
{
    get;
    set;
}
       
public MainWindow()
{               
    this.InitializeComponent(); 
    Test = Color.FromArgb(255,0,0,255);
}

private void someButton_Click(object sender, RoutedEventArgs e)
{            
     Test = Color.FromArgb(255,255,0,255);            
}
so the init/constructor is working and when I start the app it is showing the Blue Color as selected in the Colorpicker.

But when I click the button( in this example) nothing happens/ not changing the colorpickers selected Color....

What am I supposed to do? Example Code please :)

Thanx

Viewing all articles
Browse latest Browse all 2157

Trending Articles



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