You guys did a tutorial on the RadRichText custom control for Lightswitch http://www.telerik.com/products/lightswitch-support.aspx
, I was wondering if you could expand on it and show us how to Data-bind a RadRichTextBox with a Xaml Data Provider and use in a LightSwitch app and bind it to a table built in Lightswitch. I have been working on this for many hours and no luck. Thanks for your help...Brian
, I was wondering if you could expand on it and show us how to Data-bind a RadRichTextBox with a Xaml Data Provider and use in a LightSwitch app and bind it to a table built in Lightswitch. I have been working on this for many hours and no luck. Thanks for your help...Brian
5 Answers, 1 is accepted
0
Hi Brian,
In order to get the data binding working in LightSwitch, you have to follow these steps:
Greetings,
Ivailo
the Telerik team
In order to get the data binding working in LightSwitch, you have to follow these steps:
- Create the appropriate fields and queries in your LightSwitch project, just as you would if you weren't using a custom control.
- Open RichTextControl.xaml as in the demo and add this right above the RadRichTextBox instance:
-
<
telerikXaml:XamlDataProvider
RichTextBox
=
"{Binding ElementName=radRichTextBox1}"
Xaml
=
"{Binding Screen.MyXamlProperty}"
/>
Greetings,
Ivailo
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>
0
Brian
Top achievements
Rank 1
answered on 01 Aug 2011, 04:54 PM
Ivailo, I tried to enter the code you suggested:
<telerikXaml:XamlDataProviderRichTextBox="{Binding ElementName=radRichTextBox1}" Xaml="{Binding Screen.MyXamlProperty}" /> I get an error: Error 5 The type 'telerikXaml:XamlDataProviderRichTextBox' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. I tried entering a RadRichTextBox with the Wizard and selected Text Box or Rich Text Box option on the first screen and this is the code it came up with:<telerik:RadRichTextBox.Resources> <my:XamlDataProvider x:Key="provider" RichTextBox="{Binding ElementName=radRichTextBox1}" /> </telerik:RadRichTextBox.Resources>
Any suggestions on how to get you code working in the example you guys created...Thanks
0
Hi Brian,
There is a small mistake in your XAML code. Actually, there is a space between XamlDataProvider and RichTextBox, as I have posted the code and if you change that, it should compile OK.
Regards,
Ivailo
the Telerik team
There is a small mistake in your XAML code. Actually, there is a space between XamlDataProvider and RichTextBox, as I have posted the code and if you change that, it should compile OK.
Regards,
Ivailo
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>
0
Paul
Top achievements
Rank 1
answered on 29 Aug 2011, 04:29 PM
Hi Brian,
Here is a link to an article where I show how to bind the RadRichTextBox control to a table...
http://www.paulspatterson.com/technology/dot-net-development/microsoft-lightswitch-telerik-radrichtextbox-document-database/
Enjoy,
Paul
PaulSPatterson.com
Here is a link to an article where I show how to bind the RadRichTextBox control to a table...
http://www.paulspatterson.com/technology/dot-net-development/microsoft-lightswitch-telerik-radrichtextbox-document-database/
Enjoy,
Paul
PaulSPatterson.com
0
Hello Paul,
Iva
the Telerik team
Your blog post is really appealing! Thank you for the community effort. I am sure that people can greatly benefit from the walk through you have made about the use of RadRichTextBox in LightSwitch.
Kind regards,Iva
the Telerik team
Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>