This question is locked. New answers and comments are not allowed.
Hi, can you please help me with with questions:
1) When double click on empty textbox area (not on the text), the text disappears. There is a feeling that it “scrolls” to the left. If you try to select it by dragging mouse to the left, it appears again.
2) If the binded text is displayed in several lines, it’s impossible to put cursor to the second/third/etc. line. It is positioned correctly on X-axis, but stays at the first line.
3) If the spellcheck dictionary is stored to client’s isolated storage, adding the word to dictionary doesn’t refresh underlines. Only when the form with RadRichTextBox is opened again, the added word is not underlined anymore.
Markup:
<Grid x:Name="LayoutRoot" Background="White"> <Grid.Resources> <documentsXaml:TxtDataProvider x:Key="txtDataProvider" RichTextBox="{Binding ElementName=txtQuestion}" Text="{Binding Text, Mode=TwoWay}" SetupDocument="TxtDataProvider_SetupDocument" /> </Grid.Resources> <Border Width="510" Height="100" BorderThickness="1" BorderBrush="Black"> <telerikDocuments:RadRichTextBox x:Name="txtQuestion" IsSpellCheckingEnabled="True" IsSelectionMiniToolBarEnabled="False" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled" IsEnabled="True" DocumentInheritsDefaultStyleSettings="True" /> </Border> </Grid>Codebehind:
public partial class MainPage : UserControl { public MainPage() { InitializeComponent(); DataContext = new ViewModel(); } private void TxtDataProvider_SetupDocument(object sender, Telerik.Windows.Documents.FormatProviders.SetupDocumentEventArgs e) { e.Document.LayoutMode = DocumentLayoutMode.Flow; e.Document.ParagraphDefaultSpacingAfter = 0; e.Document.PageViewMargin = new SizeF(0, 0); e.Document.SectionDefaultPageMargin = new Padding(6); } }Viewmodel:
public class ViewModel : INotifyPropertyChanged { private string _text; public string Text { get { return _text; } set { _text = value; NotifyPropertyChanged("Text"); } } public ViewModel() { Text = "askljdhglkjashdgkl jasdjgkl hasljk ghjasklhd glhsgkljas gjklash gjklhsdg iuo hsdiguahsd ghskdlghjsdh gkljsd gkljasd gljsdgpasd gklhsdgl hslg ahsdg"; } public event PropertyChangedEventHandler PropertyChanged; protected void NotifyPropertyChanged(string propertyName) { if (PropertyChanged != null) { PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); } } }