RadColorSelector Orientation not working

4 posts, 1 answers
  1. igal a
    igal a avatar
    28 posts
    Member since:
    Oct 2009

    Posted 19 Nov 2009 Link to this post

    i tried changing the

    and also

    but it only works when in design mode, not on runtime
  2. Answer
    Bobi avatar
    513 posts

    Posted 20 Nov 2009 Link to this post

    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,

    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.
  3. Dean Thrasher
    Dean Thrasher avatar
    1 posts
    Member since:
    Apr 2010

    Posted 22 Jul 2010 Link to this post

    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.
  4. Viktor Tsvetkov
    Viktor Tsvetkov avatar
    382 posts

    Posted 27 Jul 2010 Link to this post

    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
Back to Top