This is a migrated thread and some comments may be shown as answers.

RadColorSelector Orientation not working

3 Answers 118 Views
ColorPicker
This is a migrated thread and some comments may be shown as answers.
igal a
Top achievements
Rank 1
igal a asked on 19 Nov 2009, 07:56 AM
i tried changing the
MainPaletteOrientation="Vertical"

and also
MainPaletteColumnsCount="1"

but it only works when in design mode, not on runtime

3 Answers, 1 is accepted

Sort by
0
Accepted
Bobi
Telerik team
answered on 20 Nov 2009, 07:11 AM

Hi igal a,
Please find attached a sample project that shows how to change MainPaletteColumnsCount and MainPaletteOrientation properties at runtime.

Note: these two properties MainPaletteColumnsCount and  MainPaletteOrientation  are used only when you want to define some custom palettes using the selector ItemsSource:

            this.selector.MainPaletteColumnsCount = 3;
            this.selector.MainPaletteOrientation = Orientation.Vertical;
            this.selector.MainPaletteItemsSource = this.GetColors();

If you are using the build in palettes (this means that you do not specified any ItemsSource or set the MainPalette property to some of the build in palettes)  then you do not have to apply orientation or columns count.
I hope that this will help you. Please let us know if you have any other questions or you need some more help.

Sincerely yours,

Boryana
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Dean Thrasher
Top achievements
Rank 1
answered on 22 Jul 2010, 05:03 PM
The sample code you provided works correctly if I set the colors for the Main Palette in code behind. If I set the colors through data binding, the columns and orientation properties keep their default values.

I'm using the 2010 Q2 release of the WPF controls.
0
Viktor Tsvetkov
Telerik team
answered on 27 Jul 2010, 05:16 PM
Hi Dean Thrasher,

There is no problem with the MainPaletteItemsSource binding and changing the MainPaletteColumnsCount property. The only problem is with the MainPaletteOrientation property. At the moment if you change the orientation it will not work until you change the number of the columns. This is a bug and it will be fixed with the next release. The workaround for the moment is to change the columns count, change the orientation and then set back the original columns count. Attached is a modified project, review it and if you have further questions do not hesitate to ask.

On a side note, I'd like to inform you that we've just released an online tool that allows you to reduce the size of your Silverlight applications. For more information, please visit http://blogs.telerik.com/blogs/posts/10-06-10/telerik_assembly_minifier.aspx

Sincerely yours,
Viktor Tsvetkov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
ColorPicker
Asked by
igal a
Top achievements
Rank 1
Answers by
Bobi
Telerik team
Dean Thrasher
Top achievements
Rank 1
Viktor Tsvetkov
Telerik team
Share this question
or