menu fix
This commit is contained in:
@@ -6,6 +6,7 @@ using System.Globalization;
|
|||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
using System.Threading;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using System.Windows.Forms.Integration;
|
using System.Windows.Forms.Integration;
|
||||||
|
|
||||||
@@ -13,7 +14,6 @@ using WpfControls = System.Windows.Controls;
|
|||||||
|
|
||||||
using static mpvnet.Native;
|
using static mpvnet.Native;
|
||||||
using static mpvnet.Global;
|
using static mpvnet.Global;
|
||||||
using System.Threading;
|
|
||||||
|
|
||||||
namespace mpvnet
|
namespace mpvnet
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -38,7 +38,39 @@
|
|||||||
<Setter Property="Cursor" Value="Hand" />
|
<Setter Property="Cursor" Value="Hand" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style TargetType="Button" />
|
<Style TargetType="Button">
|
||||||
|
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
||||||
|
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||||
|
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"/>
|
||||||
|
<Setter Property="Padding" Value="1"/>
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="{x:Type Button}">
|
||||||
|
<Border x:Name="border"
|
||||||
|
BorderBrush="{DynamicResource PrimaryTextBrush}"
|
||||||
|
BorderThickness="0"
|
||||||
|
Background="{DynamicResource RegionBrush}">
|
||||||
|
|
||||||
|
<ContentPresenter HorizontalAlignment="Center"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
TextElement.FontWeight="Normal">
|
||||||
|
</ContentPresenter>
|
||||||
|
</Border>
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="IsMouseOver" Value="True">
|
||||||
|
<Setter Property="Background" TargetName="border" Value="{DynamicResource HighlightBrush}"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsPressed" Value="True">
|
||||||
|
<Setter Property="BorderBrush" TargetName="border" Value="#2C628B"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsEnabled" Value="False">
|
||||||
|
<Setter Property="Opacity" TargetName="border" Value="0.25"/>
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
</Window.Resources>
|
</Window.Resources>
|
||||||
|
|
||||||
<Grid>
|
<Grid>
|
||||||
|
|||||||
@@ -7,8 +7,9 @@
|
|||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
|
|
||||||
Title="Learn Input"
|
Title="Learn Input"
|
||||||
Height="200"
|
Height="150"
|
||||||
Width="400"
|
Width="350"
|
||||||
|
FontSize="16"
|
||||||
WindowStartupLocation="CenterOwner"
|
WindowStartupLocation="CenterOwner"
|
||||||
ResizeMode="NoResize"
|
ResizeMode="NoResize"
|
||||||
Loaded="Window_Loaded"
|
Loaded="Window_Loaded"
|
||||||
@@ -33,12 +34,11 @@
|
|||||||
|
|
||||||
<TextBlock
|
<TextBlock
|
||||||
x:Name="MenuTextBlock"
|
x:Name="MenuTextBlock"
|
||||||
|
Margin="0,10,0,0"
|
||||||
Grid.ColumnSpan="2"
|
Grid.ColumnSpan="2"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
HorizontalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
FontSize="16"
|
/>
|
||||||
>
|
|
||||||
</TextBlock>
|
|
||||||
|
|
||||||
<TextBlock
|
<TextBlock
|
||||||
x:Name="KeyTextBlock"
|
x:Name="KeyTextBlock"
|
||||||
@@ -46,10 +46,9 @@
|
|||||||
Grid.ColumnSpan="2"
|
Grid.ColumnSpan="2"
|
||||||
VerticalAlignment="Top"
|
VerticalAlignment="Top"
|
||||||
HorizontalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
FontSize="16"
|
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<Button x:Name="ConfirmButton" Grid.Row="2" Click="ConfirmButton_Click">Confirm</Button>
|
<Button x:Name="ConfirmButton" Grid.Row="2" Margin="10,0,10,10" Click="ConfirmButton_Click">Confirm</Button>
|
||||||
<Button x:Name="ClearButton" Grid.Row="2" Click="ClearButton_Click" Grid.Column="1">Clear</Button>
|
<Button x:Name="ClearButton" Grid.Row="2" Margin="0,0,10,10" Click="ClearButton_Click" Grid.Column="1">Clear</Button>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Window>
|
</Window>
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
</Border>
|
</Border>
|
||||||
<ControlTemplate.Triggers>
|
<ControlTemplate.Triggers>
|
||||||
<Trigger Property="IsMouseOver" Value="True">
|
<Trigger Property="IsMouseOver" Value="True">
|
||||||
<Setter Property="Background" TargetName="border" Value="{DynamicResource RegionBrush}"/>
|
<Setter Property="Background" TargetName="border" Value="{DynamicResource HighlightBrush}"/>
|
||||||
</Trigger>
|
</Trigger>
|
||||||
<Trigger Property="IsPressed" Value="True">
|
<Trigger Property="IsPressed" Value="True">
|
||||||
<Setter Property="BorderBrush" TargetName="border" Value="#2C628B"/>
|
<Setter Property="BorderBrush" TargetName="border" Value="#2C628B"/>
|
||||||
|
|||||||
@@ -34,7 +34,7 @@
|
|||||||
</Border>
|
</Border>
|
||||||
<ControlTemplate.Triggers>
|
<ControlTemplate.Triggers>
|
||||||
<Trigger Property="IsMouseOver" Value="True">
|
<Trigger Property="IsMouseOver" Value="True">
|
||||||
<Setter Property="Background" TargetName="border" Value="{DynamicResource RegionBrush}"/>
|
<Setter Property="Background" TargetName="border" Value="{DynamicResource HighlightBrush}"/>
|
||||||
</Trigger>
|
</Trigger>
|
||||||
<Trigger Property="IsPressed" Value="True">
|
<Trigger Property="IsPressed" Value="True">
|
||||||
<Setter Property="BorderBrush" TargetName="border" Value="#2C628B"/>
|
<Setter Property="BorderBrush" TargetName="border" Value="#2C628B"/>
|
||||||
|
|||||||
Reference in New Issue
Block a user