Hi,
I have several types of editors on a page. I want when the users TAB to a control or click on it, the entire text or number to be selected.
By default the editors would put the cursor at the beginning of the control.
What do I need to do for the editors to select the entire text or number.
Thanks very much in advance.
Dimitar
That is definitely an option. However, I was hoping I can do that through a style so I can apply it to all controls of a certain style regardless of what window they are on.
So far we have not found a way.
Thanks.
Hy.
I used the properties SelectionStart and SelectionLength for XamTextEditor and it's working. Here is the example. Maybe it will help.
Nico
<Window x:Class="WpfApplication1.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Window1" Height="300" Width="300" xmlns:my="clr-namespace:Infragistics.Windows.Editors;assembly=Infragistics3.Wpf.Editors.v7.2">
<Grid>
<my:XamTextEditor Height="21.277" Margin="66,51,79,0" Name="xamComboEditor1" VerticalAlignment="Top" Text="aaaaaaa" />
<my:XamTextEditor Height="21.277" Margin="72,105,79,0" Name="xamComboEditor2" VerticalAlignment="Top" Text="bbbbbbbb" GotFocus="xamComboEditor2_GotFocus"/>
</Window>
{
xamComboEditor2.SelectionStart = 0;
xamComboEditor2.SelectionLength = xamComboEditor2.Text.Length;
}