Skip to content

Commit

Permalink
Merge pull request #27 from DinoChan/add_windows10_style
Browse files Browse the repository at this point in the history
新增Windows 10的update样式
  • Loading branch information
DinoChan authored Dec 22, 2021
2 parents 76ceaa3 + 8487517 commit 6eeb4c6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Loaf/Windows11UpdateView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">

<Grid>
<Grid x:Name="Root">
<Grid>
<Grid.Resources>
<Style TargetType="ProgressRing">
Expand Down
4 changes: 3 additions & 1 deletion Loaf/Windows11UpdateView.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
using System.Threading.Tasks;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI;

// To learn more about WinUI, the WinUI project structure,
// and more about our project templates, see: http://aka.ms/winui-project-info.
Expand All @@ -30,7 +31,8 @@ public Windows11UpdateView()
Unloaded += Windows11UpdateView_Unloaded;
this.KeyDown += Windows11UpdateView_KeyDown;
this.PointerReleased += Windows11UpdateView_PointerReleased;

if (Environment.OSVersion.Version.Build < 22000)
Root.Background = new SolidColorBrush(Color.FromArgb(255, 0, 109, 174));
}

private void Windows11UpdateView_PointerReleased(object sender, PointerRoutedEventArgs e)
Expand Down

0 comments on commit 6eeb4c6

Please sign in to comment.