SelectedColor Binding issu

2 posts, 0 answers
  1. Bill
    Bill avatar
    8 posts
    Member since:
    Dec 2012

    Posted 29 Mar 2013 Link to this post

    Hi telerick
         I use MVVM to Binding the SelectedColor Property,but When I change the color, there don't work,the VM's property don't change,How can I do?
    telerik:RadColorPicker SelectedColor="{Binding SuspectColor}" BorderThickness="0" MainPalette="Concourse" HeaderPalette="Solstice" NoColorText="{Resx RadColorPic_NoColorText}"
    StandardPaletteHeaderText="{Resx RadColorPic_StandardPaletteHeaderText}" MainPaletteHeaderText="{Resx RadColorPic_MainPaletteHeaderText}" />

    the VM code
    private string _suspectColor;
           public string SuspectColor
                   if (_projectConfiguration != null)
                       _suspectColor = _projectConfiguration.SuspectColor;
                   return _suspectColor;
                   _suspectColor = value;
                   _project.SavaImageTabConfig("SuspectColor", value.ToString());

  2. Petar Mladenov
    Petar Mladenov avatar
    3131 posts

    Posted 01 Apr 2013 Link to this post

    Hi Bill,

    Please make sure to bind the SelectedColor two-way:
    SelectedColor="{Binding SuspectColor, Mode="TwoWay"}"
    Kind regards,
    Petar Mladenov
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top