Bind to User.Settings

2 posts, 0 answers
  1. Garry
    Garry avatar
    205 posts
    Member since:
    Nov 2010

    Posted 22 Mar 2010 Link to this post

    Hey guys,
    I am trying to use a RadComboBox to bind to a Specialized.StringCollection in my User.Settings. I am able to load the ComboBox from the collection, but the twoway binding does not seem to work. Is this possible with just stright XAML binding or do I need to create a whole class to accomodate this? I have the twoway binding working for my Window properties so I do know that I appear to have my ResourceDictionary configured correctly. Below is what I have so far.

    <telerikInput:RadComboBox x:Name="comboTheme" ItemsSource="{Binding Source={StaticResource settings}, Path=Default.Theme}" 
                            SelectedItem="{Binding Default.Theme, Mode=TwoWay}"/> 

          <setting name="MainWidth" serializeAs="String">  
          <setting name="MainHeight" serializeAs="String">  
          <setting name="MainState" serializeAs="String">  
            <value /> 
          <setting name="Theme" serializeAs="Xml">  
              <ArrayOfString xmlns:xsi="" 

    ResourceDictionary (registered in App.Xaml)
                <settings:Settings x:Key="settings" /> 

  2. Valeri Hristov
    Valeri Hristov avatar
    2252 posts

    Posted 23 Mar 2010 Link to this post

    Hello Garry,

    RadComboBox should work in such scenarios, I guess that there is a problem with the bindings that are applied on the control. For example, looking at your code snippets, I guess that there is something strange - RadComboBox ItemsSource is bound to a property called Default.Theme, which I guess is some kind of collection; the SelectedItem property is also bound to Default.Theme - I suppose you should be binding to something else, if this property is the same as the ItemsSource's source. A simple application that could be used to observe the problem would be of great help, so I would like to kindly ask you to create one and send it to us through a new support ticket.

    Kind regards,
    Valeri Hristov
    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