made doctor window fancy
This commit is contained in:
@@ -5,10 +5,113 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:DoctorApp"
|
||||
mc:Ignorable="d"
|
||||
Title="MainWindow" Height="450" Width="800"
|
||||
WindowState="Maximized">
|
||||
Title="MainWindow" Height="450" Width="800">
|
||||
<Window.Resources>
|
||||
<Style TargetType="{x:Type local:MainWindow}">
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type Window}">
|
||||
<Border Padding="{Binding OuterMarginThickness, FallbackValue=10}" >
|
||||
<Grid>
|
||||
|
||||
<!-- opacity mask -->
|
||||
<Border x:Name="Container"
|
||||
Background="{StaticResource BackgroundLightBrush}"
|
||||
CornerRadius="{Binding WindowCornerRadius, FallbackValue=10}"/>
|
||||
|
||||
|
||||
<Border CornerRadius="{Binding WindowCornerRadius, FallbackValue=10}"
|
||||
Background="{StaticResource BackgroundVeryLightBrush}">
|
||||
<Border.Effect>
|
||||
<DropShadowEffect ShadowDepth="0" Opacity="0.2"/>
|
||||
</Border.Effect>
|
||||
</Border>
|
||||
|
||||
|
||||
<Grid>
|
||||
|
||||
<Grid.OpacityMask>
|
||||
<VisualBrush Visual="{Binding ElementName=Container}"/>
|
||||
</Grid.OpacityMask>
|
||||
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="{Binding TitleHeightGridLength, FallbackValue=42}"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<!-- Title bar -->
|
||||
<Grid Grid.Column="0" Grid.Row="0" Panel.ZIndex="1" Background="{StaticResource BackgroundLightBrush}">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<!-- icon -->
|
||||
<Button Grid.Column="0" Style="{StaticResource SystemIconButton}" Command="{Binding MenuCommand}">
|
||||
<Image Source="/Images/Logo/icon1.ico"/>
|
||||
<!--<TextBlock Text="icon"/>-->
|
||||
</Button>
|
||||
|
||||
<!-- Title -->
|
||||
<Viewbox Grid.Column="1" Margin="0">
|
||||
<TextBlock Style="{StaticResource HeaderText}" Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Title, FallbackValue=failed}"/>
|
||||
</Viewbox>
|
||||
|
||||
<!-- Window buttons -->
|
||||
<StackPanel Grid.Column="2" Orientation="Horizontal">
|
||||
<Button Style="{StaticResource WindowControlButton}" Content="_" Command="{Binding MinimizeCommand}"/>
|
||||
<Button Style="{StaticResource WindowControlButton}" Content="[]" Command="{Binding MaximizeCommand}"/>
|
||||
<Button Style="{StaticResource WindowCloseButton}" Content="X" Command="{Binding CloseCommand}"/>
|
||||
</StackPanel>
|
||||
|
||||
</Grid>
|
||||
|
||||
<!-- Page content -->
|
||||
<Border Grid.Row="1" Grid.Column="0">
|
||||
<ContentPresenter Content="{TemplateBinding Content}"/>
|
||||
</Border>
|
||||
|
||||
<!-- shadow? -->
|
||||
<Border Grid.Row="1" Height="6" BorderThickness="0 0.2 0 0" VerticalAlignment="Top">
|
||||
<!--<Border.BorderBrush>
|
||||
<LinearGradientBrush StartPoint="0,0" EndPoint="1,0">
|
||||
<GradientStop Color="{StaticResource BackgroundSemiLight}" Offset="0.0"/>
|
||||
<GradientStop Color="{StaticResource BackgroundVeryLight}" Offset="1.0"/>
|
||||
</LinearGradientBrush>
|
||||
</Border.BorderBrush>-->
|
||||
|
||||
|
||||
<Border.Background>
|
||||
<LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
|
||||
<GradientStop Color="Transparent" Offset="1.0"/>
|
||||
<GradientStop Color="#7000" Offset="0.0"/>
|
||||
</LinearGradientBrush>
|
||||
</Border.Background>
|
||||
</Border>
|
||||
|
||||
|
||||
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</Window.Resources>
|
||||
|
||||
<WindowChrome.WindowChrome>
|
||||
<WindowChrome
|
||||
ResizeBorderThickness="{Binding ResizeBorderThickness}"
|
||||
CaptionHeight="{Binding TitleHeight}"
|
||||
CornerRadius="0"
|
||||
GlassFrameThickness="0"/>
|
||||
</WindowChrome.WindowChrome>
|
||||
|
||||
<Grid>
|
||||
<ContentControl HorizontalAlignment="Center" VerticalAlignment="Center" Content="{Binding SelectedViewModel}" Focusable="False" />
|
||||
<Frame Content="{Binding SelectedViewModel}" Focusable="False" NavigationUIVisibility="Hidden"/>
|
||||
<Label Content="gemaakt door: mensen" DockPanel.Dock="Bottom" HorizontalAlignment="Right" VerticalAlignment="Bottom" FontStyle="Italic" Foreground="Gray"/>
|
||||
</Grid>
|
||||
</Window>
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace DoctorApp
|
||||
{
|
||||
Client client = new Client();
|
||||
InitializeComponent();
|
||||
DataContext = new MainWindowViewModel(client);
|
||||
DataContext = new MainWindowViewModel(this, client);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user