Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
45
Focus Style after touch and after click is different
posted

Hello,

I've got the same problem with XamNumericEditor and XamMaskedEditor. I use Infragistics version 16.2.

After mouse click the focused element look like this, how it should look:

But if i run the app on a Touchscreenmonitor and i touch at the control the focused element looked like this:

But i want that the focued style is at both scenes like the fist picture. I don't want the borders and the minimized fontsize.

If i put a  normal Textbox inside there is no border around drawn by the system. How can i handle the problem?

XAML:

       <Custom:XamNumericEditor Name="NumericEditor"
                                             Value="{Binding InputValue, Mode=TwoWay, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}, UpdateSourceTrigger=LostFocus, NotifyOnTargetUpdated=True}"
                                             Format="{Binding InputFormat, Mode=TwoWay, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}"
                                             Mask="{Binding InputMask, Mode=TwoWay, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type UserControl}}}"
                                             VerticalAlignment="Top"                                             
                                             PromptChar=""  
                                             IsEnabled="{Binding ElementName=InputControl, Path=IsEnabled}"
                                             Background="{StaticResource TransparentBrush}"                                             
                                             IsReadOnly="{Binding IsReadonly, ElementName=InputControl}"
                                             LostFocus="NumericEditor_LostFocus">

                        <Custom:XamNumericEditor.Style>
                            <Style TargetType="Custom:XamNumericEditor">
                                <Setter Property="BorderThickness"
                                        Value="0" />
                                <Setter Property="Foreground"
                                        Value="{StaticResource ScheugenpflugBlue}" />
                                <Setter Property="FontSize"
                                        Value="25px" />
                                <Setter Property="HorizontalContentAlignment"
                                        Value="Left" />
                                <Setter Property="VerticalAlignment"
                                        Value="Bottom" />
                                <Setter Property="FontWeight"
                                        Value="Bold" />
                                <Setter Property="SpinButtonDisplayMode"
                                        Value="Never" />
                                <Style.Triggers>
                                    <DataTrigger Binding="{Binding ElementName=InputControl, Path=IsEnabled}"
                                                 Value="False">
                                        <Setter Property="Foreground"
                                                Value="{StaticResource ForegroundDisabledBrush}" />
                                    </DataTrigger>

                                    <DataTrigger Binding="{Binding ElementName=InputControl, Path=IsReadonly}"
                                                 Value="true">
                                        <Setter Property="Foreground"
                                                Value="{StaticResource ForegroundBrush}" />
                                        <Setter Property="IsHitTestVisible"
                                                Value="False" />
                                    </DataTrigger>
                                </Style.Triggers>
                            </Style>
                        </Custom:XamNumericEditor.Style>
                    </Custom:XamNumericEditor>

Serencly,

Andreas