Skip to content

Commit 7080d5b

Browse files
committed
Separated navigation bar from main view
1 parent ab48033 commit 7080d5b

File tree

5 files changed

+76
-58
lines changed

5 files changed

+76
-58
lines changed

CompactGUI/Views/FolderWatcherControl.xaml renamed to CompactGUI/Views/Components/FolderWatcherCard.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<UserControl x:Class="FolderWatcherControl"
1+
<UserControl x:Class="FolderWatcherCard"
22
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
33
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
44
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"

CompactGUI/Views/FolderWatcherControl.xaml.vb renamed to CompactGUI/Views/Components/FolderWatcherCard.xaml.vb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Imports System.Windows.Media.Animation
22

3-
Public Class FolderWatcherControl : Inherits UserControl
3+
Public Class FolderWatcherCard : Inherits UserControl
44
Private currentlyExpandedBorder As Border = Nothing
55

66

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
<UserControl x:Class="NavigationBar"
2+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4+
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
5+
xmlns:local="clr-namespace:CompactGUI"
6+
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
7+
xmlns:ui="http://schemas.modernwpf.com/2019"
8+
Height="40"
9+
VerticalAlignment="Bottom" HorizontalContentAlignment="Center"
10+
d:DataContext="{d:DesignInstance Type=local:MainViewModel}"
11+
d:DesignHeight="40" d:DesignWidth="500" d:Opacity="1" Background="#304257" Opacity="0"
12+
mc:Ignorable="d">
13+
14+
<StackPanel ClipToBounds="True" Orientation="Horizontal">
15+
<StackPanel.Effect>
16+
<DropShadowEffect BlurRadius="9" Direction="90" Opacity="0.4" />
17+
</StackPanel.Effect>
18+
19+
<ui:AppBarButton Width="100"
20+
Margin="0,0,0,0"
21+
Command="{Binding MenuCompressionAreaCommand}"
22+
KeyboardNavigation.TabNavigation="None">
23+
<ui:AppBarButton.Icon>
24+
<ui:FontIcon Foreground="White" Glyph="&#xE92C;" RenderTransformOrigin="0.5,0.5">
25+
<ui:FontIcon.RenderTransform>
26+
<TransformGroup>
27+
<RotateTransform Angle="90" />
28+
</TransformGroup>
29+
</ui:FontIcon.RenderTransform>
30+
</ui:FontIcon>
31+
</ui:AppBarButton.Icon>
32+
</ui:AppBarButton>
33+
34+
35+
<ui:AppBarButton Width="100"
36+
Margin="105,0,0,0"
37+
Command="{Binding MenuWatcherAreaCommand}"
38+
KeyboardNavigation.TabNavigation="None">
39+
<ui:AppBarButton.Icon>
40+
<ui:FontIcon Foreground="White" Glyph="&#xE823;" RenderTransformOrigin="0.5,0.5" />
41+
</ui:AppBarButton.Icon>
42+
</ui:AppBarButton>
43+
44+
45+
</StackPanel>
46+
47+
48+
<UserControl.Triggers>
49+
<EventTrigger RoutedEvent="MouseEnter">
50+
<BeginStoryboard>
51+
<Storyboard>
52+
<DoubleAnimation Storyboard.TargetProperty="Opacity" To="1" Duration="0:0:0.1" />
53+
</Storyboard>
54+
</BeginStoryboard>
55+
</EventTrigger>
56+
<EventTrigger RoutedEvent="MouseLeave">
57+
<BeginStoryboard>
58+
<Storyboard>
59+
<DoubleAnimation Storyboard.TargetProperty="Opacity" To="0" Duration="0:0:0.8" />
60+
</Storyboard>
61+
</BeginStoryboard>
62+
</EventTrigger>
63+
</UserControl.Triggers>
64+
65+
66+
</UserControl>
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Public Class NavigationBar : Inherits UserControl
2+
3+
End Class

CompactGUI/Views/MainWindow.xaml

Lines changed: 5 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1136,63 +1136,12 @@
11361136

11371137

11381138
<!--Folder Watcher Region-->
1139-
<local:FolderWatcherControl x:Name="grid" Visibility="Collapsed" />
1140-
1141-
1142-
<StackPanel Orientation="Horizontal" Panel.ZIndex="2" Background="#304257" VerticalAlignment="Bottom" Height="40" Opacity="0">
1143-
<StackPanel.Effect>
1144-
<DropShadowEffect Direction="90" BlurRadius="9" Opacity="0.4"/>
1145-
</StackPanel.Effect>
1146-
1147-
<ui:AppBarButton Width="100" Command="{Binding MenuCompressionAreaCommand}" Margin="100,0,0,0" KeyboardNavigation.TabNavigation="None">
1148-
<ui:AppBarButton.Icon>
1149-
<ui:FontIcon Glyph="&#xE92C;" Foreground="White" RenderTransformOrigin="0.5,0.5" >
1150-
<ui:FontIcon.RenderTransform>
1151-
<TransformGroup>
1152-
<ScaleTransform/>
1153-
<SkewTransform/>
1154-
<RotateTransform Angle="90"/>
1155-
<TranslateTransform/>
1156-
</TransformGroup>
1157-
</ui:FontIcon.RenderTransform>
1158-
</ui:FontIcon>
1159-
</ui:AppBarButton.Icon>
1160-
</ui:AppBarButton>
1161-
<ui:AppBarButton Width="100"
1162-
Command="{Binding MenuWatcherAreaCommand}"
1163-
Margin="105,0,0,0"
1164-
KeyboardNavigation.TabNavigation="None">
1165-
<ui:AppBarButton.Icon>
1166-
<ui:FontIcon Glyph="&#xE823;"
1167-
Foreground="White"
1168-
RenderTransformOrigin="0.5,0.5">
1169-
1170-
</ui:FontIcon>
1171-
</ui:AppBarButton.Icon>
1172-
</ui:AppBarButton>
1173-
<StackPanel.Triggers>
1174-
<EventTrigger RoutedEvent="MouseEnter">
1175-
<BeginStoryboard>
1176-
<Storyboard>
1177-
<DoubleAnimation Storyboard.TargetProperty="Opacity"
1178-
To="1"
1179-
Duration="0:0:0.1" />
1180-
</Storyboard>
1181-
</BeginStoryboard>
1182-
</EventTrigger>
1183-
<EventTrigger RoutedEvent="MouseLeave">
1184-
<BeginStoryboard>
1185-
<Storyboard>
1186-
<DoubleAnimation Storyboard.TargetProperty="Opacity"
1187-
To="0"
1188-
Duration="0:0:0.8" />
1189-
</Storyboard>
1190-
</BeginStoryboard>
1191-
</EventTrigger>
1192-
</StackPanel.Triggers>
1139+
<local:FolderWatcherCard x:Name="grid" Visibility="Collapsed" />
1140+
1141+
1142+
<!-- Navigation Bar -->
1143+
<local:NavigationBar Panel.ZIndex="20"/>
11931144

1194-
</StackPanel>
1195-
11961145
<!--Version String in Bottom Right-->
11971146
<TextBlock Text="{Binding Version, StringFormat=v {0}}" Foreground="#40FFFFFF" FontFamily="Segoe UI SemiBold" VerticalAlignment="Bottom" FontSize="14" Panel.ZIndex="1" IsHitTestVisible="False" HorizontalAlignment="Right" Margin="0,0,15,10"/>
11981147

0 commit comments

Comments
 (0)