125 lines
8.8 KiB
XML
125 lines
8.8 KiB
XML
<Window
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:prism="http://prismlibrary.com/"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:hc="https://handyorg.github.io/handycontrol"
|
|
x:Class="Cowain.Bake.Main.Views.PalletIdInputWindow"
|
|
prism:ViewModelLocator.AutoWireViewModel="True"
|
|
mc:Ignorable="d"
|
|
Background="#5f94c3"
|
|
Title="{Binding Title}" Height="170" Width="380">
|
|
<Window.Resources>
|
|
<Style x:Key="ButtonStyle1" TargetType="{x:Type Button}">
|
|
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"/>
|
|
<Setter Property="BorderThickness" Value="1"/>
|
|
<Style.BasedOn>
|
|
<Style TargetType="{x:Type Button}">
|
|
<Setter Property="Background" Value="{DynamicResource RegionBrush}"/>
|
|
<Setter Property="hc:BorderElement.CornerRadius" Value="4"/>
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type Button}">
|
|
<hc:SimplePanel>
|
|
<Border Background="{TemplateBinding Background}" CornerRadius="{Binding (hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}"/>
|
|
<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" CornerRadius="{Binding (hc:BorderElement.CornerRadius), RelativeSource={RelativeSource TemplatedParent}}">
|
|
<StackPanel HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" Orientation="Horizontal" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
|
|
<Path x:Name="PathMain" Data="{TemplateBinding hc:IconElement.Geometry}" Fill="{TemplateBinding Foreground}" Height="{TemplateBinding hc:IconElement.Height}" Stretch="Uniform" SnapsToDevicePixels="True" Width="{TemplateBinding hc:IconElement.Width}"/>
|
|
<ContentPresenter x:Name="ContentPresenterMain" ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" ContentStringFormat="{TemplateBinding ContentStringFormat}" Margin="6,0,0,0" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="Center"/>
|
|
</StackPanel>
|
|
</Border>
|
|
</hc:SimplePanel>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="Content" Value="{x:Null}">
|
|
<Setter Property="Visibility" TargetName="ContentPresenterMain" Value="Collapsed"/>
|
|
</Trigger>
|
|
<Trigger Property="hc:IconElement.Geometry" Value="{x:Null}">
|
|
<Setter Property="Visibility" TargetName="PathMain" Value="Collapsed"/>
|
|
<Setter Property="Margin" TargetName="ContentPresenterMain" Value="0"/>
|
|
</Trigger>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter Property="Background" Value="#5f62c3"></Setter>
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
<Style.BasedOn>
|
|
<Style TargetType="{x:Type ButtonBase}">
|
|
<Setter Property="Height" Value="30"/>
|
|
<Setter Property="BorderBrush" Value="{DynamicResource BorderBrush}"/>
|
|
<Setter Property="Padding" Value="10,6"/>
|
|
<Setter Property="Foreground" Value="{DynamicResource TextIconBrush}"/>
|
|
<Setter Property="BorderThickness" Value="0"/>
|
|
<Setter Property="HorizontalAlignment" Value="Center"/>
|
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
|
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
|
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
|
<Style.BasedOn>
|
|
<Style TargetType="{x:Type Control}">
|
|
<Setter Property="Foreground" Value="{DynamicResource PrimaryTextBrush}"/>
|
|
<Setter Property="FontSize" Value="12"/>
|
|
<Setter Property="FocusVisualStyle">
|
|
<Setter.Value>
|
|
<Style>
|
|
<Setter Property="Control.Template">
|
|
<Setter.Value>
|
|
<ControlTemplate>
|
|
<Rectangle RadiusY="4" RadiusX="4">
|
|
<Rectangle.Style>
|
|
<Style TargetType="{x:Type Rectangle}">
|
|
<Setter Property="Margin" Value="-2"/>
|
|
<Setter Property="Opacity" Value="0.6"/>
|
|
<Setter Property="SnapsToDevicePixels" Value="True"/>
|
|
<Setter Property="Stroke" Value="{DynamicResource SecondaryBorderBrush}"/>
|
|
<Setter Property="StrokeThickness" Value="2"/>
|
|
<Setter Property="StrokeDashArray" Value="1 1"/>
|
|
</Style>
|
|
</Rectangle.Style>
|
|
</Rectangle>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
</Style.BasedOn>
|
|
</Style>
|
|
</Style.BasedOn>
|
|
<Style.Triggers>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter Property="Opacity" Value="0.9"/>
|
|
</Trigger>
|
|
<Trigger Property="IsPressed" Value="True">
|
|
<Setter Property="Opacity" Value="0.6"/>
|
|
</Trigger>
|
|
<Trigger Property="IsEnabled" Value="False">
|
|
<Setter Property="Opacity" Value="0.4"/>
|
|
</Trigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</Style.BasedOn>
|
|
<Style.Triggers>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter Property="Background" Value="{DynamicResource SecondaryRegionBrush}"/>
|
|
</Trigger>
|
|
<Trigger Property="IsPressed" Value="True">
|
|
<Setter Property="Background" Value="{DynamicResource BorderBrush}"/>
|
|
</Trigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</Window.Resources>
|
|
<Grid>
|
|
<StackPanel Orientation="Vertical">
|
|
<DockPanel HorizontalAlignment="Center" Margin="3,20,0,20">
|
|
<Label DockPanel.Dock="Left" Background="#5f94c3" BorderThickness="0" FontSize="15" Content="{Binding MsgContent}" Margin="0,0,0,0"/>
|
|
<Button DockPanel.Dock="Right" Click="Button_Click" Width=" 50" Height="29" Foreground="White" Background="#6e9bc5" Margin="20,0,0,0" Content="确定" Style="{DynamicResource ButtonStyle1}" BorderThickness="0" />
|
|
</DockPanel>
|
|
|
|
<TextBox x:Name="InputBox" Width="300" Height="30" Margin="0,0,0,10"/>
|
|
</StackPanel>
|
|
</Grid>
|
|
</Window>
|