|
6 | 6 | xmlns:local="clr-namespace:View" |
7 | 7 | xmlns:vm="clr-namespace:ViewModel;assembly=ViewModel" |
8 | 8 | xmlns:vmc="clr-namespace:ViewModel.Commands;assembly=ViewModel" |
9 | | - xmlns:converters="clr-namespace:View.Converters" |
10 | 9 | mc:Ignorable="d" |
11 | 10 | Style="{StaticResource {x:Type Window}}" |
12 | 11 | Title="Stugether" Height="450" Width="800"> |
|
22 | 21 | <RowDefinition Height="35"/> |
23 | 22 | <RowDefinition Height="1*"/> |
24 | 23 | </Grid.RowDefinitions> |
25 | | - <Grid Height="{Binding ActualHeight, ElementName=tbContentTitle, Mode=OneWay}" Background="{StaticResource BackgroundSecundary}"> |
| 24 | + <Grid Height="{Binding ActualHeight, ElementName=tbContentTitle, Mode=OneWay}"> |
26 | 25 | <Grid.ColumnDefinitions> |
27 | 26 | <ColumnDefinition Width="1*" /> |
28 | 27 | <ColumnDefinition Width="1*" /> |
29 | 28 | </Grid.ColumnDefinitions> |
30 | | - <Button x:Name="btPreviousButton" Margin="5,5,5,5" Command="NavigationCommands.BrowseBack" CommandTarget="{Binding ElementName=frContent}"> |
31 | | - <Path Margin="0,0,2,0" HorizontalAlignment="Center" VerticalAlignment="Center" Data="M 4 0 L 0 4 L 4 8 Z" Fill="#FF444444"/> |
32 | | - </Button> |
33 | | - <Button x:Name="btNextButton" Grid.Column="1" Margin="5" Command="NavigationCommands.BrowseForward" CommandTarget="{Binding ElementName=frContent}"> |
34 | | - <Path Margin="0,0,2,0" HorizontalAlignment="Center" VerticalAlignment="Center" Data="M 0 0 L 4 4 L 0 8 Z" Fill="#FF444444"/> |
35 | | - </Button> |
| 29 | + <Button x:Name="btPreviousButton" Content="<" Margin="5,5,5,5" Click="NavigationNextPreviousButton_Click"/> |
| 30 | + <Button x:Name="btNextButton" Content=">" Grid.Column="1" Margin="5" Click="NavigationNextPreviousButton_Click"/> |
36 | 31 | </Grid> |
37 | 32 | <!-- The Stackpanel doesn't allow a binding for its children, so we use a ItemsControl instead --> |
| 33 | + <StackPanel Grid.Row="1"> <!-- TEMPORARY for login button --> |
38 | 34 | <ItemsControl x:Name="icMenuItems" Grid.Row="1" ItemsSource="{Binding MainNavigationItems}"> |
39 | 35 | <ItemsControl.ItemsPanel> |
40 | 36 | <ItemsPanelTemplate> |
|
43 | 39 | </ItemsControl.ItemsPanel> |
44 | 40 | <ItemsControl.ItemTemplate> |
45 | 41 | <ItemContainerTemplate> |
46 | | - <local:MainWindowNavigationItem |
47 | | - Content="{Binding Title}" Page="{Binding Page}" ExtraNavigationInformation="{Binding ExtraInformation}" |
48 | | - Command="{Binding Path=DataContext.NavigateButtonCommand, RelativeSource={RelativeSource AncestorType=Window},Mode=Default}" CommandParameter="{Binding Mode=OneWay}"> |
49 | | - <local:MainWindowNavigationItem.IsChecked> |
50 | | - <MultiBinding Mode="OneWay"> |
51 | | - <MultiBinding.Converter> |
52 | | - <converters:MultiPageEqualsConverter/> |
53 | | - </MultiBinding.Converter> |
54 | | - <Binding Path="Page" Mode="OneWay"/> |
55 | | - <Binding Path="DataContext.CurrentVisiblePage" RelativeSource="{RelativeSource AncestorType=Window}" Mode="OneWay"/> |
56 | | - </MultiBinding> |
57 | | - </local:MainWindowNavigationItem.IsChecked> |
58 | | - </local:MainWindowNavigationItem> |
| 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}"/> |
59 | 43 | </ItemContainerTemplate> |
60 | 44 | </ItemsControl.ItemTemplate> |
61 | 45 | </ItemsControl> |
62 | | - <TextBlock x:Name="tbContentTitle" Grid.Column="1" FontSize="22" FontWeight="Bold" Text="{Binding Content.Title, ElementName=frContent}"/> |
| 46 | + <local:MainWindowNavigationItem Content="Login" ExtraNavigationInformation="" Click="Login_Click"/> |
| 47 | + </StackPanel> |
| 48 | + <TextBlock x:Name="tbContentTitle" Grid.Column="1" FontSize="22" FontWeight="Bold" Text="{Binding Title}"/> |
63 | 49 | <ScrollViewer Grid.Column="1" Grid.Row="1" VerticalScrollBarVisibility="Auto" > |
64 | | - <Frame x:Name="frContent" Grid.Column="1" Grid.Row="1" NavigationUIVisibility="Hidden" Source="{Binding CurrentVisiblePage, Mode=TwoWay}"/> |
| 50 | + <Frame x:Name="frContent" Grid.Column="1" Grid.Row="1" NavigationUIVisibility="Hidden" Navigated="frContent_Navigated" Source="{Binding CurrentVisiblePage}"/> |
65 | 51 | </ScrollViewer> |
66 | 52 | </Grid> |
67 | 53 | </Window> |
0 commit comments