|
63 | 63 | </StackPanel> |
64 | 64 |
|
65 | 65 | <StackPanel Visibility="{Binding NotesSectionVisibility}"> |
66 | | - <TabControl Margin="0,15,0,0" ItemsSource="{Binding CurrentGameNotes.Notes}" |
| 66 | + <TabControl x:Name="NotesTabControl" Margin="0,15,0,0" ItemsSource="{Binding CurrentGameNotes.Notes}" |
67 | 67 | SelectionChanged="TabControl_SelectionChanged" |
68 | 68 | SelectedItem="{Binding SelectedNotes}"> |
69 | 69 | <TabControl.ItemTemplate> |
|
73 | 73 | </TabControl.ItemTemplate> |
74 | 74 | <TabControl.ContentTemplate> |
75 | 75 | <DataTemplate> |
76 | | - |
77 | | - </DataTemplate> |
78 | | - </TabControl.ContentTemplate> |
79 | | - </TabControl> |
80 | | - |
81 | | - <mdxam:MarkdownScrollViewer x:Name="NotesRenderer" Margin="0,10,0,0" |
| 76 | + <mdxam:MarkdownScrollViewer x:Name="NotesRenderer" Margin="0,10,0,0" |
82 | 77 | Engine="{StaticResource MdEngine}" |
83 | 78 | FontSize="{DynamicResource FontSize}" |
84 | 79 | FontFamily="{DynamicResource FontFamily}" |
85 | 80 | Foreground="{DynamicResource TextBrush}" |
86 | | - VerticalAlignment="Stretch" |
87 | | - HorizontalAlignment="Stretch" |
88 | | - MarkdownStyle="{Binding Settings.MarkdownStyle}" |
89 | | - Markdown="{Binding SelectedNotes.Text, Mode=OneWay, Converter={StaticResource MarkdownUnescapeConverter}}"> |
90 | | - <mdxam:MarkdownScrollViewer.Style> |
91 | | - <Style TargetType="mdxam:MarkdownScrollViewer"> |
92 | | - <Style.Triggers> |
93 | | - <DataTrigger Binding="{Binding ExpandNotes}" Value="False"> |
94 | | - <Setter Property="MaxHeight" Value="400" /> |
95 | | - </DataTrigger> |
96 | | - </Style.Triggers> |
97 | | - </Style> |
98 | | - </mdxam:MarkdownScrollViewer.Style> |
99 | | - </mdxam:MarkdownScrollViewer> |
100 | | - |
| 81 | + VerticalAlignment="Stretch" |
| 82 | + HorizontalAlignment="Stretch" |
| 83 | + MarkdownStyle="{Binding ElementName=NotesTabControl, Path=DataContext.Settings.MarkdownStyle}" |
| 84 | + Markdown="{Binding Text, Mode=OneWay, Converter={StaticResource MarkdownUnescapeConverter}}"> |
| 85 | + <mdxam:MarkdownScrollViewer.Style> |
| 86 | + <Style TargetType="mdxam:MarkdownScrollViewer"> |
| 87 | + <Style.Triggers> |
| 88 | + <DataTrigger Binding="{Binding ElementName=NotesTabControl, Path=DataContext.ExpandNotes}" Value="False"> |
| 89 | + <Setter Property="MaxHeight" Value="400" /> |
| 90 | + </DataTrigger> |
| 91 | + </Style.Triggers> |
| 92 | + </Style> |
| 93 | + </mdxam:MarkdownScrollViewer.Style> |
| 94 | + </mdxam:MarkdownScrollViewer> |
| 95 | + </DataTemplate> |
| 96 | + </TabControl.ContentTemplate> |
| 97 | + </TabControl> |
| 98 | + |
101 | 99 | <Grid Margin="0,10,0,0"> |
102 | 100 | <Grid.ColumnDefinitions> |
103 | 101 | <ColumnDefinition Width="*" /> |
|
0 commit comments