Add DashboardWindow, controlls to close the login than open the dashboard
This commit is contained in:
29
Server Dashboard/Views/DashboardPages/MainDashboardPage.xaml
Normal file
29
Server Dashboard/Views/DashboardPages/MainDashboardPage.xaml
Normal file
@@ -0,0 +1,29 @@
|
||||
<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:local="clr-namespace:Server_Dashboard.Views.DashboardPages" xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="720" d:DesignWidth="1200">
|
||||
|
||||
<Grid Background="{StaticResource 700Gray}">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!--Dashboard and Options-->
|
||||
<Grid Grid.Row="2">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="200"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid Grid.Column="0" Background="{StaticResource 900Gray}">
|
||||
|
||||
</Grid>
|
||||
<Grid Grid.Column="1" Background="{StaticResource 800Gray}">
|
||||
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</UserControl>
|
||||
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
144
Server Dashboard/Views/DashboardWindow.xaml
Normal file
144
Server Dashboard/Views/DashboardWindow.xaml
Normal file
@@ -0,0 +1,144 @@
|
||||
<Window x:Class="Server_Dashboard.Views.DashboardWindow"
|
||||
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: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"
|
||||
mc:Ignorable="d"
|
||||
Height="800" Width="1200" WindowStyle="None" AllowsTransparency="True" Background="Transparent" ResizeMode="CanResize">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="30"/>
|
||||
<RowDefinition Height="50"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<!--Window Title-->
|
||||
<Grid Grid.Row="0" Background="{StaticResource 1000Gray}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="40"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<i:Interaction.Triggers>
|
||||
<i:EventTrigger EventName="MouseDown">
|
||||
<i:CallMethodAction MethodName="DragMove" TargetObject="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=Window}}"/>
|
||||
</i:EventTrigger>
|
||||
</i:Interaction.Triggers>
|
||||
<Label Grid.Column="0"/>
|
||||
<Button Grid.Column="2" Style="{StaticResource CloseButton}" Content="✕">
|
||||
<i:Interaction.Triggers>
|
||||
<i:EventTrigger EventName="Click">
|
||||
<i:CallMethodAction MethodName="Close" TargetObject="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType=Window}}"/>
|
||||
</i:EventTrigger>
|
||||
</i:Interaction.Triggers>
|
||||
</Button>
|
||||
</Grid>
|
||||
<!--Settings, Docs, User, links etc-->
|
||||
<Grid Grid.Row="1" x:Name="TopBarGrid" Background="{StaticResource 950Gray}" Loaded="Grid_Loaded">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button Grid.Column="0" Style="{StaticResource TopBarLinksButton}">
|
||||
<Button.Template>
|
||||
<ControlTemplate TargetType="{x:Type Button}">
|
||||
<Border x:Name="Border" CornerRadius="4" Padding="2" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
|
||||
<Image x:Name="TopBarButtonImage" Source="../Assets/Images/SettingsLight.png" Height="Auto"/>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter Property="BorderBrush" Value="{StaticResource HighlightedBlue}"/>
|
||||
<Setter Property="Foreground" Value="{StaticResource HighlightedBlue}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsPressed" Value="True">
|
||||
<Setter Property="Background" Value="{StaticResource PressedBlue}"/>
|
||||
<Setter Property="Foreground" Value="{StaticResource 950Gray}"/>
|
||||
<Setter Property="BorderBrush" Value="Transparent"/>
|
||||
<Setter TargetName="TopBarButtonImage" Property="Source" Value="../Assets/Images/Settings.png"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Button.Template>
|
||||
</Button>
|
||||
<Button Grid.Column="2" Content="GitHub" Style="{StaticResource TopBarLinksButton}">
|
||||
<Button.Template>
|
||||
<ControlTemplate TargetType="{x:Type Button}">
|
||||
<Border x:Name="Border" CornerRadius="4" Padding="5" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Image x:Name="TopBarButtonImage" Source="../Assets/Images/GitHubLight.png" Height="{TemplateBinding FontSize}" Margin="0 0 5 0"/>
|
||||
<TextBlock TextAlignment="Center" Padding="5" TextWrapping="Wrap" Text="GitHub" VerticalAlignment="Center" HorizontalAlignment="Center"/>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter Property="BorderBrush" Value="{StaticResource HighlightedBlue}"/>
|
||||
<Setter Property="Foreground" Value="{StaticResource HighlightedBlue}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsPressed" Value="True">
|
||||
<Setter Property="Background" Value="{StaticResource PressedBlue}"/>
|
||||
<Setter Property="Foreground" Value="{StaticResource 950Gray}"/>
|
||||
<Setter Property="BorderBrush" Value="Transparent"/>
|
||||
<Setter TargetName="TopBarButtonImage" Property="Source" Value="../Assets/Images/GitHub.png"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Button.Template>
|
||||
</Button>
|
||||
<Button Grid.Column="3" Content="Docs" Style="{StaticResource TopBarLinksButton}" Cursor="Hand">
|
||||
<Button.Template>
|
||||
<ControlTemplate TargetType="{x:Type Button}">
|
||||
<Border x:Name="Border" CornerRadius="4" Padding="5" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Image x:Name="TopBarButtonImage" Source="../Assets/Images/DocsLight.png" Height="{TemplateBinding FontSize}" Margin="0 0 5 0"/>
|
||||
<TextBlock TextAlignment="Center" Padding="5" TextWrapping="Wrap" Text="Docs" VerticalAlignment="Center" HorizontalAlignment="Center"/>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter Property="BorderBrush" Value="{StaticResource HighlightedBlue}"/>
|
||||
<Setter Property="Foreground" Value="{StaticResource HighlightedBlue}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsPressed" Value="True">
|
||||
<Setter Property="Background" Value="{StaticResource PressedBlue}"/>
|
||||
<Setter Property="Foreground" Value="{StaticResource 950Gray}"/>
|
||||
<Setter Property="BorderBrush" Value="Transparent"/>
|
||||
<Setter TargetName="TopBarButtonImage" Property="Source" Value="../Assets/Images/Docs.png"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Button.Template>
|
||||
</Button>
|
||||
<Button Grid.Column="4" Style="{StaticResource TopBarLinksButton}" Cursor="Hand">
|
||||
<Button.Template>
|
||||
<ControlTemplate TargetType="{x:Type Button}">
|
||||
<Border x:Name="Border" CornerRadius="4" Padding="5" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Image x:Name="TopBarButtonImage" Source="../Assets/Images/UserLight.png" Height="{TemplateBinding FontSize}" Margin="0 0 5 0"/>
|
||||
<TextBlock TextAlignment="Center" Padding="5" TextWrapping="Wrap" Text="{Binding UserName}" VerticalAlignment="Center" HorizontalAlignment="Center"/>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
<ControlTemplate.Triggers>
|
||||
<Trigger Property="IsMouseOver" Value="True">
|
||||
<Setter Property="BorderBrush" Value="{StaticResource HighlightedBlue}"/>
|
||||
<Setter Property="Foreground" Value="{StaticResource HighlightedBlue}"/>
|
||||
</Trigger>
|
||||
<Trigger Property="IsPressed" Value="True">
|
||||
<Setter Property="Background" Value="{StaticResource PressedBlue}"/>
|
||||
<Setter Property="Foreground" Value="{StaticResource 950Gray}"/>
|
||||
<Setter Property="BorderBrush" Value="Transparent"/>
|
||||
<Setter TargetName="TopBarButtonImage" Property="Source" Value="../Assets/Images/User.png"/>
|
||||
</Trigger>
|
||||
</ControlTemplate.Triggers>
|
||||
</ControlTemplate>
|
||||
</Button.Template>
|
||||
</Button>
|
||||
</Grid>
|
||||
<UserControl Grid.Row="3">
|
||||
<views:MainDashboardPage/>
|
||||
</UserControl>
|
||||
</Grid>
|
||||
</Window>
|
||||
28
Server Dashboard/Views/DashboardWindow.xaml.cs
Normal file
28
Server Dashboard/Views/DashboardWindow.xaml.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace Server_Dashboard.Views {
|
||||
/// <summary>
|
||||
/// Interaktionslogik für DashboardWindow.xaml
|
||||
/// </summary>
|
||||
public partial class DashboardWindow : Window {
|
||||
public DashboardWindow() {
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void Grid_Loaded(object sender, RoutedEventArgs e) {
|
||||
foreach(Button b in TopBarGrid.Children) {
|
||||
//b.Template.FindName("TopBarButtonImage")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user