Skip to content

Commit

Permalink
Merge pull request #5220 from unoplatform/mergify/bp/release/stable/3…
Browse files Browse the repository at this point in the history
….5/pr-5216

WinUI3 preview update (bp #5216)
  • Loading branch information
jeromelaban authored Feb 12, 2021
2 parents 93ae29c + f47e70f commit 331aaa6
Show file tree
Hide file tree
Showing 35 changed files with 180 additions and 138 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:UITests.Windows_Media"
xmlns:not_mux="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:valueConverters="using:UITests.ValueConverters"
mc:Ignorable="d"
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
<StackPanel>
<MediaPlayerElement x:Name="playbaby"
<not_mux:MediaPlayerElement x:Name="playbaby"
Source="{x:Bind ToMediaPlaybackItem(SoundToPlay)}"
AreTransportControlsEnabled="True"
Visibility="Visible"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<UserControl x:Class="UITests.Shared.Windows_UI_Xaml_Controls.MediaPlayerElement.MediaPlayerElement_3gp_Extension"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:not_mux="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="">

<MediaPlayerElement Source="http://mirrors.standaloneinstaller.com/video-sample/jellyfish-25-mbps-hd-hevc.3gp"
<not_mux:MediaPlayerElement Source="http://mirrors.standaloneinstaller.com/video-sample/jellyfish-25-mbps-hd-hevc.3gp"
AreTransportControlsEnabled="True"
AutoPlay="True" />
</UserControl>
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<UserControl x:Class="UITests.Shared.Windows_UI_Xaml_Controls.MediaPlayerElement.MediaPlayerElement_Avi_Extension"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:not_mux="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="">

<MediaPlayerElement Source="http://mirrors.standaloneinstaller.com/video-sample/Panasonic_HDC_TM_700_P_50i.avi"
<not_mux:MediaPlayerElement Source="http://mirrors.standaloneinstaller.com/video-sample/Panasonic_HDC_TM_700_P_50i.avi"
AreTransportControlsEnabled="True"
AutoPlay="True" />
</UserControl>
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<UserControl x:Class="UITests.Shared.Windows_UI_Xaml_Controls.MediaPlayerElement.MediaPlayerElement_Flv_Extension"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:not_mux="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="">

<MediaPlayerElement Source="https://sample-videos.com/video123/flv/360/big_buck_bunny_360p_5mb.flv"
<not_mux:MediaPlayerElement Source="https://sample-videos.com/video123/flv/360/big_buck_bunny_360p_5mb.flv"
AreTransportControlsEnabled="True"
AutoPlay="True" />
</UserControl>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
<UserControl x:Class="UITests.Shared.Windows_UI_Xaml_Controls.MediaPlayerElement.MediaPlayerElement_Full"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
xmlns:not_mux="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="2*" />
</Grid.RowDefinitions>

<MediaPlayerElement x:Name="Mpe"
<not_mux:MediaPlayerElement x:Name="Mpe"
Source="https://bitmovin-a.akamaihd.net/content/sintel/hls/playlist.m3u8"
PosterSource="https://bitmovin-a.akamaihd.net/content/sintel/poster.png"
AreTransportControlsEnabled="{Binding IsChecked, ElementName=AreTransportControlsEnabled}"
Expand Down Expand Up @@ -41,7 +42,7 @@
IsZoomButtonVisible="{Binding IsChecked, ElementName=IsZoomButtonVisible}"
IsZoomEnabled="{Binding IsChecked, ElementName=IsZoomEnabled}" />
</MediaPlayerElement.TransportControls>
</MediaPlayerElement>
</not_mux:MediaPlayerElement>

<ScrollViewer Grid.Row="1"
Margin="10,20">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<UserControl x:Class="UITests.Shared.Windows_UI_Xaml_Controls.MediaPlayerElement.MediaPlayerElement_Minimal"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:not_mux="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

<UserControl.Resources>

<Style TargetType="MediaTransportControls"
<not_mux:Style TargetType="MediaTransportControls"
x:Key="MediaTransportControlsMinimalStyle">
<Setter Property="IsTabStop"
Value="False" />
Expand Down Expand Up @@ -125,17 +126,17 @@
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</not_mux:Style>

</UserControl.Resources>

<MediaPlayerElement Source="https://bitmovin-a.akamaihd.net/content/sintel/hls/playlist.m3u8"
<not_mux:MediaPlayerElement Source="https://bitmovin-a.akamaihd.net/content/sintel/hls/playlist.m3u8"
PosterSource="https://bitmovin-a.akamaihd.net/content/sintel/poster.png"
AreTransportControlsEnabled="True"
AutoPlay="True">
<MediaPlayerElement.TransportControls>
<MediaTransportControls Style="{StaticResource MediaTransportControlsMinimalStyle}" />
</MediaPlayerElement.TransportControls>
</MediaPlayerElement>
</not_mux:MediaPlayerElement>

</UserControl>
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<UserControl x:Class="UITests.Shared.Windows_UI_Xaml_Controls.MediaPlayerElement.MediaPlayerElement_Mkv_Extension"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:not_mux="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="">

<MediaPlayerElement Source="https://sample-videos.com/video123/mkv/720/big_buck_bunny_720p_5mb.mkv"
<not_mux:MediaPlayerElement Source="https://sample-videos.com/video123/mkv/720/big_buck_bunny_720p_5mb.mkv"
AreTransportControlsEnabled="True"
AutoPlay="True" />
</UserControl>
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<UserControl x:Class="UITests.Shared.Windows_UI_Xaml_Controls.MediaPlayerElement.MediaPlayerElement_Mov_Extension"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:not_mux="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="">

<MediaPlayerElement Source="http://file-examples.com/wp-content/uploads/2018/04/file_example_MOV_1280_1_4MB.mov"
<not_mux:MediaPlayerElement Source="http://file-examples.com/wp-content/uploads/2018/04/file_example_MOV_1280_1_4MB.mov"
AreTransportControlsEnabled="True"
AutoPlay="True" />
</UserControl>
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<UserControl x:Class="UITests.Shared.Windows_UI_Xaml_Controls.MediaPlayerElement.MediaPlayerElement_Ogg_Extension"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:not_mux="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="">

<MediaPlayerElement Source="http://file-examples.com/wp-content/uploads/2018/04/file_example_OGG_640_2_7mg.ogg"
<not_mux:MediaPlayerElement Source="http://file-examples.com/wp-content/uploads/2018/04/file_example_OGG_640_2_7mg.ogg"
AreTransportControlsEnabled="True"
AutoPlay="True" />
</UserControl>
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<UserControl x:Class="UITests.Shared.Windows_UI_Xaml_Controls.MediaPlayerElement.MediaPlayerElement_Original"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:not_mux="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="">

<MediaPlayerElement Source="http://distribution.bbb3d.renderfarming.net/video/mp4/bbb_sunflower_1080p_30fps_normal.mp4"
<not_mux:MediaPlayerElement Source="http://distribution.bbb3d.renderfarming.net/video/mp4/bbb_sunflower_1080p_30fps_normal.mp4"
AreTransportControlsEnabled="True"
AutoPlay="True" />
</UserControl>
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:UITests.Windows_UI_Xaml_Controls.MediaPlayerElement"
xmlns:not_mux="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
Expand All @@ -22,7 +23,7 @@
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>

<MediaPlayerElement x:Name="Mpe"
<not_mux:MediaPlayerElement x:Name="Mpe"
AreTransportControlsEnabled="True"
AutoPlay="True"
Grid.ColumnSpan="2" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public MediaPlayerElement_Sources()

private void UpdateButton_Click(object sender, RoutedEventArgs e)
{
#if !HAS_UNO_WINUI
var uri = SourceTextBox.Text;

if (!string.IsNullOrEmpty(uri))
Expand All @@ -39,6 +40,7 @@ private void UpdateButton_Click(object sender, RoutedEventArgs e)
{
Mpe.Source = null;
}
#endif
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:not_mux="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
mc:Ignorable="">

<MediaPlayerElement Source="http://distribution.bbb3d.renderfarming.net/video/mp4/bbb_sunflower_1080p_30fps_normal.mp4"
<not_mux:MediaPlayerElement Source="http://distribution.bbb3d.renderfarming.net/video/mp4/bbb_sunflower_1080p_30fps_normal.mp4"
Stretch="Fill"
AreTransportControlsEnabled="True"
AutoPlay="True" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,16 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<PublishProtocol>FileSystem</PublishProtocol>
<Platform>arm64</Platform>
<RuntimeIdentifier>win10-arm64</RuntimeIdentifier>
<PublishDir>bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\</PublishDir>
<SelfContained>true</SelfContained>
<PublishSingleFile>False</PublishSingleFile>
<PublishReadyToRun>True</PublishReadyToRun>
<PublishProtocol>FileSystem</PublishProtocol>
<Platform>arm64</Platform>
<RuntimeIdentifier>win10-arm64</RuntimeIdentifier>
<PublishDir>bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\</PublishDir>
<SelfContained>true</SelfContained>
<PublishSingleFile>False</PublishSingleFile>
<PublishReadyToRun>True</PublishReadyToRun>
<!--
See https://github.com/microsoft/CsWinRT/issues/373
<PublishTrimmed>True</PublishTrimmed>
-->
</PropertyGroup>
</Project>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,16 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<PublishProtocol>FileSystem</PublishProtocol>
<Platform>x64</Platform>
<RuntimeIdentifier>win10-x64</RuntimeIdentifier>
<PublishDir>bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\</PublishDir>
<SelfContained>true</SelfContained>
<PublishSingleFile>False</PublishSingleFile>
<PublishReadyToRun>True</PublishReadyToRun>
<PublishProtocol>FileSystem</PublishProtocol>
<Platform>x64</Platform>
<RuntimeIdentifier>win10-x64</RuntimeIdentifier>
<PublishDir>bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\</PublishDir>
<SelfContained>true</SelfContained>
<PublishSingleFile>False</PublishSingleFile>
<PublishReadyToRun>True</PublishReadyToRun>
<!--
See https://github.com/microsoft/CsWinRT/issues/373
<PublishTrimmed>True</PublishTrimmed>
-->
</PropertyGroup>
</Project>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,16 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<PublishProtocol>FileSystem</PublishProtocol>
<Platform>x86</Platform>
<RuntimeIdentifier>win10-x86</RuntimeIdentifier>
<PublishDir>bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\</PublishDir>
<SelfContained>true</SelfContained>
<PublishSingleFile>False</PublishSingleFile>
<PublishReadyToRun>True</PublishReadyToRun>
<PublishProtocol>FileSystem</PublishProtocol>
<Platform>x86</Platform>
<RuntimeIdentifier>win10-x86</RuntimeIdentifier>
<PublishDir>bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\publish\</PublishDir>
<SelfContained>true</SelfContained>
<PublishSingleFile>False</PublishSingleFile>
<PublishReadyToRun>True</PublishReadyToRun>
<!--
See https://github.com/microsoft/CsWinRT/issues/373
<PublishTrimmed>True</PublishTrimmed>
-->
</PropertyGroup>
</Project>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@

<ItemGroup>
<PackageReference Include="Microsoft.VCRTForwarders.140" Version="1.0.6" />
<PackageReference Include="Microsoft.WinUI" Version="3.0.0-preview3.201113.0" />
<PackageReference Include="Microsoft.WinUI" Version="3.0.0-preview4.210210.4" />
<Manifest Include="$(ApplicationManifest)" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="1.1.1" />
<PackageReference Include="Microsoft.Extensions.Logging.Filter" Version="1.1.1" />
<PackageReference Include="Uno.Core" Version="2.0.0" />
<PackageReference Include="Uno.Core" Version="2.2.0" />
</ItemGroup>

<Import Project="..\UnoWinUIQuickStart.Shared\UnoWinUIQuickStart.Shared.projitems" Label="Shared" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,6 @@
<PublishProfile>Properties\PublishProfiles\win10-$(Platform).pubxml</PublishProfile>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<SDKReference Include="Microsoft.VCLibs.Desktop, Version=14.0" />
<!-- Needed for ucrtbased.dll when running a debug build. -->
<SDKReference Include="Microsoft.VCLibs, Version=14.0" Condition="'$(Configuration)' == 'Debug'" />
</ItemGroup>
<Import Project="$(WapProjPath)\Microsoft.DesktopBridge.targets" />
<Import Project="$(AppxTargetsLocation)Microsoft.WinUI.AppX.targets" />
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -207,20 +207,23 @@
</Target>

<!--
Add a dependency for the app against VCLibs since it doesn't come with .NET only apps. C++ apps
will already have this dependency, but duplicate referenes are a no-op so there's no need to
condition the dependency.
-->
<ItemGroup Condition="'$(OutputType)' == 'AppContainerExe'">
<SDKReference Include="Microsoft.VCLibs, Version=14.0" />
</ItemGroup>

<!-- Packaged desktop apps need these framework package references -->
<ItemGroup Condition="'$(MSBuildProjectExtension)'=='.wapproj'">
Add a dependency for the app against VCLibs.Desktop, which contains the CRT DLLs that WinUI 3 is linked against. -->
<ItemGroup Condition="'$(OutputType)' == 'Exe' or '$(OutputType)' == 'AppContainerExe' or '$(MSBuildProjectExtension)'=='.wapproj'">
<SDKReference Include="Microsoft.VCLibs.Desktop, Version=14.0" />
<!-- Needed for ucrtbased.dll when running a debug build. -->
<SDKReference Include="Microsoft.VCLibs, Version=14.0" Condition="'$(Configuration)' == 'Debug'" />
<SDKReference Include="Microsoft.UniversalCRT.Debug, Version=$(TargetPlatformVersion)" Condition="'$(Configuration)' == 'Debug'" />
<!-- Needed until Microsoft.ApplicationModel.Resources.dll and Microsoft.Web.WebView2.Core.dll
no longer depend on the _app version of CRT DLLs. -->
<SDKReference Include="Microsoft.VCLibs, Version=14.0" />
</ItemGroup>

<!-- In order to have the Microsoft.UniversalCRT.Debug SDK reference included in the AppX, we need to
set IncludeSDKRedistOutputGroup to true. -->
<Target Name="IncludeSDKRedistOutputGroup" BeforeTargets="GetPackagingOutputs" Condition="('$(OutputType)' == 'AppContainerExe' or '$(MSBuildProjectExtension)'=='.wapproj') and '$(Configuration)' == 'Debug'">
<PropertyGroup>
<IncludeSDKRedistOutputGroup>true</IncludeSDKRedistOutputGroup>
</PropertyGroup>
</Target>

<!--
WindowsAppContainer is the property that you can set in your .NET Desktop project to turn it into a UWP.
Expand All @@ -234,4 +237,16 @@
</ProjectReferenceWithExtraMetadata>
</ItemGroup>
</Target>

<!-- NuGet restore is now supported for wapproj files, so we need to supply an AssetTargetFallback value
in order for that not to raise an error. -->
<PropertyGroup Condition="'$(MSBuildProjectExtension)' == '.wapproj'">
<AssetTargetFallback>net5.0-windows$(TargetPlatformVersion)</AssetTargetFallback>
</PropertyGroup>

<!-- See https://github.com/microsoft/CsWinRT/issues/373 -->
<Target Name="ValidateNoPublishTrimmed" BeforeTargets="PrepareForBuild" Condition="'$(PublishTrimmed)'=='true'">
<Error Text="Publishing with IL trimming is not yet supported."/>
</Target>

</Project>
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<!-- Copyright (c) Microsoft Corporation. All Rights Reserved. -->
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:not_mux="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<ResourceDictionary.ThemeDictionaries>
<ResourceDictionary x:Key="Default">
Expand All @@ -20,9 +21,9 @@
</ResourceDictionary>
</ResourceDictionary.ThemeDictionaries>

<Style TargetType="MediaTransportControls" BasedOn="{StaticResource DefaultMediaTransportControlsStyle}" />
<not_mux:Style TargetType="MediaTransportControls" BasedOn="{StaticResource DefaultMediaTransportControlsStyle}" />

<Style x:Key="DefaultMediaTransportControlsStyle" TargetType="MediaTransportControls">
<not_mux:Style x:Key="DefaultMediaTransportControlsStyle" TargetType="MediaTransportControls">
<Setter Property="IsTabStop" Value="False" />
<Setter Property="Background" Value="Transparent" />
<Setter Property="FlowDirection" Value="LeftToRight" />
Expand Down Expand Up @@ -877,5 +878,5 @@
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</not_mux:Style>
</ResourceDictionary>
Loading

0 comments on commit 331aaa6

Please sign in to comment.