简体   繁体   中英

Working by radrichtextbox telerik in WPF C#

how can get text typed to richtextbox telerik and save to variable in C# and save to sql server

example var text=radrichtextbox.text;

You can check the telerik documentation link on RadRichTextBox https://docs.telerik.com/devtools/wpf/controls/radrichtextbox/import-export/xaml/xamlformatprovider
You can get the content of RadRichTextBox in different ways but I suggest to export the RadRichTextBox content as XAML format because RadRichTextBox only export full content in only XAML format(Header and Footer). In other formats it only provides the body.
So, you can use the code given below.

XamlFormatProvider xamlformatProvider = new XamlFormatProvider();
string dataXAML = xamlformatProvider.Export(radRichTextBox.Document); 

In this code "radRichTextBox" is your control and you can save the dataXAML in sql server.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM