Browse Source

3232

样式分支
fyf 2 years ago
parent
commit
b27c0a2b45
3 changed files with 74 additions and 18 deletions
  1. +62
    -2
      BPASmartClient.CustomResource/Themes/MyStyle.xaml
  2. +6
    -6
      BPASmartClient/Control/DataVView.xaml
  3. +6
    -10
      BPASmartClient/MainWindow.xaml

+ 62
- 2
BPASmartClient.CustomResource/Themes/MyStyle.xaml View File

@@ -957,7 +957,67 @@
</Setter>
</Style.Setters>
</Style>

<Style TargetType="Button">
<Style.Setters>
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="Cursor" Value="Hand" />
<Setter Property="Foreground" Value="{DynamicResource foreground}" />
<Setter Property="Width" Value="68" />
<Setter Property="Height" Value="25" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border x:Name="BD" Cursor="Hand">
<StackPanel
HorizontalAlignment="Center"
Orientation="Horizontal">
<!--<Border Width="16" Margin="5">
<Border.Background>
<ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/顶部切图/返回按钮图标.png" />
</Border.Background>
</Border>-->
<TextBlock
x:Name="textBlock"
VerticalAlignment="Center"
FontSize="14"
Foreground="#4fade8"
Text="{TemplateBinding Content}" />
<!-- Text="{TemplateBinding Content}" -->
</StackPanel>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="true">
<Setter TargetName="BD" Property="Background">
<Setter.Value>
<ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/顶部切图/返回按钮2.png" />
</Setter.Value>
</Setter>
<Setter TargetName="textBlock" Property="Foreground" Value="#4fade8" />
</Trigger>
<Trigger Property="IsMouseOver" Value="False">
<Setter TargetName="BD" Property="Background">
<Setter.Value>
<ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/顶部切图/返回按钮1.png" />
</Setter.Value>
</Setter>
<Setter TargetName="textBlock" Property="Foreground" Value="#4fade8" />
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter TargetName="BD" Property="Background">
<Setter.Value>
<ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/buttonOn.png" />
</Setter.Value>
</Setter>
<Setter TargetName="textBlock" Property="Foreground" Value="#3afdff" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style.Setters>
</Style>
<Style x:Key="CommonBtn_返回" TargetType="Button">
<Style.Setters>
<Setter Property="VerticalContentAlignment" Value="Center" />
@@ -1217,7 +1277,7 @@
</Style.Setters>
</Style>

<Style TargetType="Button">
<Style x:Key="Comm8" TargetType="Button">
<Style.Setters>
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="Cursor" Value="Hand" />


+ 6
- 6
BPASmartClient/Control/DataVView.xaml View File

@@ -75,15 +75,15 @@
</StackPanel>

<StackPanel Orientation="Horizontal" Margin="0,10,0,0" >
<Button Margin="80,0,0,0" Tag="Add" Click="Button_Click" Style="{DynamicResource CommonBtn_返回}" Width="45">增加</Button>
<Button Margin="20,0,0,0" Tag="Update" Click="Button_Click" Style="{DynamicResource CommonBtn_返回}" Width="45">修改</Button>
<Button Margin="20,0,0,0" Tag="Delete" Click="Button_Click" Style="{DynamicResource CommonBtn_返回}" Width="45">删除</Button>
<Button Margin="80,0,0,0" Tag="Add" Click="Button_Click" Width="45">增加</Button>
<Button Margin="20,0,0,0" Tag="Update" Click="Button_Click" Width="45">修改</Button>
<Button Margin="20,0,0,0" Tag="Delete" Click="Button_Click" Width="45">删除</Button>

</StackPanel>

<StackPanel Orientation="Horizontal" Margin="0,20,0,0" >
<Button Margin="80,0,0,0" Tag="Save" Click="Button_Click" Style="{DynamicResource CommonBtn_返回}" Width="73">保存text</Button>
<Button Margin="20,0,0,0" Tag="Insert" Click="Button_Click" Style="{DynamicResource CommonBtn_返回}" Width="73" Cursor="Hand">导入text</Button>
<Button Margin="80,0,0,0" Tag="Save" Click="Button_Click" >保存text</Button>
<Button Margin="20,0,0,0" Tag="Insert" Click="Button_Click" >导入text</Button>
</StackPanel>

</StackPanel>
@@ -156,7 +156,7 @@
<StackPanel Orientation="Vertical" HorizontalAlignment="Center" VerticalAlignment="Center">
<TextBlock Width="80" FontSize="16" Margin="0,0,0,5">密码解锁:</TextBlock>
<PasswordBox x:Name="passbox" Width="180" Height="22" ></PasswordBox>
<Button HorizontalAlignment="Right" Margin="0,5,0,0" Tag="OkPass" Click="Button_Click" Style="{DynamicResource CommonBtn_返回}" Width="45" IsDefault="True">确定</Button>
<Button HorizontalAlignment="Right" Margin="0,5,0,0" Tag="OkPass" Click="Button_Click" IsDefault="True">确定</Button>
</StackPanel>
</Grid>
</Grid>


+ 6
- 10
BPASmartClient/MainWindow.xaml View File

@@ -227,9 +227,8 @@
HorizontalAlignment="Left"
VerticalAlignment="Top"
Click="Button_Click"
Content="返回"
Cursor="Hand"
Style="{DynamicResource CommonBtn_返回}" />
Content="测试"
Cursor="Hand" />
<Button
Grid.Row="0"
Width="100"
@@ -238,8 +237,7 @@
VerticalAlignment="Top"
Click="Button_Click_1"
Content="测试消息弹窗"
Cursor="Hand"
Style="{DynamicResource CommonBtn_返回}" />
Cursor="Hand"/>

<Button
Name="save"
@@ -250,20 +248,18 @@
VerticalAlignment="Top"
Click="Button_Click_2"
Content="保存订单数据"
Cursor="Hand"
Style="{DynamicResource CommonBtn_返回}" />
Cursor="Hand" />

<Button
Name="init"
Grid.Row="0"
Width="90"
Width="120"
Margin="350,0,0,0"
HorizontalAlignment="Left"
VerticalAlignment="Top"
Click="init_Click"
Content="初始化设备"
Cursor="Hand"
Style="{DynamicResource CommonBtn_返回}" />
Cursor="Hand"/>

<TextBlock
x:Name="Title"


Loading…
Cancel
Save