<UserControl x:Class="xxxx.yyyy.Views.ContextTool" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:regions="clr-namespace:Microsoft.Practices.Prism.Regions;assembly=Microsoft.Practices.Prism" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" xmlns:vm="clr-namespace:xxxx.yyyy.ViewModels" mc:Ignorable="d" d:DesignHeight="100" d:DesignWidth="1280"> <Grid x:Name="ContextToolRoot" HorizontalAlignment="Stretch"> <telerik:RadToolBarTray IsManipulationEnabled="True"> <telerik:RadToolBar Band="0" BandIndex="0" IsOverflowOpen="True" IsManipulationEnabled="True"> <TextBlock Margin="0,0,9,0" Text="Open:" /> <Button> <Image Source="Images/16/open.png" /> </Button> <telerik:RadMenuItem Header="Item 1" Icon="Images/16/close.png" IsChecked="True"></telerik:RadMenuItem> </telerik:RadToolBar> <telerik:RadToolBar Band="0" BandIndex="1"> <telerik:RadMenuItem Header="Item 1" Icon="Images/16/close.png" IsChecked="True"></telerik:RadMenuItem> <telerik:RadMenuItem Header="Item 2"></telerik:RadMenuItem> <telerik:RadMenuItem Header="Item 3"></telerik:RadMenuItem> </telerik:RadToolBar> <telerik:RadToolBar Band="1" BandIndex="0"> <telerik:RadMenuItem Header="Item 1" Icon="Images/16/close.png" IsChecked="True"></telerik:RadMenuItem> <telerik:RadMenuItem Header="Item 2"></telerik:RadMenuItem> <telerik:RadMenuItem Header="Item 3"></telerik:RadMenuItem> </telerik:RadToolBar> </telerik:RadToolBarTray> </Grid> </UserControl>
I'm replacing a plain textbox control that I had, with a RadMaskedNumericInput control, in a VS 2012 app. This control is to handle a client's social security number. However, in testing it I've found it doesn't exactly do what I want it to do. Here's the XAML:
<
telerik:RadMaskedNumericInput
x:Name
=
"txtSSN"
MinWidth
=
"80"
Text
=
"{Binding SocialSecurityNo, UpdateSourceTrigger=PropertyChanged}"
Mask
=
"###-##-####"
VerticalContentAlignment
=
"Center"
FontSize
=
"15"
Margin
=
"3,0"
BorderBrush
=
"#FFE3E9EF"
InputBehavior
=
"Insert"
/>
With this, when the window first comes up, it looks like this: "___-__-___0". So if the user starts typing in a SSN, the problem becomes apparent. The 0, at the end of the control, starts getting pushed along. For example, suppose the user wanted to enter "123-45-6789" as a SSN. When they start typing what they get is, "___-__-__01". By the time they get to entering all digits from 1 to 9, in order, what they wind up with in the control is this: "012-34-5679". That is not what they want, but I don't know to make it work properly. Most likely I defined some property wrong, or left a property out. So, how do we achieve what we're trying to achieve?
<
telerik:GridViewDataColumn
Header
=
"Device Type"
Width
=
"Auto"
DataMemberBinding
=
"{Binding Path=DeviceTypeDescription}"
UniqueName
=
"DeviceTypeDescription"
/>
<
telerik:RadGridView.GroupDescriptors
>
<
telerik:ColumnGroupDescriptor
Column
=
"{Binding Columns[\DeviceTypeDescription\], ElementName=GridView}"
SortDirection
=
"Ascending"
/>
</
telerik:RadGridView.GroupDescriptors
>