|
|
@@ -35,6 +35,28 @@
|
|
|
</Style>
|
|
|
</prism:Dialog.WindowStyle>
|
|
|
|
|
|
+ <UserControl.Resources>
|
|
|
+ <Style x:Key="TouchButton" TargetType="{x:Type Button}" BasedOn="{StaticResource MaterialDesignFlatMidBgButton}">
|
|
|
+ <Setter Property="IsTabStop" Value="false"/>
|
|
|
+ <Setter Property="Focusable" Value="false"/>
|
|
|
+ <Setter Property="ClickMode" Value="Press"/>
|
|
|
+ <Setter Property="Template">
|
|
|
+ <Setter.Value>
|
|
|
+ <ControlTemplate TargetType="{x:Type Button}">
|
|
|
+ <Border x:Name="Border" CornerRadius="2" BorderThickness="1" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}">
|
|
|
+ <ContentPresenter Margin="2" HorizontalAlignment="Center" VerticalAlignment="Center" RecognizesAccessKey="True"/>
|
|
|
+ </Border>
|
|
|
+ <ControlTemplate.Triggers>
|
|
|
+ <Trigger Property="Button.IsMouseOver" Value="True">
|
|
|
+ <Setter TargetName="Border" Property="Background" Value="Green"></Setter>
|
|
|
+ </Trigger>
|
|
|
+ </ControlTemplate.Triggers>
|
|
|
+ </ControlTemplate>
|
|
|
+ </Setter.Value>
|
|
|
+ </Setter>
|
|
|
+ </Style>
|
|
|
+ </UserControl.Resources>
|
|
|
+
|
|
|
<Grid>
|
|
|
<Grid.ColumnDefinitions>
|
|
|
<ColumnDefinition/>
|
|
|
@@ -325,7 +347,7 @@
|
|
|
|
|
|
<StackPanel Orientation="Horizontal" VerticalAlignment="Bottom" HorizontalAlignment="Center"
|
|
|
Width="Auto" Height="120">
|
|
|
- <Button
|
|
|
+ <Button Style="{StaticResource TouchButton}"
|
|
|
x:Name="M"
|
|
|
Margin="5"
|
|
|
Grid.Row="2"
|
|
|
@@ -333,14 +355,14 @@
|
|
|
HorizontalAlignment="Stretch"
|
|
|
Height="auto"
|
|
|
Width="90" PreviewMouseDown="Button_PreviewMouseDown" PreviewMouseUp="Button_PreviewMouseUp">
|
|
|
- <!--<i:Interaction.Triggers>
|
|
|
- <i:EventTrigger EventName="MouseLeftButtonDown">
|
|
|
+ <i:Interaction.Triggers>
|
|
|
+ <i:EventTrigger EventName="TouchDown">
|
|
|
<i:InvokeCommandAction Command="{Binding JogCommand}" CommandParameter="-"/>
|
|
|
</i:EventTrigger>
|
|
|
- <i:EventTrigger EventName="MouseLeftButtonUp">
|
|
|
+ <i:EventTrigger EventName="TouchUp">
|
|
|
<i:InvokeCommandAction Command="{Binding JogStopCommand}"/>
|
|
|
</i:EventTrigger>
|
|
|
- </i:Interaction.Triggers>-->
|
|
|
+ </i:Interaction.Triggers>
|
|
|
<!--<Button.InputBindings>
|
|
|
<MouseBinding Gesture="MouseLeftButtonUp" Command="{Binding JogStopCommand}" />
|
|
|
<MouseBinding Gesture="MouseLeftButtonDown" Command="{Binding JogCommand}" CommandParameter="-"/>
|