Updated to ProjectReunion 0.5.
This commit is contained in:
Родитель
a843214d13
Коммит
eaa1e9bf6d
|
@ -19,9 +19,9 @@
|
|||
<ShouldAddWinUI>False</ShouldAddWinUI>
|
||||
<UseWinUI Condition="'$(IsUwpProject)'== 'true' or '$(IsDesignProject)' == 'true' or '$(IsSampleProject)' == 'true' or '$(IsTestProject)' == 'true'">true</UseWinUI>
|
||||
<TargetPlatformRevision>18362</TargetPlatformRevision>
|
||||
<TargetPlatformMinRevision>17134</TargetPlatformMinRevision>
|
||||
<TargetPlatformMinRevision>17763</TargetPlatformMinRevision>
|
||||
<SupportedOSPlatformVersion>10.0.$(TargetPlatformMinRevision).0</SupportedOSPlatformVersion>
|
||||
<MicrosoftWinUIVersion>3.0.0-preview4.210210.4</MicrosoftWinUIVersion>
|
||||
<MicrosoftProjectReunionVersion>0.5.0-prerelease</MicrosoftProjectReunionVersion>
|
||||
<PackageOutputPath>$(MSBuildThisFileDirectory)bin\nupkg</PackageOutputPath>
|
||||
<!-- Remove after https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/3285 is merged, as this is already in our .editorconfig -->
|
||||
<NoWarn>SA1101;SA1633;SA1202;SA1600;SA1413;SA1611;SA1629;SA1201;SA1309;SA1310;SA1602</NoWarn>
|
||||
|
|
|
@ -58,14 +58,7 @@ namespace Microsoft.Toolkit.Uwp.Input.GazeInteraction
|
|||
|
||||
if (peer == null)
|
||||
{
|
||||
if (element is PivotHeaderItem)
|
||||
{
|
||||
item = new PivotItemGazeTargetItem(element);
|
||||
}
|
||||
else
|
||||
{
|
||||
item = GazePointer.Instance.NonInvokeGazeTargetItem;
|
||||
}
|
||||
item = GazePointer.Instance.NonInvokeGazeTargetItem;
|
||||
}
|
||||
else if (peer.GetPattern(PatternInterface.Invoke) is IInvokeProvider)
|
||||
{
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<Description>A library to integrate gaze interactions using eye trackers into UWP applications</Description>
|
||||
<PackageTags>UWP Toolkit Windows Eye Gaze EyeTracker</PackageTags>
|
||||
<TargetPlatformVersion>10.0.18362.0</TargetPlatformVersion>
|
||||
<TargetPlatformMinVersion>10.0.17134.0</TargetPlatformMinVersion>
|
||||
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
@ -1,37 +0,0 @@
|
|||
// Licensed to the .NET Foundation under one or more agreements.
|
||||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using Microsoft.UI.Xaml;
|
||||
using Microsoft.UI.Xaml.Controls;
|
||||
using Microsoft.UI.Xaml.Controls.Primitives;
|
||||
using Microsoft.UI.Xaml.Media;
|
||||
|
||||
namespace Microsoft.Toolkit.Uwp.Input.GazeInteraction
|
||||
{
|
||||
internal class PivotItemGazeTargetItem : GazeTargetItem
|
||||
{
|
||||
internal PivotItemGazeTargetItem(UIElement element)
|
||||
: base(element)
|
||||
{
|
||||
}
|
||||
|
||||
internal override void Invoke()
|
||||
{
|
||||
var headerItem = (PivotHeaderItem)TargetElement;
|
||||
var headerPanel = (PivotHeaderPanel)VisualTreeHelper.GetParent(headerItem);
|
||||
int index = headerPanel.Children.IndexOf(headerItem);
|
||||
|
||||
DependencyObject walker = headerPanel;
|
||||
Pivot pivot;
|
||||
do
|
||||
{
|
||||
walker = VisualTreeHelper.GetParent(walker);
|
||||
pivot = walker as Pivot;
|
||||
}
|
||||
while (pivot == null);
|
||||
|
||||
pivot.SelectedIndex = index;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -36,12 +36,11 @@
|
|||
<Import Project="$(WapProjPath)\Microsoft.DesktopBridge.props" />
|
||||
<PropertyGroup>
|
||||
<ProjectGuid>c1216b01-7c56-48c2-b1ad-50d9dabac37b</ProjectGuid>
|
||||
<TargetPlatformVersion>10.0.18362.0</TargetPlatformVersion>
|
||||
<TargetPlatformMinVersion>10.0.17134.0</TargetPlatformMinVersion>
|
||||
<TargetPlatformVersion>10.0.19041.0</TargetPlatformVersion>
|
||||
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
|
||||
<DefaultLanguage>en-US</DefaultLanguage>
|
||||
<AppxPackageSigningEnabled>false</AppxPackageSigningEnabled>
|
||||
<AppxTargetsLocation Condition="'$(AppxTargetsLocation)'==''">$(MSBuildThisFileDirectory)build\</AppxTargetsLocation>
|
||||
<EntryPointProjectUniqueName>..\Microsoft.Toolkit.Uwp.SampleApp\Microsoft.Toolkit.Uwp.SampleApp.csproj</EntryPointProjectUniqueName>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<AppxManifest Include="Package.appxmanifest">
|
||||
|
@ -125,6 +124,27 @@
|
|||
<Content Include="Images\UWPCommunityToolkitSampleAppWideTile.scale-400.png" />
|
||||
<Content Include="Images\Wide310x150Logo.scale-400.png" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup>
|
||||
<!--PackageReference.GeneratePathProperty does not support NUGET_PACKAGES env var...-->
|
||||
<NuGetPackageRoot Condition="'$(NuGetPackageRoot)'==''">$(NUGET_PACKAGES)</NuGetPackageRoot>
|
||||
<NuGetPackageRoot Condition="'$(NuGetPackageRoot)'==''">$(UserProfile)\.nuget\packages</NuGetPackageRoot>
|
||||
<PkgMicrosoft_ProjectReunion Condition="'$(PkgMicrosoft_ProjectReunion)'==''">$([MSBuild]::NormalizeDirectory('$(NuGetPackageRoot)', 'Microsoft.ProjectReunion', '0.5.0-prerelease'))</PkgMicrosoft_ProjectReunion>
|
||||
<PkgMicrosoft_ProjectReunion Condition="!Exists($(PkgMicrosoft_ProjectReunion))">$(SolutionDir)packages\Microsoft.ProjectReunion.0.5.0-prerelease\</PkgMicrosoft_ProjectReunion>
|
||||
<PkgMicrosoft_ProjectReunion_WinUI Condition="'$(PkgMicrosoft_ProjectReunion_WinUI)'==''">$([MSBuild]::NormalizeDirectory('$(NuGetPackageRoot)', 'Microsoft.ProjectReunion.WinUI', '0.5.0-prerelease'))</PkgMicrosoft_ProjectReunion_WinUI>
|
||||
<PkgMicrosoft_ProjectReunion_WinUI Condition="!Exists($(PkgMicrosoft_ProjectReunion_WinUI))">$(SolutionDir)packages\Microsoft.ProjectReunion.WinUI.0.5.0-prerelease\</PkgMicrosoft_ProjectReunion_WinUI>
|
||||
<Microsoft_ProjectReunion_AppXReference_props>$([MSBuild]::NormalizeDirectory('$(PkgMicrosoft_ProjectReunion)', 'build'))Microsoft.ProjectReunion.AppXReference.props</Microsoft_ProjectReunion_AppXReference_props>
|
||||
<Microsoft_WinUI_AppX_targets>$([MSBuild]::NormalizeDirectory('$(PkgMicrosoft_ProjectReunion_WinUI)', 'build'))Microsoft.WinUI.AppX.targets</Microsoft_WinUI_AppX_targets>
|
||||
<EntryPointProjectUniqueName>..\Microsoft.Toolkit.Uwp.SampleApp\Microsoft.Toolkit.Uwp.SampleApp.csproj</EntryPointProjectUniqueName>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.ProjectReunion" Version="[0.5.0-prerelease]" GeneratePathProperty="true">
|
||||
<ExcludeAssets>all</ExcludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.ProjectReunion.WinUI" Version="[0.5.0-prerelease]" GeneratePathProperty="true">
|
||||
<ExcludeAssets>all</ExcludeAssets>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(WapProjPath)\Microsoft.DesktopBridge.targets" />
|
||||
<Import Project="$(AppxTargetsLocation)Microsoft.WinUI.AppX.targets" />
|
||||
<Import Project="$(Microsoft_ProjectReunion_AppXReference_props)" />
|
||||
<Import Project="$(Microsoft_WinUI_AppX_targets)" />
|
||||
</Project>
|
|
@ -19,8 +19,8 @@
|
|||
</Properties>
|
||||
|
||||
<Dependencies>
|
||||
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.0.0" MaxVersionTested="10.0.0.0" />
|
||||
<TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.17134.0" MaxVersionTested="10.0.17134.0" />
|
||||
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.17763.0" MaxVersionTested="10.0.19041.0" />
|
||||
<TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.17763.0" MaxVersionTested="10.0.19041.0" />
|
||||
</Dependencies>
|
||||
|
||||
<Resources>
|
||||
|
|
|
@ -1,251 +0,0 @@
|
|||
<!--
|
||||
Copyright (c) Microsoft Corporation. Licensed under the MIT License
|
||||
-->
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<!--
|
||||
The _GetPathToWinUIRegistrations target returns the path to where the registrations xml file is.
|
||||
If invoked in the .wapproj, this will invoke the same target on referenced projects, where it will
|
||||
actually return the location to where the file is on disk in the nuget package.
|
||||
-->
|
||||
<Target Name="_GetPathToWinUIRegistrations" Returns="$(WinUIClassRegistrationsDir)">
|
||||
<!--
|
||||
Invoke this target on the referenced project to get the path to where the registration xml is.
|
||||
This way we can pick up the path to the file from the nuget.
|
||||
-->
|
||||
<MSBuild
|
||||
Projects="@(_MSBuildProjectReferenceExistent)"
|
||||
Condition="'$(MSBuildProjectExtension)' == '.wapproj'"
|
||||
Targets="_GetPathToWinUIRegistrations"
|
||||
SkipNonexistentTargets="true">
|
||||
<Output TaskParameter="TargetOutputs" PropertyName="WinUIClassRegistrationsDir" />
|
||||
</MSBuild>
|
||||
|
||||
<PropertyGroup>
|
||||
<!-- If not in the .wapproj, then actually return the path to where the registration list is -->
|
||||
<WinUIClassRegistrationsDir Condition="'$(WinUIClassRegistrationsDir)' == '' and '$(MSBuildProjectExtension)'!='.wapproj'">$(MSBuildThisFileDirectory)</WinUIClassRegistrationsDir>
|
||||
|
||||
<!-- Technically you can have multiple .exe files in a single msix. Just trim the property down to a single value if that is the case -->
|
||||
<WinUIClassRegistrationsDir Condition="$(WinUIClassRegistrationsDir.Contains(';'))">$(WinUIClassRegistrationsDir.Substring(0,$(WinUIClassRegistrationsDir.IndexOf(';'))))</WinUIClassRegistrationsDir>
|
||||
</PropertyGroup>
|
||||
|
||||
<Error Text="Unable to find WinRT class registrations for WinUI. Please ensure that the Microsoft.WinUI package restored successfully."
|
||||
Condition="'$(WinUIClassRegistrationsDir)' == '' and '$(MSBuildProjectExtension)'=='.wapproj'"/>
|
||||
</Target>
|
||||
|
||||
<!-- Replaces AppxManifest WinRT registrations for Microsoft.UI.Xaml.dll, post-GenerateAppxManifest. -->
|
||||
<!-- Target runs before manifest validation occurs. Requires output file to support incremental builds. -->
|
||||
<Target
|
||||
Name="_ReplaceMUXWinRTRegistrations"
|
||||
BeforeTargets="_CreateFinalAppxManifestItem"
|
||||
AfterTargets="_GenerateCurrentProjectAppxManifest"
|
||||
DependsOnTargets="_GetPathToWinUIRegistrations"
|
||||
Inputs="$(MSBuildAllProjects);@(_GenerateCurrentProjectAppxManifestInput)"
|
||||
Outputs="$(FinalAppxManifestName).incremental" >
|
||||
|
||||
<ReplaceMUXWinRTRegistrations
|
||||
FullPathToAppxManifest="$(FinalAppxManifestName)"
|
||||
FullPathToLiftedXAMLWinRTRegistrations="$(WinUIClassRegistrationsDir)LiftedWinRTClassRegistrations.xml"
|
||||
PathToXAMLWinRTImplementations="$(PathToXAMLWinRTImplementations)"
|
||||
/>
|
||||
|
||||
<Touch
|
||||
Files="$(FinalAppxManifestName).incremental"
|
||||
AlwaysCreate="true"
|
||||
/>
|
||||
</Target>
|
||||
|
||||
<UsingTask TaskName="ReplaceMUXWinRTRegistrations" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.Core.dll">
|
||||
<ParameterGroup>
|
||||
<FullPathToAppxManifest ParameterType="System.String" Required="true" />
|
||||
<FullPathToLiftedXAMLWinRTRegistrations ParameterType="System.String" Required="true" />
|
||||
<PathToXAMLWinRTImplementations ParameterType="System.String" />
|
||||
</ParameterGroup>
|
||||
<Task>
|
||||
<Reference Include="System.Xml" />
|
||||
<Using Namespace="System.Xml" />
|
||||
<Using Namespace="System.Reflection" />
|
||||
<Using Namespace="System.Runtime.InteropServices.WindowsRuntime" />
|
||||
<Using Namespace="System.Collections.Generic" />
|
||||
<Code Type="Fragment" Language="cs"><![CDATA[
|
||||
// Load AppxManifest.xml
|
||||
XmlDocument appxManifest = new XmlDocument();
|
||||
appxManifest.Load(FullPathToAppxManifest);
|
||||
|
||||
XmlNamespaceManager namespaceManager = new XmlNamespaceManager(appxManifest.NameTable);
|
||||
namespaceManager.AddNamespace("w", "http://schemas.microsoft.com/appx/manifest/foundation/windows10");
|
||||
|
||||
// If there exists an existing Extensions node, we'll remove any Microsoft.UI.Xaml.dll, Microsoft.Web.WebView2.Core.dll entry in it
|
||||
// and add the correct DLL mapping. Otherwise, if there doesn't, we'll create one and add it.
|
||||
XmlNode extensionsNode = null;
|
||||
|
||||
foreach (XmlNode node in appxManifest.DocumentElement.SelectNodes("//w:Package/w:Extensions", namespaceManager))
|
||||
{
|
||||
extensionsNode = node;
|
||||
break;
|
||||
}
|
||||
|
||||
if (extensionsNode != null)
|
||||
{
|
||||
XmlNodeList xmlNodeList = appxManifest.DocumentElement.SelectNodes("//w:Package/w:Extensions/w:Extension", namespaceManager);
|
||||
|
||||
// Remove "Microsoft.UI.Xaml.dll", "Microsoft.Web.WebView2.Core.dll", and
|
||||
// "Microsoft.ApplicationModel.Resources.dll" registrations from the
|
||||
// AppxManifest file as we will be inserting the entries ourselves
|
||||
foreach (XmlNode node in xmlNodeList)
|
||||
{
|
||||
XmlNode pathNode = node.SelectSingleNode("w:InProcessServer/w:Path", namespaceManager);
|
||||
if (pathNode.InnerText.Equals("Microsoft.UI.Xaml.dll", StringComparison.InvariantCultureIgnoreCase) ||
|
||||
pathNode.InnerText.Equals("Microsoft.Web.WebView2.Core.dll", StringComparison.InvariantCultureIgnoreCase) ||
|
||||
pathNode.InnerText.Equals("Microsoft.ApplicationModel.Resources.dll", StringComparison.InvariantCultureIgnoreCase))
|
||||
{
|
||||
extensionsNode.RemoveChild(node);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
extensionsNode = appxManifest.CreateElement("Extensions", "http://schemas.microsoft.com/appx/manifest/foundation/windows10");
|
||||
appxManifest.DocumentElement.AppendChild(extensionsNode);
|
||||
}
|
||||
|
||||
// Load correct WinRT registration file created during build. These entries have the correct implemetation DLLs.
|
||||
XmlDocument newRegistrations = new XmlDocument();
|
||||
newRegistrations.Load(FullPathToLiftedXAMLWinRTRegistrations);
|
||||
XmlNamespaceManager namespaceManager2 = new XmlNamespaceManager(newRegistrations.NameTable);
|
||||
namespaceManager2.AddNamespace("w", "http://schemas.microsoft.com/appx/manifest/foundation/windows10");
|
||||
XmlNodeList newRegistrationNodes = newRegistrations.DocumentElement.SelectNodes("/w:Data/w:Extension", namespaceManager2);
|
||||
|
||||
// Add entries for all Microsoft.UI.Xaml types in the AppxManifest
|
||||
foreach (XmlNode node in newRegistrationNodes)
|
||||
{
|
||||
// If we have a path to our implementation DLLs, we'll add that here.
|
||||
if (!string.IsNullOrWhiteSpace(PathToXAMLWinRTImplementations))
|
||||
{
|
||||
XmlNode pathNode = node.SelectSingleNode("w:InProcessServer/w:Path", namespaceManager);
|
||||
pathNode.InnerText = PathToXAMLWinRTImplementations + pathNode.InnerText;
|
||||
}
|
||||
XmlNode importNode = extensionsNode.OwnerDocument.ImportNode(node, true);
|
||||
extensionsNode.AppendChild(importNode);
|
||||
}
|
||||
|
||||
// Save the updated AppxManifest.xml file
|
||||
appxManifest.Save(FullPathToAppxManifest);
|
||||
|
||||
]]></Code>
|
||||
</Task>
|
||||
</UsingTask>
|
||||
|
||||
<PropertyGroup>
|
||||
<MSBuildWarningsAsMessages>
|
||||
$(MSBuildWarningsAsMessages);
|
||||
|
||||
<!-- We don't provide an implementation for Microsoft.winmd, but that's OK, since we're constructing
|
||||
our own Extensions entries in AppxManifest.xml. As such, we'll suppress the warning that that would otherwise raise. -->
|
||||
APPX1707;
|
||||
</MSBuildWarningsAsMessages>
|
||||
<MSBuildWarningsAsMessages Condition="'$(MSBuildProjectExtension)' == '.wapproj'">
|
||||
$(MSBuildWarningsAsMessages);
|
||||
|
||||
<!-- WAP project files can have class libraries with WinMDs complain that they don't have requisite dependencies present -
|
||||
however, due to our custom packaging, they'll be present in the end, so we'll suppress this warning as well. -->
|
||||
MSB3268;
|
||||
</MSBuildWarningsAsMessages>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- Packing class libraries in a WAP project can erroneously raise a warning thinking that we've packaged multiple executables.
|
||||
We'll suppress that warning, since it's being raised in error. -->
|
||||
<Target Name="_UWPReferencesCheck" Condition="'$(MSBuildProjectExtension)' == '.wapproj'" />
|
||||
|
||||
<!--
|
||||
Setting default project properties for .NET SDK-style projects
|
||||
-->
|
||||
<PropertyGroup Condition="'$(UsingMicrosoftNETSdk)' == 'true'">
|
||||
<SDKIdentifier>Windows</SDKIdentifier>
|
||||
<SDKVersion>10.0</SDKVersion>
|
||||
<DefaultLanguage Condition="'$(DefaultLanguage)'==''">en-US</DefaultLanguage>
|
||||
</PropertyGroup>
|
||||
|
||||
<!--
|
||||
By default, the Nuget targets for .NET Native UWP projects copy MUI files to the root of the AppX.
|
||||
However, we need them in language-specific locations, so we'll move them there after resolving our
|
||||
assembly references, which is what places them in ReferenceCopyLocalPaths.
|
||||
|
||||
Note: This isn't needed for native projects or projects that are using the Microsoft.NET.Sdk, since
|
||||
we manually add them to ReferenceCopyLocalPaths. Once we are fully onto .NET5, we can remove this target.
|
||||
-->
|
||||
<Target Name="_UpdateMuiFilesCopyLocalPath"
|
||||
BeforeTargets="_CopyFilesMarkedCopyLocal"
|
||||
AfterTargets="ResolveAssemblyReferences"
|
||||
Condition="'$(_AddWinUIAssembliesToReferenceCopyLocalPaths)' != 'true'">
|
||||
<PropertyGroup Condition="'$(_MuxRuntimeIdentifier)' == ''">
|
||||
<_MuxRuntimeIdentifier Condition="'$(Platform)' == 'Win32'">win10-x86</_MuxRuntimeIdentifier>
|
||||
<_MuxRuntimeIdentifier Condition="'$(Platform)' != 'Win32'">win10-$(Platform)</_MuxRuntimeIdentifier>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<ReferenceCopyLocalPaths Update="@(ReferenceCopyLocalPaths)" Condition="'%(ReferenceCopyLocalPaths.NuGetPackageId)' == 'Microsoft.WinUI' and '%(Extension)' == '.mui'">
|
||||
<DestinationSubDirectory>$([MSBuild]::MakeRelative($(MSBuildThisFileDirectory)..\runtimes\$(_MuxRuntimeIdentifier)\native\, %(RootDir)%(Directory)))</DestinationSubDirectory>
|
||||
</ReferenceCopyLocalPaths>
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<Target Name="_UpdateWapProjectPackageFiles"
|
||||
BeforeTargets="_CopyPackageFiles;_CopyUploadPackageFiles"
|
||||
AfterTargets="_ConvertItems"
|
||||
Condition="'$(MSBuildProjectExtension)' == '.wapproj'">
|
||||
<ItemGroup>
|
||||
<!-- In the case of native projects, the TargetPath gets overwritten to remove the language-specific subfolders
|
||||
in the _ConvertItems target, so in the case where that's happened, we'll restore it from the
|
||||
DestinationSubDirectory item metadata. -->
|
||||
<WapProjPackageFile Update="@(WapProjPackageFile)" Condition="'%(WapProjPackageFile.DestinationSubDirectory)' != '' and '%(TargetPath)' == '%(Filename)%(Extension)'">
|
||||
<TargetPath>%(WapProjPackageFile.DestinationSubDirectory)%(TargetPath)</TargetPath>
|
||||
</WapProjPackageFile>
|
||||
<UploadWapProjPackageFile Update="@(UploadWapProjPackageFile)" Condition="'%(UploadWapProjPackageFile.DestinationSubDirectory)' != '' and '%(TargetPath)' == '%(Filename)%(Extension)'">
|
||||
<TargetPath>%(UploadWapProjPackageFile.DestinationSubDirectory)%(TargetPath)</TargetPath>
|
||||
</UploadWapProjPackageFile>
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<!--
|
||||
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.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.
|
||||
When the ProjectReferenceWithExtraMetadata.TargetPlatformIdentifier is set to UAP, this causes the AppxManifest.xml
|
||||
generation targets to write in the app entry point which causes UWP activation.
|
||||
-->
|
||||
<Target Name="UpdateTargetPlatformIdentifer" AfterTargets="SetProjectReferenceProperties" Returns="@(ProjectReferenceWithExtraMetadata)">
|
||||
<ItemGroup>
|
||||
<ProjectReferenceWithExtraMetadata Update="@(ProjectReferenceWithExtraMetadata)" Condition="'%(WindowsAppContainer)'=='true'">
|
||||
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
|
||||
</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>
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
<PropertyGroup>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<TargetFramework>net5.0-windows10.0.18362.0</TargetFramework>
|
||||
<TargetPlatformMinVersion>10.0.17134.0</TargetPlatformMinVersion>
|
||||
<TargetFramework>net5.0-windows10.0.19041.0</TargetFramework>
|
||||
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
|
||||
|
||||
<RootNamespace>Microsoft.Toolkit.Uwp.SampleApp</RootNamespace>
|
||||
|
||||
|
@ -33,7 +33,7 @@
|
|||
<Version>0.10.0-alpha</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.Xaml.Behaviors.WinUI.Managed">
|
||||
<Version>2.0.3-rc5</Version>
|
||||
<Version>2.0.3-rc6</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="NotificationsVisualizerLibrary">
|
||||
<Version>2.0.0</Version>
|
||||
|
@ -41,6 +41,11 @@
|
|||
<PackageReference Include="System.ValueTuple">
|
||||
<Version>4.5.0</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.ProjectReunion" Version="$(MicrosoftProjectReunionVersion)" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<!-- Temporary fix for https://github.com/microsoft/microsoft-ui-xaml/issues/4414 -->
|
||||
<FrameworkReference Update="Microsoft.Windows.SDK.NET.Ref" RuntimeFrameworkVersion="10.0.19041.13" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="landingPageLinks.json" />
|
||||
|
|
|
@ -155,65 +155,69 @@
|
|||
Grid.RowSpan="3"
|
||||
Canvas.ZIndex="99">
|
||||
|
||||
<Pivot Style="{StaticResource PivotUnderlineStyle}" x:Name="InfoAreaPivot"
|
||||
<TabView x:Name="InfoAreaPivot"
|
||||
Grid.Row="1"
|
||||
Margin="0"
|
||||
Padding="5,0"
|
||||
HeaderTemplate="{StaticResource PivotHeaderTemplate}"
|
||||
IsTabStop="False"
|
||||
IsAddTabButtonVisible="False"
|
||||
SelectionChanged="InfoAreaPivot_OnSelectionChanged">
|
||||
<Pivot.LeftHeader>
|
||||
<TabView.TabStripHeader>
|
||||
<AppBarButton x:Name="ExpandPane"
|
||||
Visibility="{x:Bind CanChangePaneState}"
|
||||
Icon="ClosePane"
|
||||
Width="50"
|
||||
Click="{x:Bind ExpandCollapsePane}" />
|
||||
</Pivot.LeftHeader>
|
||||
</TabView.TabStripHeader>
|
||||
|
||||
<PivotItem x:Name="PropertiesPivotItem"
|
||||
<TabView.TabItems>
|
||||
<TabViewItem x:Name="PropertiesPivotItem"
|
||||
Padding="0, 10,0,0"
|
||||
Header="Properties">
|
||||
<ScrollViewer>
|
||||
<controlsLocal:PropertyControl x:Name="Properties" />
|
||||
</ScrollViewer>
|
||||
</TabViewItem>
|
||||
|
||||
<TabViewItem x:Name="XamlPivotItem"
|
||||
Header="XAML">
|
||||
<controlsLocal:XamlCodeEditor x:Name="XamlCodeEditor" />
|
||||
</TabViewItem>
|
||||
|
||||
<TabViewItem x:Name="XamlReadOnlyPivotItem"
|
||||
Padding="0, 10,0,0"
|
||||
Header="XAML">
|
||||
<controlsLocal:CodeRenderer x:Name="XamlReadOnlyCodeRenderer" />
|
||||
</TabViewItem>
|
||||
|
||||
<TabViewItem x:Name="CSharpPivotItem"
|
||||
Padding="0, 10,0,0"
|
||||
Header="Code">
|
||||
<controlsLocal:CodeRenderer x:Name="CSharpCodeRenderer"
|
||||
IsFocusEngagementEnabled="False" />
|
||||
</TabViewItem>
|
||||
|
||||
<TabViewItem x:Name="DocumentationPivotItem"
|
||||
Padding="0, 10,0,0"
|
||||
Header="Properties">
|
||||
<ScrollViewer>
|
||||
<controlsLocal:PropertyControl x:Name="Properties" />
|
||||
</ScrollViewer>
|
||||
</PivotItem>
|
||||
|
||||
<PivotItem x:Name="XamlPivotItem"
|
||||
Header="XAML">
|
||||
<controlsLocal:XamlCodeEditor x:Name="XamlCodeEditor" />
|
||||
</PivotItem>
|
||||
|
||||
<PivotItem x:Name="XamlReadOnlyPivotItem"
|
||||
Padding="0, 10,0,0"
|
||||
Header="XAML">
|
||||
<controlsLocal:CodeRenderer x:Name="XamlReadOnlyCodeRenderer" />
|
||||
</PivotItem>
|
||||
|
||||
<PivotItem x:Name="CSharpPivotItem"
|
||||
Padding="0, 10,0,0"
|
||||
Header="Code">
|
||||
<controlsLocal:CodeRenderer x:Name="CSharpCodeRenderer"
|
||||
IsFocusEngagementEnabled="False" />
|
||||
</PivotItem>
|
||||
|
||||
<PivotItem x:Name="DocumentationPivotItem"
|
||||
Padding="0, 10,0,0"
|
||||
Header="Documentation">
|
||||
<ScrollViewer x:Name="DocumentationScrollViewer">
|
||||
<controls:MarkdownTextBlock x:Name="DocumentationTextBlock"
|
||||
Foreground="{ThemeResource DocumentationForeground}"
|
||||
Background="Transparent"
|
||||
CodeBackground="{ThemeResource SampleMarkdownBackgroundBrush}"
|
||||
QuoteBackground="{ThemeResource SampleMarkdownBackgroundBrush}"
|
||||
InlineCodeBackground="{ThemeResource SampleMarkdownInlineCodeBackgroundBrush}"
|
||||
LinkForeground="{ThemeResource Brush-Link-Normal}"
|
||||
ImageResolving="DocumentationTextBlock_ImageResolving"
|
||||
LinkClicked="DocumentationTextBlock_OnLinkClicked"
|
||||
SchemeList="uwpct"
|
||||
IsFocusEngagementEnabled="False"
|
||||
ImageMaxWidth="500"
|
||||
ImageMaxHeight="500" />
|
||||
</ScrollViewer>
|
||||
</PivotItem>
|
||||
</Pivot>
|
||||
Header="Documentation">
|
||||
<ScrollViewer x:Name="DocumentationScrollViewer">
|
||||
<controls:MarkdownTextBlock x:Name="DocumentationTextBlock"
|
||||
Foreground="{ThemeResource DocumentationForeground}"
|
||||
Background="Transparent"
|
||||
CodeBackground="{ThemeResource SampleMarkdownBackgroundBrush}"
|
||||
QuoteBackground="{ThemeResource SampleMarkdownBackgroundBrush}"
|
||||
InlineCodeBackground="{ThemeResource SampleMarkdownInlineCodeBackgroundBrush}"
|
||||
LinkForeground="{ThemeResource Brush-Link-Normal}"
|
||||
ImageResolving="DocumentationTextBlock_ImageResolving"
|
||||
LinkClicked="DocumentationTextBlock_OnLinkClicked"
|
||||
SchemeList="uwpct"
|
||||
IsFocusEngagementEnabled="False"
|
||||
ImageMaxWidth="500"
|
||||
ImageMaxHeight="500" />
|
||||
</ScrollViewer>
|
||||
</TabViewItem>
|
||||
</TabView.TabItems>
|
||||
</TabView>
|
||||
|
||||
<controls:GridSplitter x:Name="Splitter"
|
||||
Grid.Row="1"
|
||||
|
|
|
@ -230,7 +230,7 @@ namespace Microsoft.Toolkit.Uwp.SampleApp
|
|||
_onlyDocumentation = true;
|
||||
}
|
||||
|
||||
InfoAreaPivot.Items.Clear();
|
||||
InfoAreaPivot.TabItems.Clear();
|
||||
|
||||
if (CurrentSample.HasXAMLCode)
|
||||
{
|
||||
|
@ -247,7 +247,7 @@ namespace Microsoft.Toolkit.Uwp.SampleApp
|
|||
|
||||
if (propertyDesc?.Options.Count > 0)
|
||||
{
|
||||
InfoAreaPivot.Items.Add(PropertiesPivotItem);
|
||||
InfoAreaPivot.TabItems.Add(PropertiesPivotItem);
|
||||
}
|
||||
|
||||
if (AnalyticsInfo.VersionInfo.GetDeviceFormFactor() != DeviceFormFactor.Desktop || CurrentSample.DisableXamlEditorRendering)
|
||||
|
@ -255,13 +255,13 @@ namespace Microsoft.Toolkit.Uwp.SampleApp
|
|||
// Only makes sense (and works) for now to show Live Xaml on Desktop, so fallback to old system here otherwise.
|
||||
XamlReadOnlyCodeRenderer.SetCode(CurrentSample.UpdatedXamlCode, "xaml");
|
||||
|
||||
InfoAreaPivot.Items.Add(XamlReadOnlyPivotItem);
|
||||
InfoAreaPivot.TabItems.Add(XamlReadOnlyPivotItem);
|
||||
}
|
||||
else
|
||||
{
|
||||
XamlCodeEditor.Text = CurrentSample.UpdatedXamlCode;
|
||||
|
||||
InfoAreaPivot.Items.Add(XamlPivotItem);
|
||||
InfoAreaPivot.TabItems.Add(XamlPivotItem);
|
||||
|
||||
_xamlCodeRendererSupported = true;
|
||||
}
|
||||
|
@ -274,7 +274,7 @@ namespace Microsoft.Toolkit.Uwp.SampleApp
|
|||
var code = await CurrentSample.GetCSharpSourceAsync();
|
||||
|
||||
CSharpCodeRenderer.SetCode(code, "c#");
|
||||
InfoAreaPivot.Items.Add(CSharpPivotItem);
|
||||
InfoAreaPivot.TabItems.Add(CSharpPivotItem);
|
||||
}
|
||||
|
||||
if (CurrentSample.HasDocumentation)
|
||||
|
@ -286,7 +286,7 @@ namespace Microsoft.Toolkit.Uwp.SampleApp
|
|||
if (!string.IsNullOrWhiteSpace(contents))
|
||||
{
|
||||
DocumentationTextBlock.Text = contents;
|
||||
InfoAreaPivot.Items.Add(DocumentationPivotItem);
|
||||
InfoAreaPivot.TabItems.Add(DocumentationPivotItem);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -302,7 +302,7 @@ namespace Microsoft.Toolkit.Uwp.SampleApp
|
|||
|
||||
DataContext = CurrentSample;
|
||||
|
||||
if (InfoAreaPivot.Items.Count == 0)
|
||||
if (InfoAreaPivot.TabItems.Count == 0)
|
||||
{
|
||||
SidePaneState = PaneState.None;
|
||||
}
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:win2d="using:Microsoft.Graphics.Canvas.UI.Xaml"
|
||||
mc:Ignorable="d">
|
||||
<!-- xmlns:win2d="using:Microsoft.Graphics.Canvas.UI.Xaml" -->
|
||||
|
||||
<Grid Padding="10">
|
||||
<Grid.RowDefinitions>
|
||||
|
@ -85,6 +85,7 @@
|
|||
HorizontalAlignment="Left"
|
||||
Click="{x:Bind OnClearCanvas}"
|
||||
Content="Clear" />
|
||||
<!--
|
||||
<Pivot x:Name="RootPivot"
|
||||
Grid.Row="4">
|
||||
<PivotItem Foreground="Black"
|
||||
|
@ -92,7 +93,6 @@
|
|||
<ScrollViewer x:Name="RenderScroll"
|
||||
HorizontalScrollBarVisibility="Auto"
|
||||
VerticalScrollBarVisibility="Auto">
|
||||
<!--
|
||||
<win2d:CanvasControl x:Name="RenderCanvas"
|
||||
Width="{Binding ElementName=RenderScroll, Path=ActualWidth}"
|
||||
Height="{Binding ElementName=RenderScroll, Path=ActualHeight}"
|
||||
|
@ -104,7 +104,6 @@
|
|||
VerticalContentAlignment="Stretch"
|
||||
ClearColor="#A7A7A7"
|
||||
Draw="{x:Bind OnCanvasDraw}" />
|
||||
-->
|
||||
</ScrollViewer>
|
||||
</PivotItem>
|
||||
<PivotItem Foreground="Black"
|
||||
|
@ -123,6 +122,7 @@
|
|||
</ScrollViewer>
|
||||
</PivotItem>
|
||||
</Pivot>
|
||||
-->
|
||||
<StackPanel Grid.Row="4"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Top"
|
||||
|
|
|
@ -113,13 +113,6 @@
|
|||
</Setter>
|
||||
</Style>
|
||||
|
||||
<DataTemplate x:Key="PivotHeaderTemplate">
|
||||
<Grid>
|
||||
<TextBlock FontSize="16" FontWeight="SemiBold"
|
||||
Text="{Binding}" />
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
|
||||
<Style x:Key="SamplePickerItemStyle"
|
||||
TargetType="GridViewItem">
|
||||
<Setter Property="Foreground" Value="{ThemeResource SystemControlForegroundBaseHighBrush}" />
|
||||
|
@ -649,250 +642,6 @@
|
|||
</Grid>
|
||||
</ControlTemplate>
|
||||
|
||||
<Style x:Key="PivotUnderlineStyle" TargetType="Pivot">
|
||||
<Setter Property="Margin" Value="0" />
|
||||
<Setter Property="Padding" Value="0" />
|
||||
<Setter Property="Background" Value="{ThemeResource PivotBackground}" />
|
||||
<Setter Property="IsTabStop" Value="False" />
|
||||
<Setter Property="ItemsPanel">
|
||||
<Setter.Value>
|
||||
<ItemsPanelTemplate>
|
||||
<Grid />
|
||||
</ItemsPanelTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="Pivot">
|
||||
<Grid x:Name="RootElement" Background="{TemplateBinding Background}" HorizontalAlignment="{TemplateBinding HorizontalAlignment}" VerticalAlignment="{TemplateBinding VerticalAlignment}">
|
||||
<Grid.Resources>
|
||||
<Style x:Key="BaseContentControlStyle" TargetType="ContentControl">
|
||||
<Setter Property="FontFamily" Value="XamlAutoFontFamily" />
|
||||
<Setter Property="FontWeight" Value="SemiBold" />
|
||||
<Setter Property="FontSize" Value="15" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="ContentControl">
|
||||
<ContentPresenter ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" ContentTransitions="{TemplateBinding ContentTransitions}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" OpticalMarginAlignment="TrimSideBearings" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
<Style x:Key="TitleContentControlStyle" BasedOn="{StaticResource BaseContentControlStyle}" TargetType="ContentControl">
|
||||
<Setter Property="FontFamily" Value="{ThemeResource PivotTitleFontFamily}" />
|
||||
<Setter Property="FontWeight" Value="{ThemeResource PivotTitleThemeFontWeight}" />
|
||||
<Setter Property="FontSize" Value="{ThemeResource PivotTitleFontSize}" />
|
||||
</Style>
|
||||
|
||||
<Style BasedOn="{StaticResource PivotHeaderItemUnderlineStyle}" TargetType="PivotHeaderItem" />
|
||||
</Grid.Resources>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<VisualStateManager.VisualStateGroups>
|
||||
<VisualStateGroup x:Name="Orientation">
|
||||
<VisualState x:Name="Portrait">
|
||||
<Storyboard>
|
||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="TitleContentControl" Storyboard.TargetProperty="Margin">
|
||||
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource PivotPortraitThemePadding}" />
|
||||
</ObjectAnimationUsingKeyFrames>
|
||||
</Storyboard>
|
||||
</VisualState>
|
||||
<VisualState x:Name="Landscape">
|
||||
<Storyboard>
|
||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="TitleContentControl" Storyboard.TargetProperty="Margin">
|
||||
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource PivotLandscapeThemePadding}" />
|
||||
</ObjectAnimationUsingKeyFrames>
|
||||
</Storyboard>
|
||||
</VisualState>
|
||||
</VisualStateGroup>
|
||||
<VisualStateGroup x:Name="NavigationButtonsVisibility">
|
||||
<VisualState x:Name="NavigationButtonsHidden" />
|
||||
<VisualState x:Name="NavigationButtonsVisible">
|
||||
<Storyboard>
|
||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="NextButton" Storyboard.TargetProperty="Opacity">
|
||||
<DiscreteObjectKeyFrame KeyTime="0" Value="1" />
|
||||
</ObjectAnimationUsingKeyFrames>
|
||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="NextButton" Storyboard.TargetProperty="IsEnabled">
|
||||
<DiscreteObjectKeyFrame KeyTime="0" Value="True" />
|
||||
</ObjectAnimationUsingKeyFrames>
|
||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="PreviousButton" Storyboard.TargetProperty="Opacity">
|
||||
<DiscreteObjectKeyFrame KeyTime="0" Value="1" />
|
||||
</ObjectAnimationUsingKeyFrames>
|
||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="PreviousButton" Storyboard.TargetProperty="IsEnabled">
|
||||
<DiscreteObjectKeyFrame KeyTime="0" Value="True" />
|
||||
</ObjectAnimationUsingKeyFrames>
|
||||
</Storyboard>
|
||||
</VisualState>
|
||||
<VisualState x:Name="PreviousButtonVisible">
|
||||
<Storyboard>
|
||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="PreviousButton" Storyboard.TargetProperty="Opacity">
|
||||
<DiscreteObjectKeyFrame KeyTime="0" Value="1" />
|
||||
</ObjectAnimationUsingKeyFrames>
|
||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="PreviousButton" Storyboard.TargetProperty="IsEnabled">
|
||||
<DiscreteObjectKeyFrame KeyTime="0" Value="True" />
|
||||
</ObjectAnimationUsingKeyFrames>
|
||||
</Storyboard>
|
||||
</VisualState>
|
||||
<VisualState x:Name="NextButtonVisible">
|
||||
<Storyboard>
|
||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="NextButton" Storyboard.TargetProperty="Opacity">
|
||||
<DiscreteObjectKeyFrame KeyTime="0" Value="1" />
|
||||
</ObjectAnimationUsingKeyFrames>
|
||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="NextButton" Storyboard.TargetProperty="IsEnabled">
|
||||
<DiscreteObjectKeyFrame KeyTime="0" Value="True" />
|
||||
</ObjectAnimationUsingKeyFrames>
|
||||
</Storyboard>
|
||||
</VisualState>
|
||||
</VisualStateGroup>
|
||||
<VisualStateGroup x:Name="HeaderStates">
|
||||
<VisualState x:Name="HeaderDynamic" />
|
||||
<VisualState x:Name="HeaderStatic">
|
||||
<Storyboard>
|
||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="Header" Storyboard.TargetProperty="Visibility">
|
||||
<DiscreteObjectKeyFrame KeyTime="0" Value="Collapsed" />
|
||||
</ObjectAnimationUsingKeyFrames>
|
||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="StaticHeader" Storyboard.TargetProperty="Visibility">
|
||||
<DiscreteObjectKeyFrame KeyTime="0" Value="Visible" />
|
||||
</ObjectAnimationUsingKeyFrames>
|
||||
</Storyboard>
|
||||
</VisualState>
|
||||
</VisualStateGroup>
|
||||
</VisualStateManager.VisualStateGroups>
|
||||
<ContentControl x:Name="TitleContentControl" ContentTemplate="{TemplateBinding TitleTemplate}" Content="{TemplateBinding Title}" IsTabStop="False" Margin="{StaticResource PivotPortraitThemePadding}" Style="{StaticResource TitleContentControlStyle}" Visibility="Collapsed" />
|
||||
<Grid Grid.Row="1">
|
||||
<Grid.Resources>
|
||||
<ControlTemplate x:Key="NextTemplate" TargetType="Button">
|
||||
<Border x:Name="Root" Background="{ThemeResource PivotNextButtonBackground}" BorderThickness="{ThemeResource PivotNavButtonBorderThemeThickness}" BorderBrush="{ThemeResource PivotNextButtonBorderBrush}">
|
||||
<VisualStateManager.VisualStateGroups>
|
||||
<VisualStateGroup x:Name="CommonStates">
|
||||
<VisualState x:Name="Normal" />
|
||||
<VisualState x:Name="PointerOver">
|
||||
<Storyboard>
|
||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="Root" Storyboard.TargetProperty="Background">
|
||||
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource PivotNextButtonBackgroundPointerOver}" />
|
||||
</ObjectAnimationUsingKeyFrames>
|
||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="Root" Storyboard.TargetProperty="BorderBrush">
|
||||
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource PivotNextButtonBorderBrushPointerOver}" />
|
||||
</ObjectAnimationUsingKeyFrames>
|
||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="Arrow" Storyboard.TargetProperty="Foreground">
|
||||
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource PivotNextButtonForegroundPointerOver}" />
|
||||
</ObjectAnimationUsingKeyFrames>
|
||||
</Storyboard>
|
||||
</VisualState>
|
||||
<VisualState x:Name="Pressed">
|
||||
<Storyboard>
|
||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="Root" Storyboard.TargetProperty="Background">
|
||||
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource PivotNextButtonBackgroundPressed}" />
|
||||
</ObjectAnimationUsingKeyFrames>
|
||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="Root" Storyboard.TargetProperty="BorderBrush">
|
||||
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource PivotNextButtonBorderBrushPressed}" />
|
||||
</ObjectAnimationUsingKeyFrames>
|
||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="Arrow" Storyboard.TargetProperty="Foreground">
|
||||
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource PivotNextButtonForegroundPressed}" />
|
||||
</ObjectAnimationUsingKeyFrames>
|
||||
</Storyboard>
|
||||
</VisualState>
|
||||
</VisualStateGroup>
|
||||
</VisualStateManager.VisualStateGroups>
|
||||
<FontIcon x:Name="Arrow" FontFamily="{ThemeResource SymbolThemeFontFamily}" Foreground="{ThemeResource PivotNextButtonForeground}" FontSize="12" Glyph="" HorizontalAlignment="Center" MirroredWhenRightToLeft="True" UseLayoutRounding="False" VerticalAlignment="Center" />
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
<ControlTemplate x:Key="PreviousTemplate" TargetType="Button">
|
||||
<Border x:Name="Root" Background="{ThemeResource PivotPreviousButtonBackground}" BorderThickness="{ThemeResource PivotNavButtonBorderThemeThickness}" BorderBrush="{ThemeResource PivotPreviousButtonBorderBrush}">
|
||||
<VisualStateManager.VisualStateGroups>
|
||||
<VisualStateGroup x:Name="CommonStates">
|
||||
<VisualState x:Name="Normal" />
|
||||
<VisualState x:Name="PointerOver">
|
||||
<Storyboard>
|
||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="Root" Storyboard.TargetProperty="Background">
|
||||
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource PivotPreviousButtonBackgroundPointerOver}" />
|
||||
</ObjectAnimationUsingKeyFrames>
|
||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="Root" Storyboard.TargetProperty="BorderBrush">
|
||||
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource PivotPreviousButtonBorderBrushPointerOver}" />
|
||||
</ObjectAnimationUsingKeyFrames>
|
||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="Arrow" Storyboard.TargetProperty="Foreground">
|
||||
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource PivotPreviousButtonForegroundPointerOver}" />
|
||||
</ObjectAnimationUsingKeyFrames>
|
||||
</Storyboard>
|
||||
</VisualState>
|
||||
<VisualState x:Name="Pressed">
|
||||
<Storyboard>
|
||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="Root" Storyboard.TargetProperty="Background">
|
||||
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource PivotPreviousButtonBackgroundPressed}" />
|
||||
</ObjectAnimationUsingKeyFrames>
|
||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="Root" Storyboard.TargetProperty="BorderBrush">
|
||||
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource PivotPreviousButtonBorderBrushPressed}" />
|
||||
</ObjectAnimationUsingKeyFrames>
|
||||
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="Arrow" Storyboard.TargetProperty="Foreground">
|
||||
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource PivotPreviousButtonForegroundPressed}" />
|
||||
</ObjectAnimationUsingKeyFrames>
|
||||
</Storyboard>
|
||||
</VisualState>
|
||||
</VisualStateGroup>
|
||||
</VisualStateManager.VisualStateGroups>
|
||||
<FontIcon x:Name="Arrow" FontFamily="{ThemeResource SymbolThemeFontFamily}" Foreground="{ThemeResource PivotPreviousButtonForeground}" FontSize="12" Glyph="" HorizontalAlignment="Center" MirroredWhenRightToLeft="True" UseLayoutRounding="False" VerticalAlignment="Center" />
|
||||
</Border>
|
||||
</ControlTemplate>
|
||||
</Grid.Resources>
|
||||
<ScrollViewer x:Name="ScrollViewer" BringIntoViewOnFocusChange="False" HorizontalScrollBarVisibility="Hidden" HorizontalSnapPointsAlignment="Center" HorizontalSnapPointsType="MandatorySingle" Margin="{TemplateBinding Padding}" Template="{StaticResource ScrollViewerScrollBarlessTemplate}" VerticalContentAlignment="Stretch" VerticalSnapPointsType="None" VerticalScrollMode="Disabled" VerticalScrollBarVisibility="Disabled" ZoomMode="Disabled">
|
||||
<PivotPanel x:Name="Panel" VerticalAlignment="Stretch">
|
||||
<Grid x:Name="PivotLayoutElement">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="Auto" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.RenderTransform>
|
||||
<CompositeTransform x:Name="PivotLayoutElementTranslateTransform" />
|
||||
</Grid.RenderTransform>
|
||||
<ContentPresenter x:Name="LeftHeaderPresenter" ContentTemplate="{TemplateBinding LeftHeaderTemplate}" Content="{TemplateBinding LeftHeader}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" />
|
||||
<ContentControl x:Name="HeaderClipper" Grid.Column="1" HorizontalContentAlignment="Stretch" UseSystemFocusVisuals="True">
|
||||
<ContentControl.Clip>
|
||||
<RectangleGeometry x:Name="HeaderClipperGeometry" />
|
||||
</ContentControl.Clip>
|
||||
<Grid Background="{ThemeResource PivotHeaderBackground}">
|
||||
<Grid.RenderTransform>
|
||||
<CompositeTransform x:Name="HeaderOffsetTranslateTransform" />
|
||||
</Grid.RenderTransform>
|
||||
<PivotHeaderPanel x:Name="StaticHeader" Visibility="Collapsed">
|
||||
<PivotHeaderPanel.RenderTransform>
|
||||
<CompositeTransform x:Name="StaticHeaderTranslateTransform" />
|
||||
</PivotHeaderPanel.RenderTransform>
|
||||
</PivotHeaderPanel>
|
||||
<PivotHeaderPanel x:Name="Header">
|
||||
<PivotHeaderPanel.RenderTransform>
|
||||
<CompositeTransform x:Name="HeaderTranslateTransform" />
|
||||
</PivotHeaderPanel.RenderTransform>
|
||||
</PivotHeaderPanel>
|
||||
</Grid>
|
||||
</ContentControl>
|
||||
<Button x:Name="PreviousButton" Background="Transparent" Grid.Column="1" HorizontalAlignment="Left" Height="36" IsEnabled="False" IsTabStop="False" Margin="{ThemeResource PivotNavButtonMargin}" Opacity="0" Template="{StaticResource PreviousTemplate}" UseSystemFocusVisuals="False" VerticalAlignment="Top" Width="20" />
|
||||
<Button x:Name="NextButton" Background="Transparent" Grid.Column="1" HorizontalAlignment="Right" Height="36" IsEnabled="False" IsTabStop="False" Margin="{ThemeResource PivotNavButtonMargin}" Opacity="0" Template="{StaticResource NextTemplate}" UseSystemFocusVisuals="False" VerticalAlignment="Top" Width="20" />
|
||||
<ContentPresenter x:Name="RightHeaderPresenter" ContentTemplate="{TemplateBinding RightHeaderTemplate}" Content="{TemplateBinding RightHeader}" Grid.Column="2" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" />
|
||||
<ItemsPresenter x:Name="PivotItemPresenter" Grid.ColumnSpan="3" Grid.Row="1">
|
||||
<ItemsPresenter.RenderTransform>
|
||||
<TransformGroup>
|
||||
<TranslateTransform x:Name="ItemsPresenterTranslateTransform" />
|
||||
<CompositeTransform x:Name="ItemsPresenterCompositeTransform" />
|
||||
</TransformGroup>
|
||||
</ItemsPresenter.RenderTransform>
|
||||
</ItemsPresenter>
|
||||
</Grid>
|
||||
</PivotPanel>
|
||||
</ScrollViewer>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="AboutPageHeader" TargetType="TextBlock">
|
||||
<Setter Property="FontFamily" Value="Segoe UI" />
|
||||
<Setter Property="FontSize" Value="20" />
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Xaml.Behaviors.WinUI.Managed" Version="2.0.3-rc5" />
|
||||
<PackageReference Include="Microsoft.Xaml.Behaviors.WinUI.Managed" Version="2.0.3-rc6" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="ColorCode.WinUI" Version="8.0.0-preview4" />
|
||||
<PackageReference Include="ColorCode.WinUI" Version="8.0.0-preview6" />
|
||||
<ProjectReference Include="..\Microsoft.Toolkit.Uwp.UI.Controls.Core\Microsoft.Toolkit.Uwp.UI.Controls.Core.csproj" />
|
||||
<ProjectReference Include="..\Microsoft.Toolkit.Uwp.UI\Microsoft.Toolkit.Uwp.UI.csproj" />
|
||||
</ItemGroup>
|
||||
|
|
|
@ -15,9 +15,7 @@
|
|||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Toolkit.Forms.UI.XamlHost" Version="6.1.2" />
|
||||
<PackageReference Include="Microsoft.WinUI">
|
||||
<Version>3.0.0-preview4.210210.4</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.ProjectReunion" Version="0.5.0-prerelease" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
@ -65,7 +65,7 @@ jobs:
|
|||
- task: UseDotNet@2
|
||||
displayName: 'Install .NET Core SDK'
|
||||
inputs:
|
||||
version: 5.0.103
|
||||
version: 5.0.201
|
||||
performMultiLevelLookup: true
|
||||
|
||||
# Temporary until ADO have VS16.8
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<Choose>
|
||||
<When Condition="'$(TargetFramework)' == 'net5.0-windows10.0.18362.0'">
|
||||
<ItemGroup Condition="'$(IsUwpProject)' == 'true' or '$(IsDesignProject)' == 'true' or '$(IsSampleProject)' == 'true' or '$(IsTestProject)' == 'true'">
|
||||
<PackageReference Include="Microsoft.WinUI" Version="$(MicrosoftWinUIVersion)"/>
|
||||
<PackageReference Include="Microsoft.ProjectReunion" Version="$(MicrosoftProjectReunionVersion)" />
|
||||
</ItemGroup>
|
||||
</When>
|
||||
</Choose>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#module nuget:?package=Cake.LongPath.Module&version=0.7.0
|
||||
#module nuget:?package=Cake.LongPath.Module&version=1.0.0
|
||||
|
||||
#addin nuget:?package=Cake.FileHelpers&version=3.3.0
|
||||
#addin nuget:?package=Cake.Powershell&version=0.4.8
|
||||
#addin nuget:?package=Cake.FileHelpers&version=4.0.0
|
||||
#addin nuget:?package=Cake.Powershell&version=1.0.0
|
||||
#addin nuget:?package=Cake.GitVersioning&version=3.3.37
|
||||
|
||||
#tool nuget:?package=MSTest.TestAdapter&version=2.1.0
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"msbuild-sdks": {
|
||||
"MSBuild.Sdk.Extras": "3.0.22"
|
||||
"MSBuild.Sdk.Extras": "3.0.23"
|
||||
}
|
||||
}
|
Загрузка…
Ссылка в новой задаче