or

<Style x:Key="AlternateRowStyle" TargetType="{x:Type telerikGridView:GridViewRow}"> <Setter Property="Background" Value="Red" /> <Setter Property="BorderBrush" Value="#D4D6D6" /> </Style> <Style TargetType="{x:Type framework:RTPOGridView}"> <Setter Property="AlternateRowStyle" Value="{DynamicResource AlternateRowStyle}"/> <Setter Property="Background" Value="Blue" /> </Style>public class ccNumericTextBox : RadMaskedNumericInput
{
public ccNumericTextBox()
{
}
public override void EndInit()
{
base.EndInit();
}
protected override void OnGotKeyboardFocus(KeyboardFocusChangedEventArgs e)
{
this.SelectAll();
base.OnGotKeyboardFocus(e);
}
}
Here is the XAML:
<cc:ccNumericTextBox x:Name="txtDuration" Padding="2" Mask="#3.1" Height="22" Value="{Binding Path=Hours, Mode=TwoWay}"/>
Here is the Style:
<Style TargetType="{x:Type cc:ccNumericTextBox}">
<Setter Property="Margin" Value="3,3,3,3"/>
</Style>