145 lines
9.8 KiB
XML
145 lines
9.8 KiB
XML
<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>
|