This project is read-only.

Demo Project

Sep 11, 2008 at 12:57 AM
Nice project...

Any chance you could include a 'click me' demo WPF app?

I tried creating one...  with the following on a simple WPF form.

private void Button_Click(object sender, RoutedEventArgs e)
      System.Windows.Elements.ColorDialog d = new ColorDialog();
      Color chosen = d.CurrentColor;

But got an XamlParseEception -  System.Windows.Markup.XamlParseException occurred
  Message=" Could not load file or assembly 'System.Windows.Elements, Version=1.0.3176.11709, Culture=neutral, PublicKeyToken=d0636bd995a99e6e' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)  Error at object 'System.Windows.Controls.Grid' in markup file 'System.Windows.Elements;component/colordialog.xaml'."

But then maybe I'm doing something wrong here... :-)

Best regards,

Sep 16, 2008 at 5:51 PM
Thank you... Strange that you get such an error. I rebuilt the project just in case and updated the dll-s. It should work fine now.
In case this doesn't happen please let me know =)

By the way, CurrentColor returns the color you launched the ColorDialog with; in your case Colors.Black (default). ColorDialog.Color is what you want. Again sorry for the lack of documentation, I didn't do it right away (the easiest way) so now it would take a while, and time is what I haven't got...