SpectrumColorPicker InitialColor property

WPF Studio, Themes, and Shared Library for WPF Forum

Posted 14 years ago by Vadim Cherkashin - IA&E SB RAS
Avatar
If InitialColor propery are directly set, binding for SelectedColor not working.

<shared:SpectrumColorPicker Margin="0" Width="Auto" Height="100"
    InitialColor="Blue"
    SelectedColor="{Binding Properties[Color1].Value, RelativeSource=
{RelativeSource AncestorType={x:Type propgrid:ICategoryEditorDataAccessor}},
 Mode=TwoWay}" />
If not set, all ok.

Comments (4)

Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Vadim,

If I bind SelectedColor to a Button's Content while setting InitialColor how you do, I don't see any issues.

It looks like you are binding to some sort of PropertyGrid object though. For more complex scenarios like that, please always make a simple sample project that shows the issue and email it to us. Thanks.


Actipro Software Support

Posted 14 years ago by Vadim Cherkashin - IA&E SB RAS
Avatar
You can get yours sample
"ProductSamples\PropertyGridSamples\QuickStart\CategoryEditors"
and change string

InitialColor="{Binding Properties[Color1].Value, RelativeSource={RelativeSource AncestorType={x:Type propgrid:ICategoryEditorDataAccessor}}, Mode=OneTime}"
to
InitialColor="Blue"
after it property "Color1" in left PropertyGrid not correspond right PropertyGrid so "Binding" not working.

If I use SpectrumColorPicker not in PropertyGrid all work good.
Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Vadim,

Thanks for the report. We are still looking into this issue and will get back to you as soon as we've resolved it.


Actipro Software Support

Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Vadim,

We've corrected this issue for the next maintenance release.


Actipro Software Support

The latest build of this product (v24.1.1) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.