Skip to content

Commit 0b13125

Browse files
committed
created folder for views, fixed startup position, styles for seperate components
1 parent 39c5c0b commit 0b13125

7 files changed

+116
-16
lines changed

Biyori/Biyori.csproj

+16
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,22 @@
6868
<Generator>MSBuild:Compile</Generator>
6969
<SubType>Designer</SubType>
7070
</ApplicationDefinition>
71+
<Compile Include="Components\LeftNavigation\LeftNavigationControl.xaml.cs">
72+
<DependentUpon>LeftNavigationControl.xaml</DependentUpon>
73+
</Compile>
7174
<Compile Include="Lib\WPF\MarginSetter.cs" />
7275
<Compile Include="Lib\WPF\Spacing.cs" />
7376
<Compile Include="Settings\SettingsWindow.xaml.cs">
7477
<DependentUpon>SettingsWindow.xaml</DependentUpon>
7578
</Compile>
79+
<Page Include="Components\LeftNavigation\LeftNavigationControl.styles.xaml">
80+
<SubType>Designer</SubType>
81+
<Generator>MSBuild:Compile</Generator>
82+
</Page>
83+
<Page Include="Components\LeftNavigation\LeftNavigationControl.xaml">
84+
<SubType>Designer</SubType>
85+
<Generator>MSBuild:Compile</Generator>
86+
</Page>
7687
<Page Include="Lib\Languages\en-us.lang.xaml">
7788
<SubType>Designer</SubType>
7889
<Generator>MSBuild:Compile</Generator>
@@ -143,6 +154,11 @@
143154
<ItemGroup>
144155
<Resource Include="FodyWeavers.xml" />
145156
</ItemGroup>
157+
<ItemGroup>
158+
<Folder Include="Frames\AnimeList\" />
159+
<Folder Include="Frames\NowPlaying\" />
160+
<Folder Include="Frames\TorrentList\" />
161+
</ItemGroup>
146162
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
147163
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
148164
<PropertyGroup>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3+
xmlns:local="clr-namespace:Biyori.Components.LeftNavigation">
4+
<SolidColorBrush Color="#efefef" x:Key="LeftNavBackgroundColor" />
5+
<Style TargetType="UserControl">
6+
<Setter Property="Background" Value="{StaticResource LeftNavBackgroundColor}"/>
7+
</Style>
8+
<Style TargetType="ListBox">
9+
<Setter Property="Background" Value="Transparent" />
10+
</Style>
11+
<Style TargetType="ListBoxItem">
12+
<Setter Property="Padding" Value="3px" />
13+
<Setter Property="Cursor" Value="Hand" />
14+
</Style>
15+
</ResourceDictionary>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<UserControl x:Class="Biyori.Components.LeftNavigation.LeftNavigationControl"
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:Biyori.Components.LeftNavigation"
7+
xmlns:lib="clr-namespace:Biyori.Lib.WPF"
8+
mc:Ignorable="d"
9+
d:DesignHeight="450" d:DesignWidth="200">
10+
<UserControl.Resources>
11+
<ResourceDictionary Source="pack://application:,,,/Components/LeftNavigation/LeftNavigationControl.styles.xaml" />
12+
</UserControl.Resources>
13+
<Grid>
14+
<ListBox>
15+
<ListBoxItem Content="Now Playing"/>
16+
<Separator Background="#2f000000" />
17+
<ListBoxItem Content="Anime List"/>
18+
<ListBoxItem Content="History"/>
19+
<ListBoxItem Content="Statistics"/>
20+
<Separator Background="#2f000000"/>
21+
<ListBoxItem Content="Search"/>
22+
<ListBoxItem Content="Seasons"/>
23+
<ListBoxItem Content="Torrents"/>
24+
</ListBox>
25+
</Grid>
26+
</UserControl>
Original file line numberDiff line numberDiff line change
@@ -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 Biyori.Components.LeftNavigation
17+
{
18+
/// <summary>
19+
/// Interaction logic for LeftNavigationControl.xaml
20+
/// </summary>
21+
public partial class LeftNavigationControl : UserControl
22+
{
23+
public LeftNavigationControl()
24+
{
25+
InitializeComponent();
26+
}
27+
}
28+
}

Biyori/MainWindow.dictionary.xaml

+10-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,15 @@
11
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
22
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
33
xmlns:local="clr-namespace:Biyori">
4-
<Style x:Name="menu_seperator" TargetType="StackPanel">
5-
4+
<SolidColorBrush Color="#cccccc" x:Key="NavBorderColor" />
5+
<Style x:Key="leftNav" TargetType="Border">
6+
<Setter Property="BorderThickness" Value="0, 1, 1, 0" />
7+
<Setter Property="BorderBrush" Value="{StaticResource NavBorderColor}" />
8+
<Setter Property="Background" Value="#efefef" />
9+
</Style>
10+
<Style x:Key="statusBarNav" TargetType="Border">
11+
<Setter Property="BorderThickness" Value="0, 1, 0, 0" />
12+
<Setter Property="BorderBrush" Value="{StaticResource NavBorderColor}" />
13+
<Setter Property="Background" Value="#efefef" />
614
</Style>
715
</ResourceDictionary>

Biyori/MainWindow.xaml

+20-14
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
66
xmlns:local="clr-namespace:Biyori"
77
xmlns:wpf="clr-namespace:Biyori.Lib.WPF"
8+
xmlns:leftNav="clr-namespace:Biyori.Components.LeftNavigation"
89
xmlns:adorners="http://gu.se/Adorners"
10+
WindowStartupLocation="CenterScreen"
911
mc:Ignorable="d"
1012
Title="MainWindow" Height="450" MinHeight="450" Width="800" MinWidth="800">
1113
<Window.Resources>
@@ -18,35 +20,39 @@
1820
<ColumnDefinition Width="200px" />
1921
</Grid.ColumnDefinitions>
2022
<Grid.RowDefinitions>
21-
<RowDefinition Height="48px" />
23+
<RowDefinition Height="36px" />
2224
<RowDefinition Height="*" />
2325
<RowDefinition Height="28px" />
2426
</Grid.RowDefinitions>
25-
<Grid Grid.Row="1" Grid.Column="0" Background="#efefef">
26-
<TextBlock>Now Playing, ...</TextBlock>
27-
</Grid>
27+
<Border Style="{StaticResource leftNav}" Grid.Row="1" Grid.Column="0">
28+
<Grid>
29+
<leftNav:LeftNavigationControl />
30+
</Grid>
31+
</Border>
2832
<Grid Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2">
2933
<StackPanel Orientation="Horizontal" HorizontalAlignment="Stretch" wpf:MarginSetter.Margin="4, 0" wpf:MarginSetter.LastItemMargin="4, 0, 0, 0">
30-
<Button HorizontalAlignment="Left" VerticalAlignment="Center" Padding="8">Sync</Button>
34+
<Button HorizontalAlignment="Left" VerticalAlignment="Center" Padding="6">Sync</Button>
3135
<Grid>
3236
<Separator Background="LightGray" Margin="0, 14" Style="{StaticResource {x:Static ToolBar.SeparatorStyleKey}}" VerticalAlignment="Stretch"></Separator>
3337
</Grid>
34-
<Button HorizontalAlignment="Left" VerticalAlignment="Center" Padding="8">Folders</Button>
35-
<Button HorizontalAlignment="Left" VerticalAlignment="Center" Padding="8">Sources</Button>
38+
<Button HorizontalAlignment="Left" VerticalAlignment="Center" Padding="6">Folders</Button>
39+
<Button HorizontalAlignment="Left" VerticalAlignment="Center" Padding="6">Sources</Button>
3640
<Grid>
3741
<Separator Background="LightGray" Margin="0, 14" Style="{StaticResource {x:Static ToolBar.SeparatorStyleKey}}" VerticalAlignment="Stretch"></Separator>
3842
</Grid>
39-
<Button Click="onSettingsClick" HorizontalAlignment="Left" VerticalAlignment="Center" Padding="8">Settings</Button>
43+
<Button Click="onSettingsClick" HorizontalAlignment="Left" VerticalAlignment="Center" Padding="6">Settings</Button>
4044
</StackPanel>
4145
</Grid>
4246
<Grid Grid.Row="1" Grid.Column="1" Grid.ColumnSpan="2">
43-
<ListBox></ListBox>
44-
</Grid>
45-
<Grid Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="3">
46-
<StatusBar>
47-
<StatusBarItem Content="status"/>
48-
</StatusBar>
47+
<Frame></Frame>
4948
</Grid>
49+
<Border Style="{StaticResource statusBarNav}" Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="3">
50+
<Grid>
51+
<StatusBar>
52+
<StatusBarItem Content="status"/>
53+
</StatusBar>
54+
</Grid>
55+
</Border>
5056
<Grid Grid.Row="0" Grid.Column="2">
5157
<TextBox MaxLines="1" Height="24" Margin="8, 0" VerticalAlignment="Center" HorizontalAlignment="Stretch" Padding="4, 0" VerticalContentAlignment="Center" adorners:Watermark.Text="{StaticResource searchPlaceholder}"
5258
adorners:Watermark.TextStyle="{StaticResource TextboxPlaceholderStyle}"

Biyori/Settings/SettingsWindow.xaml

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
xmlns:local="clr-namespace:Biyori.Settings"
77
mc:Ignorable="d"
88
ResizeMode="NoResize"
9+
WindowStartupLocation="CenterOwner"
910
Title="Settings" Height="531" Width="755">
1011
<Window.Resources>
1112
<ResourceDictionary Source="pack://application:,,,/Settings/SettingsWindow.dictionary.xaml" />

0 commit comments

Comments
 (0)