Hi,
I need to style up the xamMaskedEditor to be consistent with the styling of textboxes with our app. It must have a BorderThickness="2" with a CornerRadius="5". On IsMouseOver we want to change the color of the border and to a different color when the control IsFocused as well as manipulate change the foreground and background colors when the control is disabled. I've looked at the DefaultStyles it appears that the control consists of 2 parts that I need to be concerned with:Template and the EditTemplate. Do I need to re-define the ControlTemplates for both of these areas or is there a simpler way to do this? Below is some of the xaml that re-defines the TextBox.
Thanks!
Glenn
}">
<!--<myluna:SystemDropShadowChrome Margin="6">-->
="5"
="true"
="Bd"
}"
="PART_ContentHost"/>
>
<!--</myluna:SystemDropShadowChrome>-->
="true">
}" />
<!-- Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/> -->
="False">
<!-- Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" />-->
}}"/>
="True">
="2,2,2,2" />
="White" />
}"/>
<!--<Trigger Property="IsKeyboardFocusWithin" Value="True">
<Setter Property="Background" Value="{DynamicResource FieldFocusBrush}"/>
<Setter Property="Background" TargetName="Bd" Value="White" />
<Setter Property="BorderThickness" TargetName="Bd" Value="2,2,2,2" />
</Trigger>-->
That's what I figured - Thanks Alex
Hello Glenn,
The EditTemplate is shown only when the ValueEditor is in EditMode. If you want TextBoxes and XamMaskEditors to be consistent in look, you have to retemplate the Template property.
If you want them to be consistent at all times (in and out of edit mode) you will have to retemplate the EditTemplate as well.
Alex.