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

Bind to User.Settings

1 Answer 179 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
Garry asked on 22 Mar 2010, 03:18 PM
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" /> 

1 Answer, 1 is accepted

Sort by
Valeri Hristov
Telerik team
answered on 23 Mar 2010, 10:11 AM
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.
Asked by
Top achievements
Rank 1
Answers by
Valeri Hristov
Telerik team
Share this question