@@ -30,63 +30,71 @@ public SoftwareUpdateControl(
3030 Orientation = Orientation . Horizontal ;
3131 Children . AddRange (
3232 [
33- new TextBlock
33+ new StackPanel
3434 {
35- Inlines =
36- [
37- new Run
38- {
39- [ ! Run . TextProperty ] = new FormattedDynamicResourceKey (
40- LocaleKey . Settings_Common_SoftwareUpdate_TextBlock_Run1_Text ,
41- new DirectResourceKey ( softwareUpdater . CurrentVersion . ToString ( 3 ) ) ) . ToBinding ( )
42- } ,
43- new LineBreak ( ) ,
44- new Run
35+ Children =
36+ {
37+ new TextBlock
4538 {
46- [ ! Run . TextProperty ] = new DynamicResourceKey ( LocaleKey . Settings_Common_SoftwareUpdate_TextBlock_Run2_Text ) . ToBinding ( )
39+ [ ! TextBlock . TextProperty ] = new FormattedDynamicResourceKey (
40+ LocaleKey . Settings_Common_SoftwareUpdate_TextBlock_Run1_Text ,
41+ new DirectResourceKey ( softwareUpdater . CurrentVersion . ToString ( 3 ) ) )
42+ . ToBinding ( )
4743 } ,
48- new Run
44+ new StackPanel
4945 {
50- [ ! Run . TextProperty ] = new Binding
46+ Orientation = Orientation . Horizontal ,
47+ Children =
5148 {
52- Path = $ "{ nameof ( Settings . Common ) } .{ nameof ( Settings . Common . LastUpdateCheckTime ) } ",
53- Source = settings ,
54- Converter = CommonConverters . DateTimeOffsetToString ,
55- ConverterParameter = "G" ,
56- Mode = BindingMode . OneWay
49+ new TextBlock
50+ {
51+ [ ! TextBlock . TextProperty ] =
52+ new DynamicResourceKey ( LocaleKey . Settings_Common_SoftwareUpdate_TextBlock_Run2_Text ) . ToBinding ( )
53+ } ,
54+ new TextBlock
55+ {
56+ [ ! TextBlock . TextProperty ] = new Binding
57+ {
58+ Path = $ "{ nameof ( Settings . Common ) } .{ nameof ( Settings . Common . LastUpdateCheckTime ) } ",
59+ Source = settings ,
60+ Converter = CommonConverters . DateTimeOffsetToString ,
61+ ConverterParameter = "G" ,
62+ Mode = BindingMode . OneWay
63+ }
64+ } ,
5765 }
5866 } ,
59- new LineBreak ( ) ,
60- new InlineUIContainer
67+ new Button
6168 {
62- Child = new Button
69+ Classes = { "Ghost" } ,
70+ HorizontalAlignment = HorizontalAlignment . Left ,
71+ Content = new TextBlock
6372 {
64- Classes = { "Ghost" } ,
65- Content = new TextBlock
66- {
67- Inlines =
68- [
69- new Run
70- {
71- TextDecorations = TextDecorations . Underline ,
72- [ ! TextElement . ForegroundProperty ] = new DynamicResourceExtension ( "InfoColor" ) ,
73- [ ! Run . TextProperty ] = new DynamicResourceKey (
74- LocaleKey . Settings_Common_SoftwareUpdate_TextBlock_ReleaseNotes_Text ) . ToBinding ( )
75- }
76- ]
77- } ,
78- Command = new AsyncRelayCommand ( ( ) =>
79- ServiceLocator . Resolve < ILauncher > ( )
80- . LaunchUriAsync ( new Uri ( "https://github.com/DearVa/Everywhere/releases" , UriKind . Absolute ) )
81- ) ,
82- CornerRadius = new CornerRadius ( 1 ) ,
83- Height = double . NaN ,
84- MinHeight = 0 ,
85- Padding = new Thickness ( ) ,
86- }
87- }
88- ] ,
89- VerticalAlignment = VerticalAlignment . Center ,
73+ Inlines =
74+ [
75+ new Run
76+ {
77+ TextDecorations = TextDecorations . Underline ,
78+ [ ! TextElement . ForegroundProperty ] = new DynamicResourceExtension ( "InfoColor" ) ,
79+ [ ! Run . TextProperty ] = new DynamicResourceKey (
80+ LocaleKey . Settings_Common_SoftwareUpdate_TextBlock_ReleaseNotes_Text )
81+ . ToBinding ( )
82+ }
83+ ]
84+ } ,
85+ Command = new AsyncRelayCommand ( ( ) =>
86+ ServiceLocator . Resolve < ILauncher > ( )
87+ . LaunchUriAsync (
88+ new Uri (
89+ "https://github.com/DearVa/Everywhere/releases" ,
90+ UriKind . Absolute ) )
91+ ) ,
92+ CornerRadius = new CornerRadius ( 1 ) ,
93+ Height = double . NaN ,
94+ MinHeight = 0 ,
95+ Padding = new Thickness ( ) ,
96+ } ,
97+ }
9098 } ,
9199 new Button
92100 {
0 commit comments