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

Cursor style

3 Answers 297 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Kresimir
Top achievements
Rank 1
Kresimir asked on 19 Jun 2017, 07:24 AM

Hi,

I am using RichTextBox in GridView which is read-only so I want to change cursor style to Arrow. I tried to add Cursor="Arrow" but without success.

3 Answers, 1 is accepted

Sort by
0
Boby
Telerik team
answered on 21 Jun 2017, 08:21 AM
Hi Kresimir,

In case you are using RadRichTextBox in Flow layout mode, you can use the following code:
this.radRichTextBox.EnsureActiveEditorPresenter();
((FrameworkElement)this.radRichTextBox.ActiveEditorPresenter).Cursor = Cursors.Arrow;


Regards,
Boby
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
0
Kresimir
Top achievements
Rank 1
answered on 26 Jun 2017, 07:03 AM

Is it possible to apply this when I have RadRichTextBox in a GridView:

 

<telerik:GridViewDataColumn Width="*" Cursor="Arrow"  DataMemberBinding="{Binding Name}"
                           Header="Name"
          IsReadOnly="True"
          IsVisible="{Binding ShowNameHtml,
          Mode=OneWay}"
TextWrapping="Wrap">
<telerik:GridViewDataColumn.CellTemplate>
                  <DataTemplate>
                    <telerik:RadRichTextBox x:Name="radRichTextBox"
                                  Margin="0"                                                                   telerikHtml:HtmlDataProvider.Source="{Binding Name}"                                                                   Background="Transparent"
 BorderThickness="0"                                                         IsContextMenuEnabled="False" 
IsReadOnly="True"   
IsSelectionEnabled="False"
 IsSelectionMiniToolBarEnabled="False"
 IsSpellCheckingEnabled="False"
 MouseLeftButtonUp="radRichTextBox_MouseLeftButtonUp"        Padding="2,6,2,-15" />
                                        </DataTemplate>
                                    </telerik:GridViewDataColumn.CellTemplate>
                                </telerik:GridViewDataColumn>
0
Boby
Telerik team
answered on 28 Jun 2017, 02:08 PM
Hello Kresimir,

This could be achieved using custom columns. You can read more in the Creating a custom column article (simpler scenario, it seems this would be sufficient, as you can set the cursor property in CreateCellElement's overload) and in Create Custom Column Editor.

Regards,
Boby
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Tags
RichTextBox
Asked by
Kresimir
Top achievements
Rank 1
Answers by
Boby
Telerik team
Kresimir
Top achievements
Rank 1
Share this question
or