Przeglądaj źródła

增加返回按钮 样式

样式分支
fyf 2 lat temu
rodzic
commit
32e5051720
7 zmienionych plików z 75 dodań i 2 usunięć
  1. +8
    -0
      BPASmartClient.CustomResource/BPASmartClient.CustomResource.csproj
  2. BIN
     
  3. BIN
     
  4. BIN
     
  5. BIN
     
  6. +63
    -0
      BPASmartClient.CustomResource/Themes/MyStyle.xaml
  7. +4
    -2
      BPASmartClient/MainWindow.xaml

+ 8
- 0
BPASmartClient.CustomResource/BPASmartClient.CustomResource.csproj Wyświetl plik

@@ -136,6 +136,10 @@
<None Remove="Image\顶部切图\Button_Select.png" />
<None Remove="Image\顶部切图\Top_L.png" />
<None Remove="Image\顶部切图\窗体背景.png" />
<None Remove="Image\顶部切图\窗体背景2.png" />
<None Remove="Image\顶部切图\返回按钮1.png" />
<None Remove="Image\顶部切图\返回按钮2.png" />
<None Remove="Image\顶部切图\返回按钮图标.png" />
<None Remove="Image\顶部切图\顶部矩形.png" />
<None Remove="Image\顶部切图\黑菠萝智慧餐饮管理系统.png" />
<None Remove="Image\顶部矩形.png" />
@@ -151,6 +155,10 @@
<Resource Include="Image\顶部切图\Button_Select.png" />
<Resource Include="Image\顶部切图\Top_L.png" />
<Resource Include="Image\顶部切图\窗体背景.png" />
<Resource Include="Image\顶部切图\窗体背景2.png" />
<Resource Include="Image\顶部切图\返回按钮1.png" />
<Resource Include="Image\顶部切图\返回按钮2.png" />
<Resource Include="Image\顶部切图\返回按钮图标.png" />
<Resource Include="Image\顶部切图\顶部矩形.png" />
<Resource Include="Image\顶部切图\黑菠萝智慧餐饮管理系统.png" />
</ItemGroup>






+ 63
- 0
BPASmartClient.CustomResource/Themes/MyStyle.xaml Wyświetl plik

@@ -436,6 +436,16 @@
</Style.Setters>
</Style>

<Style x:Key="border界面背景" TargetType="Border">
<Style.Setters>
<Setter Property="Background">
<Setter.Value>
<ImageBrush ImageSource="/BPASmartClient.CustomResource;component/Image/顶部切图/窗体背景2.png"/>
</Setter.Value>
</Setter>
</Style.Setters>
</Style>

<Style x:Key="border顶部标题背景" TargetType="Border">
<Style.Setters>
<Setter Property="Background">
@@ -747,6 +757,59 @@
</Setter>
</Style.Setters>
</Style>
<Style x:Key="CommonBtn_返回" TargetType="Button">
<Style.Setters>
<Setter Property="VerticalContentAlignment" Value="Center"></Setter>
<Setter Property="Cursor" Value="Hand"></Setter>
<Setter Property="Foreground" Value="{DynamicResource foreground}"></Setter>
<Setter Property="Width" Value="68"></Setter>
<Setter Property="Height" Value="25"></Setter>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border x:Name="BD" Cursor="Hand">
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="5,0,10,0">
<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" Text="{TemplateBinding Content}" Foreground="#4fade8" />
<!--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 TargetType="Button">
<Style.Setters>


+ 4
- 2
BPASmartClient/MainWindow.xaml Wyświetl plik

@@ -67,7 +67,7 @@
<Separator/>
<MenuItem Header="系统设置" FontSize="12" Command="{Binding NavChangedCommand}" CommandParameter="SystemParameterControl" />
<Separator/>
<MenuItem Header="退出程序" FontSize="12" Visibility="Collapsed" Command="{Binding NavChangedCommand}" CommandParameter="RealTimevideoControl"/>
<MenuItem Header="退出程序" FontSize="12" Command="{Binding NavChangedCommand}" CommandParameter="RealTimevideoControl"/>
</MenuItem>
<MenuItem Header="系统帮助">
<MenuItem Header="版本更新历史" FontSize="12" Command="{Binding NavChangedCommand}" CommandParameter="OnOffControl"/>
@@ -108,7 +108,9 @@

<!--底部窗体-->
<Grid Grid.Row="1" Margin="10">
<Button Grid.Row="2" Content="测试" HorizontalAlignment="Left" Margin="153,123,0,0" VerticalAlignment="Top" Click="Button_Click"/>
<Button Grid.Row="2" Content="返回" Style="{DynamicResource CommonBtn_返回}" HorizontalAlignment="Left" VerticalAlignment="Top" Click="Button_Click"/>

<Button Grid.Row="2" Visibility="Collapsed" Content="测试" HorizontalAlignment="Left" Margin="153,123,0,0" VerticalAlignment="Top" Click="Button_Click"/>
</Grid>




Ładowanie…
Anuluj
Zapisz