Add project files.
This commit is contained in:
105
Views/Pages/DashboardPage.xaml
Normal file
105
Views/Pages/DashboardPage.xaml
Normal file
@@ -0,0 +1,105 @@
|
||||
<Page
|
||||
x:Class="DownloadManager.Views.Pages.DashboardPage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:DownloadManager.Views.Pages"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
|
||||
Title="DashboardPage"
|
||||
d:DataContext="{d:DesignInstance local:DashboardPage,
|
||||
IsDesignTimeCreatable=False}"
|
||||
d:DesignHeight="450"
|
||||
d:DesignWidth="800"
|
||||
ui:Design.Background="{DynamicResource ApplicationBackgroundBrush}"
|
||||
ui:Design.Foreground="{DynamicResource TextFillColorPrimaryBrush}"
|
||||
Foreground="{DynamicResource TextFillColorPrimaryBrush}"
|
||||
mc:Ignorable="d">
|
||||
|
||||
<Grid>
|
||||
<ItemsControl>
|
||||
<ItemsControl.ItemsPanel>
|
||||
<ItemsPanelTemplate>
|
||||
<StackPanel/>
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Border Height="60" CornerRadius="5">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="60"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="75"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Grid Grid.Column="0">
|
||||
<ui:SymbolIcon Symbol="Document24" FontSize="40"/>
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Column="1" Margin="0,0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="10"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Grid Grid.Row="0" Margin="2, 0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="50"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Grid Grid.Column="0">
|
||||
<TextBlock Text="File Name" FontWeight="SemiBold" VerticalAlignment="Center"/>
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Column="1">
|
||||
<TextBlock Text="Progress" FontSize="11" HorizontalAlignment="Right" VerticalAlignment="Center"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Row="1">
|
||||
<ProgressBar Height="7"/>
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Row="2" Margin="2, 0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="75"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Grid Grid.Column="0">
|
||||
<TextBlock Text="Speed" FontSize="10" Opacity="0.75"/>
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Column="1">
|
||||
<TextBlock Text="File Size" FontSize="10" Opacity="0.75"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Column="2" Margin="5,0,0,0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Grid Grid.Column="0">
|
||||
<ui:Button Height="20" Margin="2" Appearance="Transparent" BorderThickness="0" HorizontalAlignment="Stretch"/>
|
||||
<ui:SymbolIcon Symbol="Pause20" FontSize="15"/>
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Column="1">
|
||||
<ui:Button Height="20" Margin="2" Appearance="Transparent" BorderThickness="0" HorizontalAlignment="Stretch"/>
|
||||
<ui:SymbolIcon Symbol="Dismiss20" FontSize="15"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</Grid>
|
||||
</Page>
|
||||
24
Views/Pages/DashboardPage.xaml.cs
Normal file
24
Views/Pages/DashboardPage.xaml.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
// This Source Code Form is subject to the terms of the MIT License.
|
||||
// If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT.
|
||||
// Copyright (C) Leszek Pomianowski and WPF UI Contributors.
|
||||
// All Rights Reserved.
|
||||
|
||||
using DownloadManager.ViewModels.Pages;
|
||||
using Wpf.Ui.Controls;
|
||||
|
||||
namespace DownloadManager.Views.Pages;
|
||||
public partial class DashboardPage : INavigableView<DashboardViewModel>
|
||||
{
|
||||
public DashboardViewModel ViewModel
|
||||
{
|
||||
get;
|
||||
}
|
||||
|
||||
public DashboardPage(DashboardViewModel viewModel)
|
||||
{
|
||||
ViewModel = viewModel;
|
||||
DataContext = this;
|
||||
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
43
Views/Pages/DataPage.xaml
Normal file
43
Views/Pages/DataPage.xaml
Normal file
@@ -0,0 +1,43 @@
|
||||
<Page
|
||||
x:Class="DownloadManager.Views.Pages.DataPage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:local="clr-namespace:DownloadManager.Views.Pages"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:models="clr-namespace:DownloadManager.Models"
|
||||
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
|
||||
Title="DataPage"
|
||||
d:DataContext="{d:DesignInstance local:DataPage,
|
||||
IsDesignTimeCreatable=False}"
|
||||
d:DesignHeight="450"
|
||||
d:DesignWidth="800"
|
||||
ui:Design.Background="{DynamicResource ApplicationBackgroundBrush}"
|
||||
ui:Design.Foreground="{DynamicResource TextFillColorPrimaryBrush}"
|
||||
Foreground="{DynamicResource TextFillColorPrimaryBrush}"
|
||||
ScrollViewer.CanContentScroll="False"
|
||||
mc:Ignorable="d">
|
||||
|
||||
<Grid>
|
||||
<ui:VirtualizingItemsControl
|
||||
Foreground="{DynamicResource TextFillColorSecondaryBrush}"
|
||||
ItemsSource="{Binding ViewModel.Colors, Mode=OneWay}"
|
||||
VirtualizingPanel.CacheLengthUnit="Item">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate DataType="{x:Type models:DataColor}">
|
||||
<ui:Button
|
||||
Width="80"
|
||||
Height="80"
|
||||
Margin="2"
|
||||
Padding="0"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch"
|
||||
Appearance="Secondary"
|
||||
Background="{Binding Color, Mode=OneWay}"
|
||||
FontSize="25"
|
||||
Icon="Fluent24" />
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ui:VirtualizingItemsControl>
|
||||
</Grid>
|
||||
</Page>
|
||||
24
Views/Pages/DataPage.xaml.cs
Normal file
24
Views/Pages/DataPage.xaml.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
// This Source Code Form is subject to the terms of the MIT License.
|
||||
// If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT.
|
||||
// Copyright (C) Leszek Pomianowski and WPF UI Contributors.
|
||||
// All Rights Reserved.
|
||||
|
||||
using DownloadManager.ViewModels.Pages;
|
||||
using Wpf.Ui.Controls;
|
||||
|
||||
namespace DownloadManager.Views.Pages;
|
||||
public partial class DataPage : INavigableView<DataViewModel>
|
||||
{
|
||||
public DataViewModel ViewModel
|
||||
{
|
||||
get;
|
||||
}
|
||||
|
||||
public DataPage(DataViewModel viewModel)
|
||||
{
|
||||
ViewModel = viewModel;
|
||||
DataContext = this;
|
||||
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
51
Views/Pages/SettingsPage.xaml
Normal file
51
Views/Pages/SettingsPage.xaml
Normal file
@@ -0,0 +1,51 @@
|
||||
<Page
|
||||
x:Class="DownloadManager.Views.Pages.SettingsPage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:helpers="clr-namespace:DownloadManager.Helpers"
|
||||
xmlns:local="clr-namespace:DownloadManager.Views.Pages"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:ui="http://schemas.lepo.co/wpfui/2022/xaml"
|
||||
Title="SettingsPage"
|
||||
d:DataContext="{d:DesignInstance local:SettingsPage,
|
||||
IsDesignTimeCreatable=False}"
|
||||
d:DesignHeight="450"
|
||||
d:DesignWidth="800"
|
||||
ui:Design.Background="{DynamicResource ApplicationBackgroundBrush}"
|
||||
ui:Design.Foreground="{DynamicResource TextFillColorPrimaryBrush}"
|
||||
Foreground="{DynamicResource TextFillColorPrimaryBrush}"
|
||||
mc:Ignorable="d">
|
||||
<Page.Resources>
|
||||
<helpers:EnumToBooleanConverter x:Key="EnumToBooleanConverter" />
|
||||
</Page.Resources>
|
||||
|
||||
<StackPanel>
|
||||
<TextBlock
|
||||
FontSize="20"
|
||||
FontWeight="Medium"
|
||||
Text="Personalization" />
|
||||
<TextBlock Margin="0,12,0,0" Text="Theme" />
|
||||
<RadioButton
|
||||
Margin="0,12,0,0"
|
||||
Command="{Binding ViewModel.ChangeThemeCommand, Mode=OneWay}"
|
||||
CommandParameter="theme_light"
|
||||
Content="Light"
|
||||
GroupName="themeSelect"
|
||||
IsChecked="{Binding ViewModel.CurrentTheme, Converter={StaticResource EnumToBooleanConverter}, ConverterParameter=Light, Mode=OneWay}" />
|
||||
<RadioButton
|
||||
Margin="0,8,0,0"
|
||||
Command="{Binding ViewModel.ChangeThemeCommand, Mode=OneWay}"
|
||||
CommandParameter="theme_dark"
|
||||
Content="Dark"
|
||||
GroupName="themeSelect"
|
||||
IsChecked="{Binding ViewModel.CurrentTheme, Converter={StaticResource EnumToBooleanConverter}, ConverterParameter=Dark, Mode=OneWay}" />
|
||||
|
||||
<TextBlock
|
||||
Margin="0,24,0,0"
|
||||
FontSize="20"
|
||||
FontWeight="Medium"
|
||||
Text="About Downloader" />
|
||||
<TextBlock Margin="0,12,0,0" Text="{Binding ViewModel.AppVersion, Mode=OneWay}" />
|
||||
</StackPanel>
|
||||
</Page>
|
||||
24
Views/Pages/SettingsPage.xaml.cs
Normal file
24
Views/Pages/SettingsPage.xaml.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
// This Source Code Form is subject to the terms of the MIT License.
|
||||
// If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT.
|
||||
// Copyright (C) Leszek Pomianowski and WPF UI Contributors.
|
||||
// All Rights Reserved.
|
||||
|
||||
using DownloadManager.ViewModels.Pages;
|
||||
using Wpf.Ui.Controls;
|
||||
|
||||
namespace DownloadManager.Views.Pages;
|
||||
public partial class SettingsPage : INavigableView<SettingsViewModel>
|
||||
{
|
||||
public SettingsViewModel ViewModel
|
||||
{
|
||||
get;
|
||||
}
|
||||
|
||||
public SettingsPage(SettingsViewModel viewModel)
|
||||
{
|
||||
ViewModel = viewModel;
|
||||
DataContext = this;
|
||||
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user