title: How can I bind a custom color to WPF toolkit ColorPicker?
body: <p>I need to bind the SelectedColor property of ColorPicker to a custom color which is not present in available colors. I created a simple test to show my problem. My xaml:</p>
  
  <pre><code>&lt;xctk:ColorPicker SelectedColor="{Binding Path=Test}"&gt;&lt;/xctk:ColorPicker&gt;
  </code></pre>
  
  <p>Code behind (CurrentStyle.PenColor returns an integer value which equals <code>13109765</code>):</p>
  
  <pre><code>  public Color Test
    {
        get;
        set;
    }
  
    public MyClass()
    {
       DataContext = this;
  
       Test = Color.FromArgb((byte)((CurrentStyle.PenColor &gt;&gt; 24) &amp; 0xFF),
                 (byte)((CurrentStyle.PenColor &gt;&gt; 16) &amp; 0xFF),
                 (byte)((CurrentStyle.PenColor &gt;&gt; 8) &amp; 0xFF),
                 (byte)(CurrentStyle.PenColor &amp; 0xFF));
       InitializeComponent();
  
    }
  </code></pre>
  
  <p>And that's how my ColorPicker looks like when the window is loaded:</p>
  
  <p><img src="https://s22.postimg.org/frzh2fgy9/image.png" alt="enter image description here"></p>
  
  <p>Though, when I go to Advanced colors I can see that the color has been recognized and set correctly. Here is a pic:</p>
  
  <p><img src="https://s13.postimg.org/gjv4cmy07/image.png" alt="enter image description here"></p>
  
  <p>Hope for your help. Thanks a lot!</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>I implemented INotifyPropertyChanged, still to no avail. Here's the code:</p>
  
  <pre><code>public Color Test
      {
          get
          {
              return test;
          } 
          set
          {
              if (test != value)
              {
                  test = value;
                  OnPropertyChanged("Test");
              }
         }
      }
  
  
  public event PropertyChangedEventHandler PropertyChanged;
      protected void OnPropertyChanged(string prop)
      {
          if (this.PropertyChanged != null)
              this.PropertyChanged(this, new PropertyChangedEventArgs(prop));
      }
  </code></pre>
  
  <p>Maybe I'm doing smth wrong here.</p>