Skip to content

Commit

Permalink
Kbridge master update to winui2.4
Browse files Browse the repository at this point in the history
Update to WinUI 2.4
  • Loading branch information
Karl-Bridge-Microsoft committed Jun 19, 2020
1 parent e50dbac commit d17e221
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 13 deletions.
8 changes: 7 additions & 1 deletion README.md
Expand Up @@ -17,7 +17,7 @@ statusNotificationTargets:

A mini-app for retrieving RSS feeds and viewing articles, showing MVVM and design best practices.
Users can specify the URL of a feed, view articles in a WebView control, and save favorite articles to local storage.
This sample runs on the Universal Windows Platform (UWP).
This sample runs on the Universal Windows Platform (UWP) and WinUI 2.4.

> Note - This sample is targeted and tested for Windows 10, version 2004 (10.0; Build 19041), and Visual Studio 2019. If you prefer, you can use project properties to retarget the project(s) to Windows 10, version 1903 (10.0; Build 18362).
Expand All @@ -38,6 +38,12 @@ RssReader demonstrates:
restore app data from local storage.
* C# and XAML using the MVVM design pattern.

### June 2020 update

This update includes:

* Refactoring for WinUI 2.4 controls, specifically [ProgressBar](https://docs.microsoft.com/windows/uwp/design/controls-and-patterns/progress-controls).

### September 2016 update

This update includes:
Expand Down
5 changes: 5 additions & 0 deletions RssReader/App.xaml
Expand Up @@ -34,6 +34,11 @@
<ResourceDictionary>
<common:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
<ResourceDictionary.MergedDictionaries>
<!--
Required for WinUI controls and features.
See http://aka.ms/winui for more information.
-->
<XamlControlsResources xmlns="using:Microsoft.UI.Xaml.Controls" />
<!--
Styles that define common aspects of the platform look and feel
Required by Visual Studio project and item templates
Expand Down
7 changes: 5 additions & 2 deletions RssReader/RSSReader.csproj
Expand Up @@ -11,7 +11,7 @@
<AssemblyName>RssReader</AssemblyName>
<DefaultLanguage>en-US</DefaultLanguage>
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
<TargetPlatformVersion>10.0.19569.0</TargetPlatformVersion>
<TargetPlatformVersion>10.0.19041.0</TargetPlatformVersion>
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
<MinimumVisualStudioVersion>14</MinimumVisualStudioVersion>
<EnableDotNetNativeCompatibleProfile>true</EnableDotNetNativeCompatibleProfile>
Expand Down Expand Up @@ -244,7 +244,10 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform">
<Version>5.0.0</Version>
<Version>6.2.10</Version>
</PackageReference>
<PackageReference Include="Microsoft.UI.Xaml">
<Version>2.4.2</Version>
</PackageReference>
</ItemGroup>
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '14.0' ">
Expand Down
5 changes: 3 additions & 2 deletions RssReader/Styles/Styles.xaml
Expand Up @@ -24,7 +24,8 @@

<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:RssReader">
xmlns:local="using:RssReader"
xmlns:MUXC="using:Microsoft.UI.Xaml.Controls">

<ResourceDictionary.ThemeDictionaries>

Expand Down Expand Up @@ -2320,7 +2321,7 @@
</Style>

<Style x:Key="ProgressBarStyle1"
TargetType="ProgressBar">
TargetType="MUXC:ProgressBar">
<Setter Property="Foreground"
Value="{ThemeResource Foreground100IndianRedBrush}" />
<Setter Property="Background"
Expand Down
3 changes: 2 additions & 1 deletion RssReader/Views/AddFeedView.xaml
Expand Up @@ -31,6 +31,7 @@
xmlns:controls="using:RssReader.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:MUXC="using:Microsoft.UI.Xaml.Controls"
mc:Ignorable="d">

<Page.Resources>
Expand Down Expand Up @@ -88,7 +89,7 @@
Style="{StaticResource TextBoxStyle1}" />

<!--Waiting for response message-->
<ProgressBar Grid.Row="1"
<MUXC:ProgressBar Grid.Row="1"
Margin="24, 0"
IsIndeterminate="True"
Visibility="{x:Bind ViewModel.CurrentFeed.IsLoading, Mode=OneWay, Converter={StaticResource BooleanToVisibilityConverter}}"
Expand Down
3 changes: 2 additions & 1 deletion RssReader/Views/DetailPage.xaml
Expand Up @@ -28,6 +28,7 @@
xmlns:local="using:RssReader.Views"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:MUXC="using:Microsoft.UI.Xaml.Controls"
mc:Ignorable="d"
x:Name="PageRoot"
NavigationCacheMode="Enabled"
Expand All @@ -42,7 +43,7 @@
</Page.Transitions>

<Grid>
<ProgressBar Margin="24,8"
<MUXC:ProgressBar Margin="24,8"
IsIndeterminate="True"
Style="{ThemeResource ProgressBarStyle1}" />
<WebView x:Name="ArticleWebView"
Expand Down
12 changes: 7 additions & 5 deletions RssReader/Views/FeedView.xaml
Expand Up @@ -32,6 +32,7 @@
xmlns:vm="using:RssReader.ViewModels"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:MUXC="using:Microsoft.UI.Xaml.Controls"
mc:Ignorable="d">

<Page.Resources>
Expand Down Expand Up @@ -229,10 +230,11 @@
VerticalAlignment="Bottom"
Fill="{ThemeResource Border100PaleRoseBrush}" />

<ProgressBar Grid.Row="1"
Margin="24,8"
IsIndeterminate="True"
Style="{ThemeResource ProgressBarStyle1}" />
<MUXC:ProgressBar Grid.Row="1"
Margin="24,8"
IsIndeterminate="True"
Style="{ThemeResource ProgressBarStyle1}" />

</Grid>

</Grid>
Expand Down Expand Up @@ -282,7 +284,7 @@
HorizontalAlignment="Stretch"
Fill="{ThemeResource Border100PaleRoseBrush}" />

<ProgressBar Visibility="{x:Bind ViewModel.CurrentFeed.IsLoadingAndNotEmpty, Mode=OneWay, Converter={StaticResource BooleanToVisibilityConverter}}"
<MUXC:ProgressBar Visibility="{x:Bind ViewModel.CurrentFeed.IsLoadingAndNotEmpty, Mode=OneWay, Converter={StaticResource BooleanToVisibilityConverter}}"
Margin="24,1,24,0"
Grid.Row="2"
IsIndeterminate="True"
Expand Down
3 changes: 2 additions & 1 deletion RssReader/Views/MasterDetailPage.xaml
Expand Up @@ -28,6 +28,7 @@
xmlns:local="using:RssReader.Views"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:MUXC="using:Microsoft.UI.Xaml.Controls"
mc:Ignorable="d"
NavigationCacheMode="Required"
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
Expand Down Expand Up @@ -69,7 +70,7 @@

<Frame x:Name="MasterFrame" />

<ProgressBar x:Name="LoadingProgressBar"
<MUXC:ProgressBar x:Name="LoadingProgressBar"
Visibility="Collapsed"
Grid.Column="1"
Margin="24,8"
Expand Down

0 comments on commit d17e221

Please sign in to comment.