返回提交历史

XFEstudio/MyFirstRespo

设计按钮

91e6d3a
X
xfe18827675401 <xfe18827675401@126.com>
提交于

代码差异

7 个文件 +145 -8
Added XFEToolBox/Resources/Image/grid.png +0 -0
二进制文件已变更,无法进行逐行预览。
Modified XFEToolBox/Resources/Style/MainStyle.xaml +15 -4
@@ -8,28 +8,28 @@
8 8 <EventTrigger RoutedEvent="MouseEnter">
9 9 <BeginStoryboard>
10 10 <Storyboard>
11 <ColorAnimation Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)" To="#b4b4e9" Duration="0:0:0:0.1"/>
11 <ColorAnimation Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)" To="#b4b4e9" Duration="0:0:0.1"/>
12 12 </Storyboard>
13 13 </BeginStoryboard>
14 14 </EventTrigger>
15 15 <EventTrigger RoutedEvent="MouseLeave">
16 16 <BeginStoryboard>
17 17 <Storyboard>
18 <ColorAnimation Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)" To="#9898e7" Duration="0:0:0:0.1"/>
18 <ColorAnimation Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)" To="#9898e7" Duration="0:0:0.1"/>
19 19 </Storyboard>
20 20 </BeginStoryboard>
21 21 </EventTrigger>
22 22 <EventTrigger RoutedEvent="MouseLeftButtonDown">
23 23 <BeginStoryboard>
24 24 <Storyboard>
25 <ColorAnimation Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)" To="#ccccea" Duration="0:0:0:0.1"/>
25 <ColorAnimation Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)" To="#ccccea" Duration="0:0:0.1"/>
26 26 </Storyboard>
27 27 </BeginStoryboard>
28 28 </EventTrigger>
29 29 <EventTrigger RoutedEvent="MouseLeftButtonUp">
30 30 <BeginStoryboard>
31 31 <Storyboard>
32 <ColorAnimation Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)" To="#b4b4e9" Duration="0:0:0:0.1"/>
32 <ColorAnimation Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)" To="#b4b4e9" Duration="0:0:0.1"/>
33 33 </Storyboard>
34 34 </BeginStoryboard>
35 35 </EventTrigger>
@@ -99,4 +99,15 @@
99 99 </EventTrigger>
100 100 </Style.Triggers>
101 101 </Style>
102 <Style x:Key="NavigationButton" TargetType="RadioButton">
103 <Setter Property="Template">
104 <Setter.Value>
105 <ControlTemplate TargetType="RadioButton">
106 <Border CornerRadius="15">
107
108 </Border>
109 </ControlTemplate>
110 </Setter.Value>
111 </Setter>
112 </Style>
102 113 </ResourceDictionary>
Added XFEToolBox/Views/Controls/NavigationButton.cs +12 -0
@@ -0,0 +1,12 @@
1 using System.Windows;
2 using System.Windows.Controls;
3
4 namespace XFEToolBox.Views.Controls;
5
6 public class NavigationButton : RadioButton
7 {
8 static NavigationButton()
9 {
10 DefaultStyleKeyProperty.OverrideMetadata(typeof(NavigationButton), new PropertyMetadata(typeof(NavigationButton)));
11 }
12 }
Added XFEToolBox/Views/Controls/NavigationSideBar.xaml +41 -0
@@ -0,0 +1,41 @@
1 <UserControl x:Class="XFEToolBox.Views.Controls.NavigationSideBar"
2 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4 xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
5 xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
6 xmlns:local="clr-namespace:XFEToolBox.Views.Controls"
7 mc:Ignorable="d"
8 d:DesignHeight="440" d:DesignWidth="720" Background="White">
9 <StackPanel>
10 <Canvas>
11 <Polygon Fill="#9898e7">
12 <Polygon.Points>
13 <Point X="200" Y="0" />
14 <Point X="100" Y="100" />
15 <Point X="200" Y="200" />
16 </Polygon.Points>
17 </Polygon>
18 <Polygon Fill="White">
19 <Polygon.Points>
20 <Point X="0" Y="0" />
21 <Point X="200" Y="0" />
22 <Point X="100" Y="100" />
23 </Polygon.Points>
24 <Polygon.Effect>
25 <DropShadowEffect Color="Black" Direction="0" ShadowDepth="5" BlurRadius="10" />
26 </Polygon.Effect>
27 </Polygon>
28 <Polygon Fill="White">
29 <Polygon.Points>
30 <Point X="0" Y="0" />
31 <Point X="100" Y="100" />
32 <Point X="200" Y="200" />
33 <Point X="0" Y="200" />
34 </Polygon.Points>
35 <Polygon.Effect>
36 <DropShadowEffect Color="Black" Direction="0" ShadowDepth="5" BlurRadius="10" RenderingBias="Quality"/>
37 </Polygon.Effect>
38 </Polygon>
39 </Canvas>
40 </StackPanel>
41 </UserControl>
Added XFEToolBox/Views/Controls/NavigationSideBar.xaml.cs +28 -0
@@ -0,0 +1,28 @@
1 using System;
2 using System.Collections.Generic;
3 using System.Linq;
4 using System.Text;
5 using System.Threading.Tasks;
6 using System.Windows;
7 using System.Windows.Controls;
8 using System.Windows.Data;
9 using System.Windows.Documents;
10 using System.Windows.Input;
11 using System.Windows.Media;
12 using System.Windows.Media.Imaging;
13 using System.Windows.Navigation;
14 using System.Windows.Shapes;
15
16 namespace XFEToolBox.Views.Controls
17 {
18 /// <summary>
19 /// NavigationSideBar.xaml 的交互逻辑
20 /// </summary>
21 public partial class NavigationSideBar : UserControl
22 {
23 public NavigationSideBar()
24 {
25 InitializeComponent();
26 }
27 }
28 }
Modified XFEToolBox/Views/Windows/MainWindow.xaml +47 -1
@@ -39,7 +39,53 @@
39 39 <Span Foreground="#9898e7" FontSize="18" FontWeight="Bold">XFE·工具箱</Span>
40 40 </TextBlock>
41 41 </Border>
42 <Frame Grid.Column="1" Grid.Row="1" NavigationUIVisibility="Hidden" Content="{Binding CurrentPage}"/>
42 <StackPanel Grid.Column="0" Grid.Row="1">
43 <Border HorizontalAlignment="Stretch" Height="40" Background="LightBlue">
44 <Grid>
45 <Grid.ColumnDefinitions>
46 <ColumnDefinition Width="*"/>
47 <ColumnDefinition Width="40"/>
48 </Grid.ColumnDefinitions>
49 <Canvas Grid.Column="1">
50 <Polygon Fill="#9898e7">
51 <Polygon.Points>
52 <Point X="40" Y="0" />
53 <Point X="20" Y="20" />
54 <Point X="40" Y="40" />
55 </Polygon.Points>
56 </Polygon>
57 <Polygon Fill="White">
58 <Polygon.Points>
59 <Point X="0" Y="0" />
60 <Point X="40" Y="0" />
61 <Point X="20" Y="20" />
62 </Polygon.Points>
63 <Polygon.Effect>
64 <DropShadowEffect Color="Black" Direction="0" ShadowDepth="1" BlurRadius="5" />
65 </Polygon.Effect>
66 </Polygon>
67 <Polygon Fill="White">
68 <Polygon.Points>
69 <Point X="0" Y="0" />
70 <Point X="20" Y="20" />
71 <Point X="40" Y="40" />
72 <Point X="0" Y="40" />
73 </Polygon.Points>
74 <Polygon.Effect>
75 <DropShadowEffect Color="Black" Direction="0" ShadowDepth="1" BlurRadius="5" />
76 </Polygon.Effect>
77 </Polygon>
78 </Canvas>
79 <Border Background="White">
80 <Border.Effect>
81 <DropShadowEffect Direction="0" BlurRadius="5" ShadowDepth="0"/>
82 </Border.Effect>
83 </Border>
84
85 </Grid>
86 </Border>
87 </StackPanel>
88 <Frame Margin="10,0,0,0" Grid.Column="1" Grid.Row="1" NavigationUIVisibility="Hidden" Content="{Binding CurrentPage}"/>
43 89 </Grid>
44 90 </Border>
45 91 </Window>
Modified XFEToolBox/XFEToolBox.csproj +2 -3
@@ -10,14 +10,13 @@
10 10
11 11 <ItemGroup>
12 12 <None Remove="Resources\Image\close.png" />
13 <None Remove="Resources\Image\grid.png" />
13 14 <None Remove="Resources\Image\min.png" />
14 15 <None Remove="Resources\Image\tabline.png" />
15 16 </ItemGroup>
16 17
17 18 <ItemGroup>
18 19 <PackageReference Include="CommunityToolkit.Mvvm" Version="8.2.2" />
19 <PackageReference Include="EntityFramework" Version="5.0.0" />
20 <PackageReference Include="EntityFramework.zh-Hans" Version="5.0.0" />
21 20 <PackageReference Include="XFEExtension.NetCore" Version="3.0.0" />
22 21 <PackageReference Include="XFEExtension.NetCore.AutoConfig" Version="1.0.4" />
23 22 <PackageReference Include="XFEExtension.NetCore.AutoPath" Version="1.0.1" />
@@ -26,13 +25,13 @@
26 25
27 26 <ItemGroup>
28 27 <Resource Include="Resources\Image\close.png" />
28 <Resource Include="Resources\Image\grid.png" />
29 29 <Resource Include="Resources\Image\min.png" />
30 30 <Resource Include="Resources\Image\tabline.png" />
31 31 </ItemGroup>
32 32
33 33 <ItemGroup>
34 34 <Folder Include="Model\" />
35 <Folder Include="Views\Controls\" />
36 35 </ItemGroup>
37 36
38 37 <ItemGroup>