|
4 | 4 | xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
5 | 5 | xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
6 | 6 | xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
| 7 | + xmlns:Localisation="clr-namespace:Shared.Ui.Common;assembly=Shared.Ui" |
7 | 8 | xmlns:Updater="clr-namespace:AssetEditor.Views.Updater" |
8 | 9 | xmlns:MdXaml="clr-namespace:MdXaml;assembly=MdXaml" |
9 | 10 | xmlns:ViewModels="clr-namespace:AssetEditor.ViewModels" |
|
13 | 14 | Closed="OnClosed" |
14 | 15 | ResizeMode="NoResize" |
15 | 16 | WindowStartupLocation="CenterScreen" |
16 | | - Height="545" |
17 | | - Width="800" |
18 | | - Title="Asset Editor Updater"> |
| 17 | + SizeToContent="Height" |
| 18 | + Width="1000" |
| 19 | + Title="{Localisation:Loc UpdaterWindow.Title}"> |
19 | 20 |
|
20 | 21 | <Grid |
21 | 22 | Margin="15, 15, 15, 15"> |
|
29 | 30 | Height="Auto"/> |
30 | 31 | <RowDefinition |
31 | 32 | Height="Auto"/> |
32 | | - <RowDefinition |
33 | | - Height="Auto"/> |
34 | 33 | </Grid.RowDefinitions> |
35 | 34 |
|
36 | 35 | <TextBlock |
37 | 36 | Grid.Row="0" |
38 | | - Text="{Binding LatestVersionInfo}" |
| 37 | + Text="{Binding UpdateInfo}" |
| 38 | + Margin="0, 0, 0, 20" |
39 | 39 | FontSize="14"/> |
40 | 40 |
|
41 | 41 | <TextBlock |
42 | 42 | Grid.Row="1" |
43 | | - Text="Release Notes" |
| 43 | + Text="{Localisation:Loc UpdaterWindow.ReleaseNotes}" |
| 44 | + Margin="0, 0, 0, 10" |
44 | 45 | FontSize="20" |
45 | 46 | FontWeight="SemiBold"/> |
46 | 47 |
|
47 | | - <Border |
| 48 | + <ScrollViewer |
48 | 49 | Grid.Row="2" |
49 | | - BorderThickness="1" |
50 | | - BorderBrush="{DynamicResource App.Border}" |
51 | | - Margin="0, 10, 0, 0" |
52 | | - Height="300"> |
53 | | - |
54 | | - <ScrollViewer |
55 | | - VerticalScrollBarVisibility="Auto" |
56 | | - Padding="10, 10, 10, 10"> |
57 | | - |
58 | | - <ItemsControl |
59 | | - ItemsSource="{Binding ReleaseNotesItems}"> |
60 | | - <ItemsControl.ItemTemplate> |
61 | | - <DataTemplate> |
62 | | - <Border |
63 | | - Padding="0, 0, 0, 20"> |
64 | | - <StackPanel> |
| 50 | + VerticalScrollBarVisibility="Auto" |
| 51 | + MaxHeight="400" |
| 52 | + Padding="0"> |
65 | 53 |
|
66 | | - <TextBlock |
67 | | - Text="{Binding ReleaseName}" |
68 | | - FontSize="18" |
69 | | - FontWeight="SemiBold"/> |
| 54 | + <ItemsControl |
| 55 | + ItemsSource="{Binding ReleaseNotesItems}"> |
| 56 | + <ItemsControl.ItemTemplate> |
| 57 | + <DataTemplate> |
| 58 | + <Border |
| 59 | + BorderThickness="1" |
| 60 | + BorderBrush="{DynamicResource App.Border}" |
| 61 | + Margin="0, 0, 10, 10" |
| 62 | + Padding="20, 10, 10, 20"> |
70 | 63 |
|
71 | | - <TextBlock |
72 | | - Margin="0,4,0,12" |
73 | | - Text="{Binding PublishedAt}" |
74 | | - FontSize="14"/> |
| 64 | + <!-- Disable VerticalScrollBarVisibility as we don't won't loads of mini scroll viewers... --> |
| 65 | + <StackPanel> |
| 66 | + <MdXaml:MarkdownScrollViewer |
| 67 | + Markdown="{Binding ReleaseName}" |
| 68 | + VerticalScrollBarVisibility="Disabled" |
| 69 | + ClickAction="OpenBrowser" |
| 70 | + MarkdownStyle="{StaticResource CustomMarkdownStyle}" |
| 71 | + PreviewMouseWheel="OnMarkdownScrollViewerPreviewMouseWheel"/> |
75 | 72 |
|
76 | | - <!-- Disable VerticalScrollBarVisibility as we don't won't loads of mini scroll viewers... --> |
77 | | - <MdXaml:MarkdownScrollViewer |
78 | | - Markdown="{Binding ReleaseNotes}" |
79 | | - VerticalAlignment="Stretch" |
80 | | - HorizontalAlignment="Stretch" |
81 | | - VerticalScrollBarVisibility="Disabled" |
82 | | - PreviewMouseWheel="OnMarkdownScrollViewerPreviewMouseWheel"> |
| 73 | + <MdXaml:MarkdownScrollViewer |
| 74 | + Markdown="{Binding PublishedAt}" |
| 75 | + VerticalScrollBarVisibility="Disabled" |
| 76 | + MarkdownStyle="{StaticResource CustomMarkdownStyle}" |
| 77 | + PreviewMouseWheel="OnMarkdownScrollViewerPreviewMouseWheel"/> |
83 | 78 |
|
84 | | - <MdXaml:MarkdownScrollViewer.Resources> |
85 | | - <Style |
86 | | - TargetType="{x:Type List}"> |
87 | | - <Setter |
88 | | - Property="FontSize" |
89 | | - Value="14"/> |
90 | | - </Style> |
91 | | - </MdXaml:MarkdownScrollViewer.Resources> |
92 | | - </MdXaml:MarkdownScrollViewer> |
93 | | - </StackPanel> |
94 | | - </Border> |
95 | | - </DataTemplate> |
96 | | - </ItemsControl.ItemTemplate> |
97 | | - </ItemsControl> |
98 | | - </ScrollViewer> |
99 | | - </Border> |
| 79 | + <MdXaml:MarkdownScrollViewer |
| 80 | + Markdown="{Binding ReleaseNotes}" |
| 81 | + VerticalAlignment="Stretch" |
| 82 | + HorizontalAlignment="Stretch" |
| 83 | + VerticalScrollBarVisibility="Disabled" |
| 84 | + MarkdownStyle="{StaticResource CustomMarkdownStyle}" |
| 85 | + PreviewMouseWheel="OnMarkdownScrollViewerPreviewMouseWheel" |
| 86 | + Loaded="OnMarkdownScrollViewerLoaded"/> |
| 87 | + </StackPanel> |
| 88 | + </Border> |
| 89 | + </DataTemplate> |
| 90 | + </ItemsControl.ItemTemplate> |
| 91 | + </ItemsControl> |
| 92 | + </ScrollViewer> |
100 | 93 |
|
101 | 94 | <StackPanel |
102 | | - Grid.Row="3" |
| 95 | + Grid.Row="3" |
103 | 96 | Orientation="Horizontal" |
104 | 97 | HorizontalAlignment="Right" |
105 | | - Margin="10, 10, 0, 10"> |
| 98 | + Margin="10, 10, 0, 0"> |
106 | 99 |
|
107 | 100 | <Button |
108 | | - Content="Update" |
| 101 | + Content="{Localisation:Loc UpdaterWindow.UpdateButton}" |
109 | 102 | Width="75" |
110 | 103 | Height="25" |
111 | 104 | Margin="0, 0, 5, 0" |
112 | 105 | Command="{Binding UpdateCommand}"/> |
113 | 106 |
|
114 | 107 | <Button |
115 | | - Content="Cancel" |
| 108 | + Content="{Localisation:Loc UpdaterWindow.CancelButton}" |
116 | 109 | Width="75" |
117 | 110 | Margin="5, 0, 0, 0" |
118 | 111 | Command="{Binding CloseWindowActionCommand}"/> |
|
0 commit comments