How do you style XamEditors with rounded corners (XamNumericEditor, XamDateTimeEditor, XamCurrencyEditor, etc.)? I have modified some styles in C:\Program Files\Infragistics\NetAdvantage 2009.2\WPF\DefaultStyles\Editors to use rounded corners, but I've seen some strange behavior after it has been supplied. Has anyone done this before? Can someone provide a code sample?
Hello,
Can you please tell us exactly what behavior are you seeing?
Anyway, you can find the modified styles for XamTextEditor and XamNumericEditor with rounded corners. All I did is to add a CornerRadius property to the borders of the editors' templates
Thanks for the reply. It seems that I did not style all of the border on the ZXamEditors.
The example that you provided did not include XamDateTimeEditors. Can you provide an example of this as well?
The XamDateTimeEditor uses the same style as the XamNumericEditor, which uses the XamKasedEditorBaseStyle, which I modified in the attachment, so creating a style for the XamDateTimeEditor and setting the BasedOn property should be sufficient for this:
<Style x:Key="XamDateTimeEditorBaseStyle" TargetType="{x:Type igEditors:XamDateTimeEditor}" BasedOn="{StaticResource XamMaskedEditorBaseStyle}" >
<Setter Property="DropDownButtonStyle" Value="{StaticResource ComboEditor_DropDownButtonStyle}" />
<Setter Property="Template" Value="{StaticResource MaskedEditorWithDropDownRenderTemplate}" />
<Setter Property="EditTemplate" Value="{StaticResource MaskedEditorWithDropDownEditTemplate}" />
</Style>
<Style TargetType="{x:Type igEditors:XamDateTimeEditor}" BasedOn="{StaticResource XamDateTimeEditorBaseStyle}" />
All you need to do is to copy-paste the StaticResources that are referenced in the setters of the style.