Many nice features

This commit is contained in:
Holger Boerchers
2018-08-14 21:51:18 +02:00
parent 01a90bd460
commit 2b295c9d93
24 changed files with 493 additions and 198 deletions

View File

@ -0,0 +1,31 @@
<UserControl x:Class="MaterialModernWPF.View.InfoDialog"
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:MaterialModernWPF"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:system="clr-namespace:System;assembly=mscorlib"
Width="300"
d:DesignHeight="300"
mc:Ignorable="d">
<StackPanel Margin="16">
<TextBlock Margin="0,0,0,10"
FontSize="16"
Text="NiftyTool NG" />
<TextBlock FontSize="14" TextWrapping="Wrap">
This app is proudly made with: Material Design, ModernWPF 2 and Autofac.
</TextBlock>
<StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
<Button Margin="0,10,0,0"
Command="materialDesign:DialogHost.CloseDialogCommand"
IsDefault="True"
Style="{StaticResource MaterialDesignFlatButton}">
<Button.CommandParameter>
<system:Boolean>True</system:Boolean>
</Button.CommandParameter>
CLOSE
</Button>
</StackPanel>
</StackPanel>
</UserControl>

View File

@ -0,0 +1,13 @@
namespace MaterialModernWPF.View
{
/// <summary>
/// Interaktionslogik für InfoDialog.xaml
/// </summary>
public partial class InfoDialog
{
public InfoDialog()
{
InitializeComponent();
}
}
}

View File

@ -0,0 +1,120 @@
<Window
x:Class="MaterialModernWPF.View.Shell"
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:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:modern="http://modernwpf"
xmlns:prism="http://prismlibrary.com/"
xmlns:root="clr-namespace:MaterialModernWPF"
xmlns:view="clr-namespace:MaterialModernWPF.View"
x:Name="Window"
Title="NiftyTool NG"
Width="920"
Height="600"
modern:UIHooks.AutoDpiScale="True"
prism:ViewModelLocator.AutoWireViewModel="True"
Background="{DynamicResource MaterialDesignPaper}"
FontFamily="pack://application:,,,/MaterialDesignThemes.Wpf;component/Resources/Roboto/#Roboto"
ResizeMode="CanResizeWithGrip"
TextElement.Foreground="{DynamicResource MaterialDesignBody}"
mc:Ignorable="d">
<modern:Chrome.Chrome>
<modern:Chrome ActiveBorderBrush="{StaticResource PrimaryHueDarkBrush}" />
</modern:Chrome.Chrome>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<modern:TitleBar
Grid.Row="0"
Background="{StaticResource PrimaryHueDarkBrush}"
ShowTitle="False" />
<materialDesign:DialogHost Grid.Row="1" Identifier="RootDialog">
<materialDesign:DialogHost.DialogContent>
<view:InfoDialog />
</materialDesign:DialogHost.DialogContent>
<materialDesign:DrawerHost IsLeftDrawerOpen="{Binding ElementName=MenuToggleButton, Path=IsChecked}">
<materialDesign:DrawerHost.LeftDrawerContent>
<DockPanel MinWidth="212">
<ToggleButton
Margin="12"
HorizontalAlignment="Right"
DockPanel.Dock="Top"
IsChecked="{Binding ElementName=MenuToggleButton, Path=IsChecked, Mode=TwoWay}"
Style="{StaticResource MaterialDesignHamburgerToggleButton}" />
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition />
<RowDefinition Height="Auto" />
<RowDefinition />
</Grid.RowDefinitions>
<TextBlock
Grid.Row="0"
Margin="5"
Text="Favorites" />
<ListBox Grid.Row="1">
<TextBlock Text="WIND020214" />
<TextBlock Text="WIND020248" />
<TextBlock Text="SRV-LSIMCTRL01" />
</ListBox>
<TextBlock
Grid.Row="2"
Margin="5"
Text="History" />
<ListBox Grid.Row="3">
<TextBlock Text="WIND020214" />
<TextBlock Text="WIND020248" />
<TextBlock Text="SRV-LSIMCTRL01" />
</ListBox>
</Grid>
</DockPanel>
</materialDesign:DrawerHost.LeftDrawerContent>
<DockPanel>
<materialDesign:ColorZone
Padding="2"
materialDesign:ShadowAssist.ShadowDepth="Depth2"
DockPanel.Dock="Top"
Mode="PrimaryMid">
<DockPanel>
<ToggleButton
x:Name="MenuToggleButton"
IsChecked="False"
Style="{StaticResource MaterialDesignHamburgerToggleButton}" />
<StackPanel DockPanel.Dock="Right" Orientation="Horizontal">
<Button materialDesign:ShadowAssist.ShadowDepth="Depth0" Style="{StaticResource MaterialDesignFloatingActionButton}">
<materialDesign:PackIcon
Width="32"
Height="32"
Kind="CubeOutline" />
</Button>
<Button materialDesign:ShadowAssist.ShadowDepth="Depth0" Style="{StaticResource MaterialDesignFloatingActionButton}">
<materialDesign:PackIcon
Width="32"
Height="32"
Kind="Clippy" />
</Button>
<materialDesign:PopupBox PlacementMode="BottomAndAlignRightEdges" StaysOpen="False">
<StackPanel>
<Button Command="{x:Static materialDesign:DialogHost.OpenDialogCommand}" Content="Einstellungen" />
<Button Command="{x:Static materialDesign:DialogHost.OpenDialogCommand}" Content="Info" />
</StackPanel>
</materialDesign:PopupBox>
</StackPanel>
<TextBlock
Margin="10,0,0,0"
HorizontalAlignment="Left"
VerticalAlignment="Center"
FontSize="22"
Text="{Binding Title, ElementName=Window}" />
</DockPanel>
</materialDesign:ColorZone>
<ContentControl prism:RegionManager.RegionName="{x:Static root:Constants.MainRegion}" />
</DockPanel>
</materialDesign:DrawerHost>
</materialDesign:DialogHost>
</Grid>
</Window>

View File

@ -0,0 +1,13 @@
namespace MaterialModernWPF.View
{
/// <summary>
/// Interaktionslogik für MainWindow.xaml
/// </summary>
public partial class Shell
{
public Shell()
{
InitializeComponent();
}
}
}

View File

@ -0,0 +1,11 @@
using Prism.Mvvm;
namespace MaterialModernWPF.View
{
public class ShellViewModel : BindableBase
{
public ShellViewModel()
{
}
}
}