add resharper and hover effect for modules; change navigation bar

This commit is contained in:
Rene Schwarz
2021-08-10 02:03:11 +02:00
parent cdb86331e5
commit 910383775b
64 changed files with 792 additions and 832 deletions

View File

@@ -9,35 +9,35 @@
d:DataContext="{d:DesignInstance Type=root:DashboardModuleViewModel}"
mc:Ignorable="d" ResizeMode="NoResize" Height="700" Width="500" d:WindowStyle="None" ap:CloseProperty.Value="True">
<WindowChrome.WindowChrome>
<WindowChrome CaptionHeight="0" ResizeBorderThickness="0"/>
<WindowChrome CaptionHeight="0" ResizeBorderThickness="0" />
</WindowChrome.WindowChrome>
<!--Create new Server Form-->
<Border Width="500" Height="700">
<Border.Background>
<SolidColorBrush Color="#2D2D2D" Opacity="1"/>
<SolidColorBrush Color="#2D2D2D" Opacity="1" />
</Border.Background>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="30"/>
<RowDefinition Height="*"/>
<RowDefinition Height="30" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<!--Title Bar-->
<Grid Background="{StaticResource BackgroundSurface_04dp}" Grid.Row="0">
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition Width="40"/>
<ColumnDefinition />
<ColumnDefinition Width="40" />
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="Create a new Server" Margin="5 0 0 0" Foreground="{StaticResource DeepPurple_A100}" VerticalAlignment="Center">
<i:Interaction.Triggers>
<i:EventTrigger EventName="MouseLeftButtonDown">
<i:CallMethodAction MethodName="DragMove" TargetObject="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=Window}}"/>
<i:CallMethodAction MethodName="DragMove" TargetObject="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=Window}}" />
</i:EventTrigger>
</i:Interaction.Triggers>
</TextBlock>
<Button Style="{StaticResource CloseButton}" Grid.Column="2" Content="✕" Cursor="Hand">
<Button Style="{StaticResource CloseButton}" Grid.Column="1" Content="✕">
<i:Interaction.Triggers>
<i:EventTrigger EventName="Click">
<i:CallMethodAction MethodName="Close" TargetObject="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=Window}}"/>
<i:CallMethodAction MethodName="Close" TargetObject="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=Window}}" />
</i:EventTrigger>
</i:Interaction.Triggers>
</Button>
@@ -45,34 +45,34 @@
<!--Main Content-->
<Grid Background="{StaticResource BackgroundSurface_04dp}" Grid.Row="1" Margin="20">
<Grid.Effect>
<DropShadowEffect Direction="0" BlurRadius="5" ShadowDepth="0"/>
<DropShadowEffect Direction="0" BlurRadius="5" ShadowDepth="0" />
</Grid.Effect>
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition Height="30"/>
<RowDefinition/>
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition />
<RowDefinition Height="30" />
<RowDefinition />
</Grid.RowDefinitions>
<!--Server Name-->
<StackPanel VerticalAlignment="Center" Grid.Row="0" Margin="20 0 20 0">
<StackPanel Orientation="Horizontal">
<TextBlock Text="Module Name" FontSize="24" Margin="0 0 0 5">
<TextBlock.Foreground>
<SolidColorBrush Color="White" Opacity="0.87"/>
<SolidColorBrush Color="White" Opacity="0.87" />
</TextBlock.Foreground>
</TextBlock>
</StackPanel>
<Grid>
<Grid.Effect>
<DropShadowEffect Direction="0" BlurRadius="5" ShadowDepth="0"/>
<DropShadowEffect Direction="0" BlurRadius="5" ShadowDepth="0" />
</Grid.Effect>
<TextBox Text="{Binding ModuleName}" Grid.Column="1" Height="40" FontSize="20" x:Name="ServerName"/>
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Left" Text="My Awesome Server" FontSize="20" Visibility="{Binding ElementName=ServerName, Path=Text.IsEmpty, Converter={StaticResource UserNameVisibillity}}" Grid.Column="1" IsHitTestVisible="False" Margin="5 0 0 0">
<TextBox Text="{Binding ModuleName}" Height="40" FontSize="20" x:Name="ServerName" />
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Left" Text="My Awesome Server" FontSize="20" Visibility="{Binding ElementName=ServerName, PresentationTraceSources.TraceLevel=High, Path=Text.IsEmpty, Converter={StaticResource UserNameVisibillity}}" IsHitTestVisible="False" Margin="5 0 0 0">
<TextBlock.Foreground>
<SolidColorBrush Color="White" Opacity="0.12"/>
<SolidColorBrush Color="White" Opacity="0.12" />
</TextBlock.Foreground>
</TextBlock>
</Grid>
@@ -82,18 +82,18 @@
<StackPanel Orientation="Horizontal">
<TextBlock Text="Server Name" FontSize="24" Margin="0 0 0 5">
<TextBlock.Foreground>
<SolidColorBrush Color="White" Opacity="0.87"/>
<SolidColorBrush Color="White" Opacity="0.87" />
</TextBlock.Foreground>
</TextBlock>
</StackPanel>
<Grid>
<Grid.Effect>
<DropShadowEffect Direction="0" BlurRadius="5" ShadowDepth="0"/>
<DropShadowEffect Direction="0" BlurRadius="5" ShadowDepth="0" />
</Grid.Effect>
<TextBox Text="{Binding ServerName}" Grid.Column="1" Height="40" FontSize="20" x:Name="UserName"/>
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Left" Text="Name" FontSize="20" Visibility="{Binding ElementName=UserName, Path=Text.IsEmpty, Converter={StaticResource UserNameVisibillity}}" Grid.Column="1" IsHitTestVisible="False" Margin="5 0 0 0">
<TextBox Text="{Binding ServerName}" Height="40" FontSize="20" x:Name="UserName" />
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Left" Text="Name" FontSize="20" Visibility="{Binding ElementName=UserName, Path=Text.IsEmpty, Converter={StaticResource UserNameVisibillity}}" IsHitTestVisible="False" Margin="5 0 0 0">
<TextBlock.Foreground>
<SolidColorBrush Color="White" Opacity="0.12"/>
<SolidColorBrush Color="White" Opacity="0.12" />
</TextBlock.Foreground>
</TextBlock>
</Grid>
@@ -101,21 +101,21 @@
<!--IP Adress-->
<StackPanel VerticalAlignment="Center" Grid.Row="2" Margin="20 0 20 0">
<StackPanel Orientation="Horizontal">
<TextBlock Text="IP Adress" FontSize="24" Margin="0 0 0 5">
<TextBlock Text="IP Address" FontSize="24" Margin="0 0 0 5">
<TextBlock.Foreground>
<SolidColorBrush Color="White" Opacity="0.87"/>
<SolidColorBrush Color="White" Opacity="0.87" />
</TextBlock.Foreground>
</TextBlock>
<TextBlock Text="*" Foreground="{StaticResource ErrorRed}" FontSize="16"/>
<TextBlock Text="*" Foreground="{StaticResource ErrorRed}" FontSize="16" />
</StackPanel>
<Grid>
<Grid.Effect>
<DropShadowEffect Direction="0" BlurRadius="5" ShadowDepth="0"/>
<DropShadowEffect Direction="0" BlurRadius="5" ShadowDepth="0" />
</Grid.Effect>
<TextBox Text="{Binding IPAdress}" Grid.Column="1" Height="40" FontSize="20" x:Name="IPAdress"/>
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Left" Text="sample.ssh.com" FontSize="20" Visibility="{Binding ElementName=IPAdress, Path=Text.IsEmpty, Converter={StaticResource UserNameVisibillity}}" Grid.Column="1" IsHitTestVisible="False" Margin="5 0 0 0">
<TextBox Text="{Binding IpAddress}" Height="40" FontSize="20" />
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Left" Text="sample.ssh.com" FontSize="20" Visibility="{Binding ElementName=IpAddress, Path=Text.IsEmpty, Converter={StaticResource UserNameVisibillity}}" IsHitTestVisible="False" Margin="5 0 0 0">
<TextBlock.Foreground>
<SolidColorBrush Color="White" Opacity="0.12"/>
<SolidColorBrush Color="White" Opacity="0.12" />
</TextBlock.Foreground>
</TextBlock>
</Grid>
@@ -124,17 +124,17 @@
<StackPanel VerticalAlignment="Center" Grid.Row="3" Margin="20 0 20 0">
<TextBlock Text="Port" FontSize="24" Margin="0 0 0 5">
<TextBlock.Foreground>
<SolidColorBrush Color="White" Opacity="0.87"/>
<SolidColorBrush Color="White" Opacity="0.87" />
</TextBlock.Foreground>
</TextBlock>
<Grid>
<Grid.Effect>
<DropShadowEffect Direction="0" BlurRadius="5" ShadowDepth="0"/>
<DropShadowEffect Direction="0" BlurRadius="5" ShadowDepth="0" />
</Grid.Effect>
<TextBox Text="{Binding Port}" Grid.Column="1" Height="40" FontSize="20" x:Name="Port"/>
<TextBox Text="{Binding Port}" Height="40" FontSize="20" x:Name="Port" />
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Left" Text="22" FontSize="20" Visibility="{Binding ElementName=Port, Path=Text.IsEmpty, Converter={StaticResource UserNameVisibillity}}" Grid.Column="1" IsHitTestVisible="False" Margin="5 0 0 0">
<TextBlock.Foreground>
<SolidColorBrush Color="White" Opacity="0.12"/>
<SolidColorBrush Color="White" Opacity="0.12" />
</TextBlock.Foreground>
</TextBlock>
</Grid>
@@ -142,8 +142,8 @@
<!--Module Icon-->
<Grid Grid.Row="4">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="102"/>
<ColumnDefinition/>
<ColumnDefinition Width="102" />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Button Cursor="Hand" Command="{Binding SelectIconCommand}" HorizontalAlignment="Left" Margin="20 0 20 0" Height="62" Width="62">
<Button.Style>
@@ -153,21 +153,20 @@
<ControlTemplate TargetType="{x:Type Button}">
<Border CornerRadius="4" x:Name="Border" Background="{StaticResource BackgroundSurface_04dp}" BorderBrush="Transparent" BorderThickness="{TemplateBinding BorderThickness}">
<Border.Effect>
<DropShadowEffect Direction="0" ShadowDepth="0" BlurRadius="5"/>
<DropShadowEffect Direction="0" ShadowDepth="0" BlurRadius="5" />
</Border.Effect>
<Grid>
<Rectangle RadiusX="4" RadiusY="4">
<Rectangle.Fill>
<ImageBrush ImageSource="{Binding ModuleIcon}"/>
<ImageBrush ImageSource="{Binding ModuleIcon}" />
</Rectangle.Fill>
</Rectangle>
<Border CornerRadius="100" Background="{StaticResource BackgroundSurface_04dp}" Width="20" Height="20" VerticalAlignment="Bottom" HorizontalAlignment="Right" Margin="2">
<svgc:SvgViewbox IsHitTestVisible="False" Source="../../../Assets/Images/AddIcon.svg" Opacity="1"/>
<svgc:SvgViewbox IsHitTestVisible="False" Source="../../../Assets/Images/AddIcon.svg" Opacity="1" />
</Border>
</Grid>
</Border>
<ControlTemplate.Triggers>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
@@ -175,24 +174,24 @@
</Style>
</Button.Style>
</Button>
<Button Command="{Binding RemoveIconCommand}" HorizontalAlignment="Left" Grid.Column="1" Content="Remove Icon" Height="40" Width="150"/>
<Button Command="{Binding RemoveIconCommand}" HorizontalAlignment="Left" Grid.Column="1" Content="Remove Icon" Height="40" Width="150" />
</Grid>
<!--Error Text / Test Connection Result-->
<TextBlock Text="{Binding UserInformationMessage}" VerticalAlignment="Center" HorizontalAlignment="Center" Grid.Row="5" FontSize="14">
<TextBlock.Foreground>
<SolidColorBrush Color="#64FFDA" Opacity="0.64"/>
<SolidColorBrush Color="#64FFDA" Opacity="0.64" />
</TextBlock.Foreground>
</TextBlock>
<!--Create Module button-->
<Grid Grid.Row="6">
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Button Margin="20 0 10 0" Height="60" Width="Auto" Command="{Binding CreateModuleCommand}" CommandParameter="{Binding ElementName=CREATE_MODULE}" Content="CREATE MODULE" Grid.Column="0"/>
<Button Margin="10 0 20 0" Height="60" Width="Auto" Command="{Binding TestConnectionCommand}" Content="TEST CONNECTION" Grid.Column="1"/>
<Button Margin="20 0 10 0" Height="60" Width="Auto" Command="{Binding CreateModuleCommand}" CommandParameter="{Binding ElementName=CREATE_MODULE}" Content="CREATE MODULE" Grid.Column="0" />
<Button Margin="10 0 20 0" Height="60" Width="Auto" Command="{Binding TestConnectionCommand}" Content="TEST CONNECTION" Grid.Column="1" />
</Grid>
</Grid>
</Grid>
</Border>
</Window>
</Window>

View File

@@ -3,8 +3,6 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:Server_Dashboard.Views"
xmlns:root="clr-namespace:Server_Dashboard"
xmlns:views="clr-namespace:Server_Dashboard.Views.DashboardPages"
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
xmlns:svgc="http://sharpvectors.codeplex.com/svgc/"
@@ -32,7 +30,7 @@
</i:EventTrigger>
</i:Interaction.Triggers>
</Label>
<Button Style="{StaticResource CloseButton}" Grid.Column="2" Content="✕" Cursor="Hand">
<Button Style="{StaticResource CloseButton}" Grid.Column="1" Content="✕">
<i:Interaction.Triggers>
<i:EventTrigger EventName="Click">
<i:CallMethodAction MethodName="Close" TargetObject="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=Window}}" />
@@ -41,7 +39,7 @@
</Button>
</Grid>
<!--Settings, Docs, User, links etc-->
<Grid Background="{StaticResource BackgroundSurface_04dp}" Grid.Row="1" x:Name="TopBarGrid">
<Grid Background="{StaticResource BackgroundSurface_04dp}" Grid.Row="1">
<Grid.Effect>
<DropShadowEffect Direction="270" BlurRadius="5" />
</Grid.Effect>
@@ -198,7 +196,7 @@
</Button>
</Grid>
<!--UserControl Container for the Dashboard pages-->
<UserControl Grid.Row="3">
<UserControl Grid.Row="2">
<views:MainDashboardPage />
</UserControl>
</Grid>

View File

@@ -1,48 +1,71 @@
<UserControl x:Class="Server_Dashboard.Views.DashboardPages.MainDashboardPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:vm="clr-namespace:Server_Dashboard"
xmlns:local="clr-namespace:Server_Dashboard.Views.DashboardPages"
xmlns:modulescrud="clr-namespace:Server_Dashboard.Views.DashboardPages.ModuleCRUD"
xmlns:root="clr-namespace:Server_Dashboard"
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:controls="clr-namespace:Server_Dashboard.Controls.ServerModules"
mc:Ignorable="d" d:DesignHeight="920" d:DesignWidth="1600">
<Grid Background="{StaticResource BackgroundSurface_00dp}">
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<!--Dashboard and Options-->
<Grid Grid.Row="2">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="200"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="200" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid Grid.Column="0" Background="{StaticResource BackgroundSurface_02dp}">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="80" />
<RowDefinition Height="*" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Button Grid.Row="0" Command="{Binding OpenNewModuleWindowCommand}" Content="New Module" Height="50" Margin="5 10 5 0" Cursor="Hand" x:Name="CreateModule"/>
<Button Grid.Row="1" Command="{Binding OpenDeleteModuleWindowCommand}" Content="Remove Module" Height="50" Margin="5 10 5 0" Cursor="Hand" x:Name="RemoveModule"/>
<Button Grid.Row="2" Command="{Binding OpenUpdateModuleWindowCommand}" Content="Change Module" Height="50" Margin="5 10 5 0" Cursor="Hand" x:Name="ChangeModule"/>
<Grid Grid.Row="1">
<Grid.RowDefinitions>
<RowDefinition Height="40" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<TextBlock Grid.Row="0" Text="Navigation" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10 0 0 0">
<TextBlock.Foreground>
<SolidColorBrush Color="White" Opacity="0.67" />
</TextBlock.Foreground>
</TextBlock>
<Button Grid.Row="1" Content="PLACEHOLDER" Height="50" Margin="5 10 5 0" Cursor="Hand" />
<Button Grid.Row="2" Content="PLACEHOLDER" Height="50" Margin="5 10 5 0" Cursor="Hand" />
<Button Grid.Row="3" Content="PLACEHOLDER" Height="50" Margin="5 10 5 0" Cursor="Hand" />
</Grid>
<Grid Grid.Row="2">
<Grid.RowDefinitions>
<RowDefinition Height="40" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<TextBlock Grid.Row="0" Text="Module" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="10 0 0 0">
<TextBlock.Foreground>
<SolidColorBrush Color="White" Opacity="0.67" />
</TextBlock.Foreground>
</TextBlock>
<Button Grid.Row="1" Command="{Binding OpenNewModuleWindowCommand}" Content="New Module" Height="50" Margin="5 10 5 0" Cursor="Hand" />
<Button Grid.Row="2" Command="{Binding OpenDeleteModuleWindowCommand}" Content="Remove Module" Height="50" Margin="5 10 5 0" Cursor="Hand" />
<Button Grid.Row="3" Command="{Binding OpenUpdateModuleWindowCommand}" Content="Change Module" Height="50" Margin="5 10 5 0" Cursor="Hand" />
</Grid>
</Grid>
<!--ItemsControl list for the Dashboardmodules-->
<!--ItemsControl list for the Dashboard modules-->
<Grid Grid.Column="1">
<ScrollViewer VerticalScrollBarVisibility="Hidden">
<ItemsControl ItemsSource="{Binding Modules}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<WrapPanel HorizontalAlignment="Center"/>
<WrapPanel VerticalAlignment="Top" HorizontalAlignment="Left" />
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<controls:ServerModule/>
<controls:ServerModule />
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
@@ -50,4 +73,4 @@
</Grid>
</Grid>
</Grid>
</UserControl>
</UserControl>

View File

@@ -12,12 +12,14 @@ using System.Windows.Navigation;
using System.Windows.Shapes;
namespace Server_Dashboard.Views.DashboardPages {
/// <summary>
/// Interaktionslogik für MainDashboardPage.xaml
/// </summary>
public partial class MainDashboardPage : UserControl {
public MainDashboardPage() {
InitializeComponent();
}
}
}
}