This question is locked. New answers and comments are not allowed.
HI,
I have a colorpicker and a text box. Using MVVm pattern, Textbox is binded to a property called "CurrentSelectedColor" in viewmodel.
color picker 's dependecy property "selectedcolor" is also binded to the property "CurrentSelectedColor" in view model .
Now when I select any color from color picker , the selected colors gets into the background property of textbox.
Iam saving this into a stream using IsolatedStorageFile . This way my color settings are save to local xml file.After changing the color, Iam relaoding the saved settings. Once the color settings are reloaded , bindings are gone, the selected color in color picker is not getting updated to texbox.
How can we persists the bindings also between these 2 controls.
Regards,
Jyothsna.
I have a colorpicker and a text box. Using MVVm pattern, Textbox is binded to a property called "CurrentSelectedColor" in viewmodel.
color picker 's dependecy property "selectedcolor" is also binded to the property "CurrentSelectedColor" in view model .
Now when I select any color from color picker , the selected colors gets into the background property of textbox.
Iam saving this into a stream using IsolatedStorageFile . This way my color settings are save to local xml file.After changing the color, Iam relaoding the saved settings. Once the color settings are reloaded , bindings are gone, the selected color in color picker is not getting updated to texbox.
How can we persists the bindings also between these 2 controls.
Regards,
Jyothsna.
5 Answers, 1 is accepted
0
Jyothsna
Top achievements
Rank 1
answered on 16 May 2012, 07:26 AM
Hello Telerik ,
Can you pls clarify the above issue. Iam using RadColorpicker .
Can you pls clarify the above issue. Iam using RadColorpicker .
0
Hello Jyothsna,
Alex Fidanov
the Telerik team
The PersistenceFramework is not persisting the bindings. It only saves and loads the local values of the controls. In your case, the PersistenceFramework would save the Background of the ColorPicker and then restore it. Are you using OneWay bindings? Please note, that with the one-way binding, when the source's local value is updated, the binding deactivates and the target stops updating. If this is the case, try using a two-way binding.
All the best,Alex Fidanov
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
0
Jyothsna
Top achievements
Rank 1
answered on 16 May 2012, 09:19 AM
Thanks Alex for the quick reply.
So what can be the best approach in this scenario so that I can save the color settings.
So what can be the best approach in this scenario so that I can save the color settings.
0
Hi Jyothsna,
I attached a sample solution demonstrating how you can use a Two-Way binding along with the PersistenceFramework to implement your scenario. Please have a look at it and let me know if it works for you.
Greetings,
Tina Stancheva
the Telerik team
I attached a sample solution demonstrating how you can use a Two-Way binding along with the PersistenceFramework to implement your scenario. Please have a look at it and let me know if it works for you.
Greetings,
Tina Stancheva
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
0
Jyothsna
Top achievements
Rank 1
answered on 22 May 2012, 06:25 AM
Thanks Tina,
This is what Iam looking for.
This is what Iam looking for.