Skip to content

Commit 699bcfd

Browse files
committed
add button and adjust color
1 parent df9ddb0 commit 699bcfd

File tree

2 files changed

+65
-4
lines changed

2 files changed

+65
-4
lines changed

Flow.Launcher/WelcomeWindow.xaml

Lines changed: 37 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,17 @@
55
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
66
xmlns:local="clr-namespace:Flow.Launcher"
77
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
8+
xmlns:ui="http://schemas.modernwpf.com/2019"
89
Name="FlowWelcomeWindow"
910
Title="Welcome to Flow Launcher"
1011
Width="550"
1112
Height="650"
12-
Background="{DynamicResource PopuBGColor}"
13+
Background="{DynamicResource Color00B}"
1314
Foreground="{DynamicResource PopupTextColor}"
1415
ResizeMode="NoResize"
1516
WindowStartupLocation="CenterScreen"
1617
mc:Ignorable="d">
18+
<!--#region TitleBar-->
1719
<WindowChrome.WindowChrome>
1820
<WindowChrome CaptionHeight="32" ResizeBorderThickness="{x:Static SystemParameters.WindowResizeBorderThickness}" />
1921
</WindowChrome.WindowChrome>
@@ -70,14 +72,45 @@
7072
</Button>
7173
</Grid>
7274
</StackPanel>
73-
<StackPanel Margin="26,12,26,0" />
75+
<!--#endregion-->
76+
<StackPanel Margin="26,12,26,0">
77+
<ui:Frame
78+
x:Name="ContentFrame"
79+
MinHeight="600"
80+
HorizontalAlignment="Stretch">
81+
<ui:Frame.ContentTransitions>
82+
<ui:TransitionCollection>
83+
<ui:NavigationThemeTransition />
84+
</ui:TransitionCollection>
85+
</ui:Frame.ContentTransitions>
86+
</ui:Frame>
87+
</StackPanel>
7488
</StackPanel>
7589
<Border
7690
Grid.Row="1"
77-
Background="{DynamicResource PopupButtonAreaBGColor}"
91+
Background="{DynamicResource Color00B}"
7892
BorderBrush="{DynamicResource PopupButtonAreaBorderColor}"
7993
BorderThickness="0,1,0,0">
80-
<StackPanel HorizontalAlignment="Center" Orientation="Horizontal" />
94+
<DockPanel>
95+
<Button
96+
Width="50"
97+
Height="50"
98+
Margin="10,5,28,5"
99+
Click="BackwardButton_Click"
100+
Content="&#xe76c;"
101+
DockPanel.Dock="Right"
102+
FontFamily="/Resources/#Segoe Fluent Icons"
103+
FontSize="22" />
104+
<Button
105+
Width="50"
106+
Height="50"
107+
Click="ForwardButton_Click"
108+
Content="&#xe76b;"
109+
DockPanel.Dock="Right"
110+
FontFamily="/Resources/#Segoe Fluent Icons"
111+
FontSize="22" />
112+
<StackPanel />
113+
</DockPanel>
81114
</Border>
82115
</Grid>
83116
</Window>

Flow.Launcher/WelcomeWindow.xaml.cs

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
using System.Windows.Media;
1212
using System.Windows.Media.Imaging;
1313
using System.Windows.Shapes;
14+
using ModernWpf.Media.Animation;
15+
using Page = ModernWpf.Controls.Page;
1416

1517
namespace Flow.Launcher
1618
{
@@ -24,6 +26,32 @@ public WelcomeWindow()
2426
InitializeComponent();
2527
}
2628

29+
private void ForwardButton_Click(object sender, RoutedEventArgs e)
30+
{
31+
/*
32+
var pageToNavigateTo = ContentFrame.BackStackDepth % 2 == 1 ? typeof(SamplePages.SamplePage1) : typeof(SamplePages.SamplePage2);
33+
34+
if (_transitionInfo == null)
35+
{
36+
// Default behavior, no transition set or used.
37+
ContentFrame.Navigate(pageToNavigateTo, null);
38+
}
39+
else
40+
{
41+
// Explicit transition info used.
42+
ContentFrame.Navigate(pageToNavigateTo, null, _transitionInfo);
43+
}
44+
*/
45+
}
46+
47+
private void BackwardButton_Click(object sender, RoutedEventArgs e)
48+
{/*
49+
if (ContentFrame.BackStackDepth > 0)
50+
{
51+
ContentFrame.GoBack();
52+
}
53+
*/
54+
}
2755
private void BtnCancel_OnClick(object sender, RoutedEventArgs e)
2856
{
2957
Close();

0 commit comments

Comments
 (0)