XamDateTimeEditor does not support masks for years and months only. Also I need edit quarters. Because of that I have to use XamMaskedEditor but it has limitations with spin buttons. I cannot write custom logic to increment or decrement quarter value because
How to make spin buttons work as I require?
Note: I subscribe to commands
<Style TargetType="{x:Type igEditors:XamNumericEditor}">
<EventSetter Handler="x_ExecutingCommand" Event="ExecutingCommand"/>
</Style>
...
void OnExecutingCommand(object sender, Infragistics.Windows.Controls.Events.ExecutingCommandEventArgs e)
{
if (e.Command == MaskedEditorCommands.SpinUp || e.Command == MaskedEditorCommands.SpinDown)
e.Cancel = true;
....
}
Hello,
In order to catch the command in this scenario, you can add a style with an event setter to the Repeat Button and then get the underlying command in the click event of the repeat button
<igEditors:XamMaskedEditor SpinButtonStyle="{StaticResource rbStyle}" ,,,
<Style x:Key="rbStyle" TargetType="{x:Type RepeatButton}"> <EventSetter Event="Click" Handler="rb_Click"/></Style>
void rb_Click(object sender, RoutedEventArgs e){ RepeatButton rb = (RepeatButton)sender; IGRoutedCommand cmd = (IGRoutedCommand)rb.Command; ...}
Sincerely,ValerieDeveloper Support Engineer Infragisticswww.infragistics.com/support