Skip to content
This repository was archived by the owner on Jan 21, 2022. It is now read-only.

Commit f436646

Browse files
committed
Temporarily add login button
1 parent 9fa4c9c commit f436646

3 files changed

Lines changed: 28 additions & 13 deletions

File tree

View/MainWindow.xaml

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,21 @@
3030
<Button x:Name="btNextButton" Content="&gt;" Grid.Column="1" Margin="5" Click="NavigationNextPreviousButton_Click"/>
3131
</Grid>
3232
<!-- The Stackpanel doesn't allow a binding for its children, so we use a ItemsControl instead -->
33-
<ItemsControl x:Name="icMenuItems" Grid.Row="1" ItemsSource="{Binding MainNavigationItems}">
34-
<ItemsControl.ItemsPanel>
35-
<ItemsPanelTemplate>
36-
<StackPanel IsItemsHost="True"/>
37-
</ItemsPanelTemplate>
38-
</ItemsControl.ItemsPanel>
39-
<ItemsControl.ItemTemplate>
40-
<ItemContainerTemplate>
41-
<local:MainWindowNavigationItem Content="{Binding Title}" Page="{Binding Page}" ExtraNavigationInformation="{Binding ExtraInformation}" Command="{Binding Path=DataContext.NavigateButtonCommand, RelativeSource={RelativeSource AncestorType=Window},Mode=Default}" CommandParameter="{Binding Mode=OneWay}"/>
42-
</ItemContainerTemplate>
43-
</ItemsControl.ItemTemplate>
44-
</ItemsControl>
33+
<StackPanel Grid.Row="1"> <!-- TEMPORARY for login button -->
34+
<ItemsControl x:Name="icMenuItems" Grid.Row="1" ItemsSource="{Binding MainNavigationItems}">
35+
<ItemsControl.ItemsPanel>
36+
<ItemsPanelTemplate>
37+
<StackPanel IsItemsHost="True"/>
38+
</ItemsPanelTemplate>
39+
</ItemsControl.ItemsPanel>
40+
<ItemsControl.ItemTemplate>
41+
<ItemContainerTemplate>
42+
<local:MainWindowNavigationItem Content="{Binding Title}" Page="{Binding Page}" ExtraNavigationInformation="{Binding ExtraInformation}" Command="{Binding Path=DataContext.NavigateButtonCommand, RelativeSource={RelativeSource AncestorType=Window},Mode=Default}" CommandParameter="{Binding Mode=OneWay}"/>
43+
</ItemContainerTemplate>
44+
</ItemsControl.ItemTemplate>
45+
</ItemsControl>
46+
<local:MainWindowNavigationItem Content="Login" ExtraNavigationInformation="" Click="Login_Click"/>
47+
</StackPanel>
4548
<TextBlock x:Name="tbContentTitle" Grid.Column="1" FontSize="22" FontWeight="Bold" Text="{Binding Title}"/>
4649
<ScrollViewer Grid.Column="1" Grid.Row="1" VerticalScrollBarVisibility="Auto" >
4750
<Frame x:Name="frContent" Grid.Column="1" Grid.Row="1" NavigationUIVisibility="Hidden" Navigated="frContent_Navigated" Source="{Binding CurrentVisiblePage}"/>

View/MainWindow.xaml.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,5 +49,16 @@ private void frContent_Navigated(object sender, NavigationEventArgs e)
4949
tbContentTitle.Text = ((Page)((Frame)sender).Content).Title;
5050
}
5151
}
52+
53+
private void MainWindowNavigationItem_Checked(object sender, RoutedEventArgs e)
54+
{
55+
56+
}
57+
58+
private void Login_Click(object sender, RoutedEventArgs e)
59+
{
60+
AuthenticationWindow authenticationWindow = new AuthenticationWindow();
61+
authenticationWindow.Show();
62+
}
5263
}
5364
}

View/Styling/Main.xaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,15 @@
2525
<Setter Property="HorizontalContentAlignment" Value="Left"/>
2626
</DataTrigger>
2727
</Style.Triggers>
28+
<Setter Property="Background" Value="{StaticResource BackgroundTertiary}"/>
2829
</Style>
2930

3031
<Style TargetType="StackPanel">
3132
<Setter Property="Background" Value="{StaticResource BackgroundSecundary}"/>
3233
</Style>
3334

3435
<Style TargetType="Window">
35-
<Setter Property="FontSize" Value="22"/>
36+
<Setter Property="FontSize" Value="20"/>
3637
<Setter Property="Background" Value="{StaticResource BackgroundPrimary}"/>
3738
<Style.Triggers>
3839
<DataTrigger

0 commit comments

Comments
 (0)