Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Silverlight > ColorPicker > Problem with SelectedItem property in RadColorPaletteView control.

Not answered Problem with SelectedItem property in RadColorPaletteView control.

Feed from this thread
  • SivaPrasad Bevara avatar

    Posted on Feb 14, 2011 (permalink)

    Hi,

    I am using "RadColorPaletteView" to display custom colors.

    I need to change the application theme, when we select the color from the "RadColorPaletteView".

    I am using the following code in the SelectionChanged event to get the selected color.
    string strColor = ((RadColorPaletteView)e.OriginalSource).SelectedItem.ToString();

    I am able to get the color when I select the color for the first time. If I try to select another color it is returning the ((RadColorPaletteView)e.OriginalSource).SelectedItem as null.

    How can I get the selected color from the "RadColorPaletteView".

    I tried to use the "(((RadColorPaletteView)e.OriginalSource)).SelectedPaletteViewItem.Color". With this I am getting some missing assembly reference error.

    Please help.

    Regards,
    SivaPrasad.B

    Reply

  • Petar Mladenov Petar Mladenov admin's avatar

    Posted on Feb 15, 2011 (permalink)

    Hello SivaPrasad Bevara,

    This appears to be a bug in the RadColorPalleteView. We logged it in our PITS(ColorPicker: RadColorPaletteView `s SelectionChanged event fires twice) and updated your telerik points accordingly. You will be soon able vote for this issue ( it will be uploaded in the next 24 hours). As a workaround you can do like so:

    privatevoidPalette_SelectionChanged(objectsender, Telerik.Windows.Controls.SelectionChangedEventArgs e) 
            { 
                if(this.palette.SelectedItem != null
                { 
                            string strColor = ((RadColorPaletteView)e.OriginalSource).SelectedItem.ToString();

                }            } 
            }

    Please accept our apologies for the inconvenience caused and feel free to ask if you need further help.

    Kind regards,
    Petar Mladenov
    the Telerik team
    Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Silverlight > ColorPicker > Problem with SelectedItem property in RadColorPaletteView control.
Related resources for "Problem with SelectedItem property in RadColorPaletteView control."

Silverlight ColorPicker Features  |  Documentation  |  Demos  |  Telerik TV  |  Self-Paced Trainer  ]