Merge branch 'main' into sampleapp-fixes
This commit is contained in:
Коммит
ee7c9dbccb
|
@ -1,16 +1,18 @@
|
|||
<!-- 🚨 Please Do Not skip any instructions and information mentioned below as they are all required and essential to evaluate and test the PR. By fulfilling all the required information you will be able to reduce the volume of questions and most likely help merge the PR faster 🚨 -->
|
||||
|
||||
<!-- 📝 It is preferred if you keep the "☑️ Allow edits by maintainers" checked in the Pull Request Template as it increases collaboration with the Toolkit maintainers by permitting commits to your PR branch (only) created from your fork. This can let us quickly make fixes for minor typos or forgotten StyleCop issues during review without needing to wait on you doing extra work. Let us help you help us! 🎉 -->
|
||||
<!-- 👉 It is imperative to resolve ONE ISSUE PER PR and avoid making multiple changes unless the changes interrelate with each other -->
|
||||
|
||||
<!-- 📝 Please always keep the "☑️ Allow edits by maintainers" button checked in the Pull Request Template as it increases collaboration with the Toolkit maintainers by permitting commits to your PR branch (only) created from your fork. This can let us quickly make fixes for minor typos or forgotten StyleCop issues during review without needing to wait on you doing extra work. Let us help you help us! 🎉 -->
|
||||
|
||||
|
||||
## Fixes #
|
||||
<!-- Add the relevant issue number after the "#" mentioned above (for ex: Fixes #1234) which will automatically close the issue once the PR is merged. -->
|
||||
<!-- Add the relevant issue number after the "#" mentioned above (for ex: "## Fixes #1234") which will automatically close the issue once the PR is merged. -->
|
||||
|
||||
<!-- Add a brief overview here of the feature/bug & fix. -->
|
||||
|
||||
## PR Type
|
||||
What kind of change does this PR introduce?
|
||||
<!-- Please uncomment one or more that apply to this PR. -->
|
||||
<!-- Please uncomment one or more options below that apply to this PR. -->
|
||||
|
||||
<!-- - Bugfix -->
|
||||
<!-- - Feature -->
|
||||
|
|
|
@ -31,6 +31,11 @@
|
|||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
</PropertyGroup>
|
||||
</When>
|
||||
<Otherwise>
|
||||
<PropertyGroup>
|
||||
<IsPackable>false</IsPackable>
|
||||
</PropertyGroup>
|
||||
</Otherwise>
|
||||
</Choose>
|
||||
|
||||
<Choose>
|
||||
|
@ -45,8 +50,8 @@
|
|||
<When Condition="'$(Configuration)' == 'Debug' and '$(IsDesignProject)' != 'true'">
|
||||
<!-- Debug builds have this turned on by default, but it breaks our Xaml Islands Scenarios -->
|
||||
<PropertyGroup>
|
||||
<EnableTypeInfoReflection>false</EnableTypeInfoReflection>
|
||||
<EnableXBindDiagnostics>false</EnableXBindDiagnostics>
|
||||
<EnableTypeInfoReflection>false</EnableTypeInfoReflection>
|
||||
</PropertyGroup>
|
||||
</When>
|
||||
</Choose>
|
||||
|
@ -54,16 +59,16 @@
|
|||
<Choose>
|
||||
<When Condition="'$(SourceLinkEnabled)' != 'false' and '$(IsSampleProject)' != 'true'">
|
||||
<PropertyGroup>
|
||||
<!-- Optional: Declare that the Repository URL can be published to NuSpec -->
|
||||
<!-- Declare that the Repository URL can be published to NuSpec -->
|
||||
<PublishRepositoryUrl>true</PublishRepositoryUrl>
|
||||
<!-- Optional: Embed source files that are not tracked by the source control manager to the PDB -->
|
||||
<!-- Embed source files that are not tracked by the source control manager to the PDB -->
|
||||
<EmbedUntrackedSources>true</EmbedUntrackedSources>
|
||||
<!-- Optional: Include PDB in the built .nupkg -->
|
||||
<!-- Include PDB in the built .nupkg -->
|
||||
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.SourceLink.AzureRepos.Git" Version="1.0.0" PrivateAssets="All"/>
|
||||
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All"/>
|
||||
<PackageReference Include="Microsoft.SourceLink.AzureRepos.Git" Version="1.0.0" PrivateAssets="All" />
|
||||
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
|
||||
</ItemGroup>
|
||||
</When>
|
||||
</Choose>
|
||||
|
@ -71,7 +76,7 @@
|
|||
<Choose>
|
||||
<When Condition="'$(IsDesignProject)' != 'true'">
|
||||
<ItemGroup>
|
||||
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118" PrivateAssets="all" IncludeAssets="runtime; build; native; contentfiles; analyzers; buildtransitive"/>
|
||||
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118" PrivateAssets="all" IncludeAssets="runtime; build; native; contentfiles; analyzers; buildtransitive" />
|
||||
</ItemGroup>
|
||||
</When>
|
||||
</Choose>
|
||||
|
@ -103,10 +108,10 @@
|
|||
<AdditionalFiles Include="$(MSBuildThisFileDirectory)stylecop.json">
|
||||
<Link>stylecop.json</Link>
|
||||
</AdditionalFiles>
|
||||
<None Include="$(MSBuildThisFileDirectory)license.md" Pack="true" PackagePath="\"/>
|
||||
<None Include="$(MSBuildThisFileDirectory)build\nuget.png" Pack="true" PackagePath="images\"/>
|
||||
<None Include="$(MSBuildThisFileDirectory)License.md" Pack="true" PackagePath="\" />
|
||||
<None Include="$(MSBuildThisFileDirectory)build\nuget.png" Pack="true" PackagePath="images\" />
|
||||
</ItemGroup>
|
||||
|
||||
<Import Project="$(MSBuildThisFileDirectory)build\Windows.Toolkit.VisualStudio.Design.props" Condition="'$(IsDesignProject)' == 'true'"/>
|
||||
<Import Project="$(MSBuildThisFileDirectory)build\Windows.Toolkit.VisualStudio.Design.props" Condition="'$(IsDesignProject)' == 'true'" />
|
||||
|
||||
</Project>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<Choose>
|
||||
<!--We'll include signing the Notifications library since we need the DLL signature to match for interop from class libraries to main projects-->
|
||||
<!-- We'll include signing the Notifications library since we need the DLL signature to match for interop from class libraries to main projects -->
|
||||
<When Condition="(!$(TargetFramework.Contains(`uap10.0`)) and '$(TargetFramework)' != 'native' and '$(IsSampleProject)' != 'true') or $(MSBuildProjectName) == 'Microsoft.Toolkit.Uwp.Notifications'">
|
||||
<PropertyGroup>
|
||||
<SignAssembly>true</SignAssembly>
|
||||
|
@ -15,11 +15,11 @@
|
|||
</Choose>
|
||||
|
||||
<!--Exclude Notifications project from this since it sets different min versions than what we want for notifications-->
|
||||
<Import Project="$(MSBuildThisFileDirectory)build\Windows.Toolkit.Uwp.Build.targets" Condition="'$(UseUWP)' == 'true' and $(MSBuildProjectName) != 'Microsoft.Toolkit.Uwp.Notifications'"/>
|
||||
<Import Project="$(MSBuildThisFileDirectory)build\Windows.Toolkit.Uwp.Build.targets" Condition="'$(UseUWP)' == 'true' and $(MSBuildProjectName) != 'Microsoft.Toolkit.Uwp.Notifications'" />
|
||||
|
||||
<Target Name="AddCommitHashToAssemblyAttributes" BeforeTargets="GetAssemblyAttributes">
|
||||
<ItemGroup>
|
||||
<AssemblyAttribute Include="System.Reflection.AssemblyMetadataAttribute" Condition=" '$(SourceRevisionId)' != '' ">
|
||||
<AssemblyAttribute Include="System.Reflection.AssemblyMetadataAttribute" Condition="'$(SourceRevisionId)' != ''">
|
||||
<_Parameter1>CommitHash</_Parameter1>
|
||||
<_Parameter2>$(SourceRevisionId)</_Parameter2>
|
||||
</AssemblyAttribute>
|
||||
|
|
|
@ -151,9 +151,6 @@
|
|||
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform">
|
||||
<Version>6.2.12</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="StyleCop.Analyzers">
|
||||
<Version>1.0.2</Version>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Microsoft.Toolkit.Uwp.Input.GazeInteraction\Microsoft.Toolkit.Uwp.Input.GazeInteraction.csproj">
|
||||
|
@ -165,11 +162,6 @@
|
|||
<VisualStudioVersion>14.0</VisualStudioVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
<!-- No-op to avoid build error when packing solution from commandline -->
|
||||
<Target Name="Pack" />
|
||||
</Project>
|
|
@ -14,7 +14,6 @@
|
|||
Using the Namespace directive to apply reflection policy to all the types in a particular namespace
|
||||
<Namespace Name="DataClasses.ViewModels" Serialize="All" />
|
||||
-->
|
||||
|
||||
<Directives xmlns="http://schemas.microsoft.com/netfx/2013/01/metadata">
|
||||
<Application>
|
||||
<!--
|
||||
|
@ -22,10 +21,6 @@
|
|||
the application package. The asterisks are not wildcards.
|
||||
-->
|
||||
<Assembly Name="*Application*" Dynamic="Required All" />
|
||||
|
||||
|
||||
<!-- Add your application specific runtime directives here. -->
|
||||
|
||||
|
||||
</Application>
|
||||
</Directives>
|
|
@ -13,34 +13,35 @@
|
|||
</Description>
|
||||
<PackageTags>Windows;Community;Toolkit;WCT;UWP;Incremental;Loading;Collection;IncrementalLoadingCollection;String;Array;extensions;helpers</PackageTags>
|
||||
</PropertyGroup>
|
||||
<Choose>
|
||||
<When Condition=" '$(TargetFramework)' == 'netstandard1.4' ">
|
||||
<ItemGroup>
|
||||
|
||||
<!-- .NET Standard 1.4 doesn't have the Span<T> type, ValueTuple or the [Pure] attribute -->
|
||||
<Choose>
|
||||
<When Condition="'$(TargetFramework)' == 'netstandard1.4'">
|
||||
<!-- .NET Standard 1.4 doesn't have the Span<T> type, ValueTuple or the [Pure] attribute -->
|
||||
<ItemGroup>
|
||||
<PackageReference Include="System.Diagnostics.Contracts" Version="4.3.0" />
|
||||
<PackageReference Include="System.ValueTuple" Version="4.5.0" />
|
||||
<PackageReference Include="System.Memory" Version="4.5.4" />
|
||||
</ItemGroup>
|
||||
</When>
|
||||
<When Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
|
||||
<ItemGroup>
|
||||
|
||||
<!-- .NET Standard 2.0 doesn't have the Span<T> type -->
|
||||
<When Condition="'$(TargetFramework)' == 'netstandard2.0'">
|
||||
<!-- .NET Standard 2.0 doesn't have the Span<T> type -->
|
||||
<ItemGroup>
|
||||
<PackageReference Include="System.Memory" Version="4.5.4" />
|
||||
</ItemGroup>
|
||||
</When>
|
||||
<When Condition=" '$(TargetFramework)' == 'netstandard2.1' ">
|
||||
|
||||
<When Condition="'$(TargetFramework)' == 'netstandard2.1'">
|
||||
<PropertyGroup>
|
||||
<DefineConstants>NETSTANDARD2_1_OR_GREATER</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<!-- .NET Standard 2.1 doesn't have the Unsafe type -->
|
||||
<ItemGroup>
|
||||
|
||||
<!-- .NET Standard 2.1 doesn't have the Unsafe type -->
|
||||
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="5.0.0" />
|
||||
</ItemGroup>
|
||||
</When>
|
||||
<When Condition=" '$(TargetFramework)' == 'net5.0' ">
|
||||
|
||||
<When Condition="'$(TargetFramework)' == 'net5.0'">
|
||||
<PropertyGroup>
|
||||
<DefineConstants>NETSTANDARD2_1_OR_GREATER</DefineConstants>
|
||||
</PropertyGroup>
|
||||
|
|
|
@ -24,17 +24,19 @@
|
|||
</Description>
|
||||
<PackageTags>Windows;Community;Toolkit;WCT;UWP;core;standard;unsafe;span;memory;string;array;stream;buffer;extensions;helpers;parallel;performance</PackageTags>
|
||||
</PropertyGroup>
|
||||
<Choose>
|
||||
<When Condition=" '$(TargetFramework)' == 'netstandard1.4' ">
|
||||
<ItemGroup>
|
||||
|
||||
<!-- .NET Standard 1.4 lacks the [Pure] attribute, the Rectangle primitive,
|
||||
the Span<T> and Memory<T> types, the Vector<T> primitive and related APIs,
|
||||
ValueTask and ValueTask<T>, the Parallel class and the Unsafe class.
|
||||
We also need to reference the System.Runtime.CompilerServices.Unsafe package directly,
|
||||
even though System.Memory references it already, as we need a more recent version than
|
||||
the one bundled with it. This is so that we can use the Unsafe.Unbox<T> method,
|
||||
which is used by the Box<T> type in the package. -->
|
||||
<Choose>
|
||||
<When Condition="'$(TargetFramework)' == 'netstandard1.4'">
|
||||
<!--
|
||||
.NET Standard 1.4 lacks the [Pure] attribute, the Rectangle primitive,
|
||||
the Span<T> and Memory<T> types, the Vector<T> primitive and related APIs,
|
||||
ValueTask and ValueTask<T>, the Parallel class and the Unsafe class.
|
||||
We also need to reference the System.Runtime.CompilerServices.Unsafe package directly,
|
||||
even though System.Memory references it already, as we need a more recent version than
|
||||
the one bundled with it. This is so that we can use the Unsafe.Unbox<T> method,
|
||||
which is used by the Box<T> type in the package.
|
||||
-->
|
||||
<ItemGroup>
|
||||
<PackageReference Include="System.Diagnostics.Contracts" Version="4.3.0" />
|
||||
<PackageReference Include="System.Drawing.Primitives" Version="4.3.0" />
|
||||
<PackageReference Include="System.Memory" Version="4.5.4" />
|
||||
|
@ -44,65 +46,70 @@
|
|||
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="5.0.0" />
|
||||
</ItemGroup>
|
||||
</When>
|
||||
<When Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
|
||||
<ItemGroup>
|
||||
|
||||
<!-- .NET Standard 2.0 doesn't have the Span<T>, HashCode and ValueTask types -->
|
||||
<When Condition="'$(TargetFramework)' == 'netstandard2.0'">
|
||||
<!-- .NET Standard 2.0 doesn't have the Span<T>, HashCode and ValueTask types -->
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Bcl.HashCode" Version="1.1.0" />
|
||||
<PackageReference Include="System.Memory" Version="4.5.4" />
|
||||
<PackageReference Include="System.Threading.Tasks.Extensions" Version="4.5.4" />
|
||||
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="5.0.0" />
|
||||
</ItemGroup>
|
||||
</When>
|
||||
<When Condition=" '$(TargetFramework)' == 'netstandard2.1' ">
|
||||
<ItemGroup>
|
||||
|
||||
<!-- .NET Standard 2.1 doesn't have the Unsafe type -->
|
||||
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="5.0.0" />
|
||||
</ItemGroup>
|
||||
<When Condition="'$(TargetFramework)' == 'netstandard2.1'">
|
||||
<!--
|
||||
NETSTANDARD2_1_OR_GREATER: includes both .NET Standard 2.1 and .NET Core 3.1.
|
||||
This is needed because .NET Core 3.1 will be a separate package than .NET Standard 2.1.
|
||||
|
||||
SPAN_RUNTIME_SUPPORT: define a constant to indicate runtimes with runtime support for
|
||||
the fast Span<T> type, as well as some overloads with Span<T> parameters (eg. Stream.Write).
|
||||
In particular, these are runtimes which are able to create Span<T> instances from just
|
||||
a managed reference, which can be used to slice arbitrary objects not technically supported.
|
||||
This API (MemoryMarshal.CreateSpan) is not part of .NET Standard 2.0, but it is still
|
||||
available on .NET Core 2.1. So by using this constant, we can make sure to expose those
|
||||
APIs relying on that method on all target frameworks that are able to support them.
|
||||
-->
|
||||
<PropertyGroup>
|
||||
|
||||
<!-- NETSTANDARD2_1_OR_GREATER: includes both .NET Standard 2.1 and .NET Core 3.1.
|
||||
This is needed because .NET Core 3.1 will be a separate package than .NET Standard 2.1. -->
|
||||
|
||||
<!-- SPAN_RUNTIME_SUPPORT: define a constant to indicate runtimes with runtime support for
|
||||
the fast Span<T> type, as well as some overloads with Span<T> parameters (eg. Stream.Write).
|
||||
In particular, these are runtimes which are able to create Span<T> instances from just
|
||||
a managed reference, which can be used to slice arbitrary objects not technically supported.
|
||||
This API (MemoryMarshal.CreateSpan) is not part of .NET Standard 2.0, but it is still
|
||||
available on .NET Core 2.1. So by using this constant, we can make sure to expose those
|
||||
APIs relying on that method on all target frameworks that are able to support them. -->
|
||||
<DefineConstants>NETSTANDARD2_1_OR_GREATER;SPAN_RUNTIME_SUPPORT</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<!-- .NET Standard 2.1 doesn't have the Unsafe type -->
|
||||
<ItemGroup>
|
||||
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="5.0.0" />
|
||||
</ItemGroup>
|
||||
</When>
|
||||
<When Condition=" '$(TargetFramework)' == 'net5.0' ">
|
||||
|
||||
<When Condition="'$(TargetFramework)' == 'net5.0'">
|
||||
<PropertyGroup>
|
||||
<DefineConstants>NETSTANDARD2_1_OR_GREATER;SPAN_RUNTIME_SUPPORT</DefineConstants>
|
||||
</PropertyGroup>
|
||||
</When>
|
||||
<When Condition=" '$(TargetFramework)' == 'netcoreapp3.1' ">
|
||||
<ItemGroup>
|
||||
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="5.0.0" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup>
|
||||
|
||||
<!-- NETCORE_RUNTIME: to avoid issues with APIs that assume a specific memory layout, we define a
|
||||
.NET Core runtime constant to indicate either .NET Core 2.1 or .NET Core 3.1. These are
|
||||
runtimes with the same overall memory layout for objects (in particular: strings, SZ arrays,
|
||||
and ND arrays). We can use this constant to make sure that APIs that are exclusively available
|
||||
for .NET Standard targets do not make any assumtpion of any internals of the runtime being
|
||||
actually used by the consumers. .NET 5.0 would fall into this category as well, but we don't
|
||||
need to include that target as it offers APIs that don't require runtime-based workarounds.-->
|
||||
<When Condition="'$(TargetFramework)' == 'netcoreapp3.1'">
|
||||
<!--
|
||||
NETCORE_RUNTIME: to avoid issues with APIs that assume a specific memory layout, we define a
|
||||
.NET Core runtime constant to indicate either .NET Core 2.1 or .NET Core 3.1. These are
|
||||
runtimes with the same overall memory layout for objects (in particular: strings, SZ arrays,
|
||||
and ND arrays). We can use this constant to make sure that APIs that are exclusively available
|
||||
for .NET Standard targets do not make any assumtpion of any internals of the runtime being
|
||||
actually used by the consumers. .NET 5.0 would fall into this category as well, but we don't
|
||||
need to include that target as it offers APIs that don't require runtime-based workarounds.
|
||||
-->
|
||||
<PropertyGroup>
|
||||
<DefineConstants>NETSTANDARD2_1_OR_GREATER;SPAN_RUNTIME_SUPPORT;NETCORE_RUNTIME</DefineConstants>
|
||||
</PropertyGroup>
|
||||
</When>
|
||||
<When Condition=" '$(TargetFramework)' == 'netcoreapp2.1' ">
|
||||
<ItemGroup>
|
||||
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="5.0.0" />
|
||||
</ItemGroup>
|
||||
</When>
|
||||
|
||||
<When Condition="'$(TargetFramework)' == 'netcoreapp2.1'">
|
||||
<PropertyGroup>
|
||||
<DefineConstants>SPAN_RUNTIME_SUPPORT;NETCORE_RUNTIME</DefineConstants>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="5.0.0" />
|
||||
</ItemGroup>
|
||||
</When>
|
||||
</Choose>
|
||||
|
||||
|
|
|
@ -21,14 +21,14 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<!-- .NET Standard 2.0 doesn't have the Span<T> and IAsyncEnumerable<T> types -->
|
||||
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
|
||||
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
|
||||
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="5.0.0" />
|
||||
<PackageReference Include="System.ComponentModel.Annotations" Version="5.0.0" />
|
||||
<PackageReference Include="System.Memory" Version="4.5.4" />
|
||||
</ItemGroup>
|
||||
|
||||
<!-- .NET Standard 2.1 doesn't have the Unsafe type -->
|
||||
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.1' ">
|
||||
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.1'">
|
||||
<PackageReference Include="System.ComponentModel.Annotations" Version="5.0.0" />
|
||||
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="5.0.0" />
|
||||
</ItemGroup>
|
||||
|
|
|
@ -8,9 +8,7 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
<ProjectReference Include="..\Microsoft.Toolkit.Uwp\Microsoft.Toolkit.Uwp.csproj" />
|
||||
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
|
@ -1,32 +1,5 @@
|
|||
<!--
|
||||
This file contains Runtime Directives, specifications about types your application accesses
|
||||
through reflection and other dynamic code patterns. Runtime Directives are used to control the
|
||||
.NET Native optimizer and ensure that it does not remove code accessed by your library. If your
|
||||
library does not do any reflection, then you generally do not need to edit this file. However,
|
||||
if your library reflects over types, especially types passed to it or derived from its types,
|
||||
then you should write Runtime Directives.
|
||||
|
||||
The most common use of reflection in libraries is to discover information about types passed
|
||||
to the library. Runtime Directives have three ways to express requirements on types passed to
|
||||
your library.
|
||||
|
||||
1. Parameter, GenericParameter, TypeParameter, TypeEnumerableParameter
|
||||
Use these directives to reflect over types passed as a parameter.
|
||||
|
||||
2. SubTypes
|
||||
Use a SubTypes directive to reflect over types derived from another type.
|
||||
|
||||
3. AttributeImplies
|
||||
Use an AttributeImplies directive to indicate that your library needs to reflect over
|
||||
types or methods decorated with an attribute.
|
||||
|
||||
For more information on writing Runtime Directives for libraries, please visit
|
||||
https://go.microsoft.com/fwlink/?LinkID=391919
|
||||
-->
|
||||
<Directives xmlns="http://schemas.microsoft.com/netfx/2013/01/metadata">
|
||||
<Library Name="Microsoft.Toolkit.Uwp.Connectivity">
|
||||
|
||||
<!-- add directives for your library here -->
|
||||
|
||||
<!-- add directives for your library here -->
|
||||
</Library>
|
||||
</Directives>
|
|
@ -10,8 +10,6 @@
|
|||
-Themes : Provides the source path of the resource dictionaries for the FocusTracker.
|
||||
</Description>
|
||||
<PackageTags>Windows;Community;Toolkit;WCT;UWP;Controls;XAML;Developer;Tools;Accessibility;Alignment;Grid;AlignmentGrid</PackageTags>
|
||||
<!-- ARM64 builds for managed apps use .NET Native. We can't use the Reflection Provider for that. -->
|
||||
<EnableTypeInfoReflection Condition="'$(Configuration)' == 'Debug'">false</EnableTypeInfoReflection>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
@ -26,4 +24,5 @@
|
|||
<Message Text="CSFiles: @(GeneratedCSFiles->'"%(Identity)"')" />
|
||||
<Exec Command="for %%f in (@(GeneratedCSFiles->'"%(Identity)"')) do echo #pragma warning disable > %%f.temp && type %%f >> %%f.temp && move /y %%f.temp %%f > NUL" />
|
||||
</Target>
|
||||
|
||||
</Project>
|
|
@ -1,4 +1,5 @@
|
|||
<Directives xmlns="http://schemas.microsoft.com/netfx/2013/01/metadata">
|
||||
<Library Name="Microsoft.Toolkit.Uwp.DeveloperTools">
|
||||
<!-- add directives for your library here -->
|
||||
</Library>
|
||||
</Directives>
|
|
@ -2,12 +2,20 @@
|
|||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
#if WINRT
|
||||
using System.Collections.Generic;
|
||||
#endif
|
||||
#pragma warning disable SA1121 // UseBuiltInTypeAlias
|
||||
|
||||
using System;
|
||||
using Microsoft.Toolkit.Uwp.Notifications.Adaptive.Elements;
|
||||
|
||||
#if WINRT
|
||||
using System.Collections.Generic;
|
||||
using BindableProgressBarValue = Microsoft.Toolkit.Uwp.Notifications.AdaptiveProgressBarValue;
|
||||
using BindableString = System.String;
|
||||
#else
|
||||
using BindableProgressBarValue = Microsoft.Toolkit.Uwp.Notifications.BindableProgressBarValue;
|
||||
using BindableString = Microsoft.Toolkit.Uwp.Notifications.BindableString;
|
||||
#endif
|
||||
|
||||
namespace Microsoft.Toolkit.Uwp.Notifications
|
||||
{
|
||||
/// <summary>
|
||||
|
@ -25,46 +33,22 @@ namespace Microsoft.Toolkit.Uwp.Notifications
|
|||
/// <summary>
|
||||
/// Gets or sets an optional title string. Supports data binding.
|
||||
/// </summary>
|
||||
public
|
||||
#if WINRT
|
||||
string
|
||||
#else
|
||||
BindableString
|
||||
#endif
|
||||
Title { get; set; }
|
||||
public BindableString Title { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the value of the progress bar. Supports data binding. Defaults to 0.
|
||||
/// </summary>
|
||||
public
|
||||
#if WINRT
|
||||
AdaptiveProgressBarValue
|
||||
#else
|
||||
BindableProgressBarValue
|
||||
#endif
|
||||
Value { get; set; } = AdaptiveProgressBarValue.FromValue(0);
|
||||
public BindableProgressBarValue Value { get; set; } = AdaptiveProgressBarValue.FromValue(0);
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets an optional string to be displayed instead of the default percentage string. If this isn't provided, something like "70%" will be displayed.
|
||||
/// </summary>
|
||||
public
|
||||
#if WINRT
|
||||
string
|
||||
#else
|
||||
BindableString
|
||||
#endif
|
||||
ValueStringOverride { get; set; }
|
||||
public BindableString ValueStringOverride { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a status string (Required), which is displayed underneath the progress bar. This string should reflect the status of the operation, like "Downloading..." or "Installing..."
|
||||
/// </summary>
|
||||
public
|
||||
#if WINRT
|
||||
string
|
||||
#else
|
||||
BindableString
|
||||
#endif
|
||||
Status { get; set; }
|
||||
public BindableString Status { get; set; }
|
||||
|
||||
internal Element_AdaptiveProgressBar ConvertToElement()
|
||||
{
|
||||
|
|
|
@ -2,10 +2,17 @@
|
|||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
#pragma warning disable SA1121 // UseBuiltInTypeAlias
|
||||
|
||||
using System;
|
||||
using Microsoft.Toolkit.Uwp.Notifications.Adaptive.Elements;
|
||||
|
||||
#if WINRT
|
||||
using System.Collections.Generic;
|
||||
using BindableString = System.String;
|
||||
#else
|
||||
using BindableString = Microsoft.Toolkit.Uwp.Notifications.BindableString;
|
||||
#endif
|
||||
using Microsoft.Toolkit.Uwp.Notifications.Adaptive.Elements;
|
||||
|
||||
namespace Microsoft.Toolkit.Uwp.Notifications
|
||||
{
|
||||
|
@ -29,13 +36,7 @@ namespace Microsoft.Toolkit.Uwp.Notifications
|
|||
/// Gets or sets the text to display. Data binding support added in Creators Update,
|
||||
/// only works for toast top-level text elements.
|
||||
/// </summary>
|
||||
public
|
||||
#if WINRT
|
||||
string
|
||||
#else
|
||||
BindableString
|
||||
#endif
|
||||
Text { get; set; }
|
||||
public BindableString Text { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the target locale of the XML payload, specified as a BCP-47 language tags
|
||||
|
|
|
@ -3,82 +3,75 @@
|
|||
<PropertyGroup>
|
||||
<TargetFrameworks>netstandard1.4;uap10.0.19041;net461;netcoreapp3.1;net5.0;net5.0-windows10.0.17763.0;native</TargetFrameworks>
|
||||
<DefineConstants>$(DefineConstants);NETFX_CORE</DefineConstants>
|
||||
<ExtrasImplicitPlatformPackageIsPrivate Condition=" '$(TargetFramework)' == 'native' ">true</ExtrasImplicitPlatformPackageIsPrivate>
|
||||
<NuspecFile>Microsoft.Toolkit.Uwp.Notifications.nuspec</NuspecFile>
|
||||
</PropertyGroup>
|
||||
|
||||
<Choose>
|
||||
|
||||
<!--Desktop Win32 apps-->
|
||||
<When Condition="'$(TargetFramework)'=='net461' or '$(TargetFramework)'=='netcoreapp3.1'">
|
||||
<ItemGroup>
|
||||
<!--Reference Windows SDK NuGet of correct target platform version-->
|
||||
<PackageReference Include="Microsoft.Windows.SDK.Contracts" Version="10.0.19041.1" />
|
||||
</ItemGroup>
|
||||
</When>
|
||||
|
||||
</Choose>
|
||||
|
||||
<PropertyGroup Condition="'$(TargetFramework)'=='net461' or '$(TargetFramework)'=='netcoreapp3.1' or '$(TargetFramework)'=='net5.0-windows10.0.17763.0'">
|
||||
<!--Define the WINDOWS_UWP conditional symbol, since the Windows.Data.Xml and the Windows.UI.Notification namespaces are available-->
|
||||
<DefineConstants>$(DefineConstants);WINDOWS_UWP;WIN32</DefineConstants>
|
||||
</PropertyGroup>
|
||||
|
||||
<!--NET Core desktop apps also need the Registry NuGet package and System.Reflection.Emit for generating COM class dynamically-->
|
||||
<ItemGroup Condition="'$(TargetFramework)'=='netcoreapp3.1' or '$(TargetFramework)'=='net5.0-windows10.0.17763.0'">
|
||||
<PackageReference Include="Microsoft.Win32.Registry" Version="4.7.0" />
|
||||
<PackageReference Include="System.Reflection.Emit" Version="4.7.0" />
|
||||
<PackageReference Include="System.Drawing.Common" Version="4.7.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition=" '$(TargetFramework)' == 'native' ">
|
||||
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform" Version="$(ExtrasUwpMetaPackageVersion)" PrivateAssets="all" IsImplicitlyDefined="true" />
|
||||
</ItemGroup>
|
||||
|
||||
<!-- In order to support .NET Native, we need to include an appropriate .rd.xml for UWP (remove from everything else) -->
|
||||
<ItemGroup Condition="'$(TargetFramework)' != 'uap10.0.19041' and '$(TargetFramework)' != 'native'">
|
||||
<EmbeddedResource Remove="Properties\Microsoft.Toolkit.Uwp.Notifications.rd.xml" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Include="Microsoft.Toolkit.Uwp.Notifications.targets" Pack="true" PackagePath="build\native" />
|
||||
</ItemGroup>
|
||||
|
||||
<!--Native (C++) doesn't need System.ValueTuple (plus it's incompatible with this package)-->
|
||||
<ItemGroup Condition=" '$(TargetFramework)' != 'native' ">
|
||||
<PackageReference Include="System.ValueTuple" Version="4.5.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(TargetFramework)' == 'uap10.0.19041'">
|
||||
<TargetPlatformVersion>10.0.19041.0</TargetPlatformVersion>
|
||||
<DefaultTargetPlatformMinVersion>16299</DefaultTargetPlatformMinVersion>
|
||||
<TargetPlatformMinVersion>10.0.16299.0</TargetPlatformMinVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(TargetFramework)' == 'net461' or '$(TargetFramework)' == 'netcoreapp3.1' or '$(TargetFramework)' == 'net5.0-windows10.0.17763.0'">
|
||||
<!-- Define the WINDOWS_UWP conditional symbol, since the Windows.Data.Xml and the Windows.UI.Notification namespaces are available -->
|
||||
<DefineConstants>$(DefineConstants);WINDOWS_UWP;WIN32</DefineConstants>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(TargetFramework)' == 'native'">
|
||||
<OutputType>winmdobj</OutputType>
|
||||
<DebugType>Full</DebugType>
|
||||
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
|
||||
<!-- Workaround for issue NuGet/Home#8388; change behavior during NuGet restore time vs. final build to avoid NuGet conflict in VS 2019 -->
|
||||
<NugetTargetMoniker Condition="'$(DesignTimeBuild)' == 'true'">native</NugetTargetMoniker>
|
||||
<NugetTargetMoniker Condition="'$(DesignTimeBuild)' != 'true'">UAP,Version=v10.0</NugetTargetMoniker>
|
||||
<NuGetTargetMoniker Condition="'$(DesignTimeBuild)' == 'true'">native</NuGetTargetMoniker>
|
||||
<NuGetTargetMoniker Condition="'$(DesignTimeBuild)' != 'true'">UAP,Version=v10.0</NuGetTargetMoniker>
|
||||
<PackageTargetFallback>uap10.0</PackageTargetFallback>
|
||||
<TargetPlatformVersion>10.0.19041.0</TargetPlatformVersion>
|
||||
<DefaultTargetPlatformMinVersion>10240</DefaultTargetPlatformMinVersion>
|
||||
<TargetPlatformMinVersion>10.0.10240.0</TargetPlatformMinVersion>
|
||||
<DefineConstants Condition="'$(DisableImplicitFrameworkDefines)' != 'true'">$(DefineConstants);NETFX_CORE;WINDOWS_UWP;WINRT</DefineConstants>
|
||||
<DefineConstants Condition="'$(DisableImplicitFrameworkDefines)' != 'true'">$(DefineConstants);WINDOWS_UWP;WINRT</DefineConstants>
|
||||
<CopyLocalLockFileAssemblies Condition="'$(CopyLocalLockFileAssemblies)' == ''">false</CopyLocalLockFileAssemblies>
|
||||
<TargetFrameworkIdentifier>.NETCore</TargetFrameworkIdentifier>
|
||||
<TargetFrameworkVersion>v5.0</TargetFrameworkVersion>
|
||||
<LanguageTargets>$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v16.0\Microsoft.Windows.UI.Xaml.CSharp.targets</LanguageTargets>
|
||||
<ExtrasImplicitPlatformPackageIsPrivate>true</ExtrasImplicitPlatformPackageIsPrivate>
|
||||
|
||||
<!-- Need to override the built-in implicit defines for UAP or it'll be NETCORE5_0 -->
|
||||
<!-- this makes it UAP10_0_10240_0 to match the rest -->
|
||||
<!-- Need to override the built-in implicit defines for UAP or it'll be NETCORE5_0. This makes it UAP10_0_10240_0 to match the rest -->
|
||||
<ImplicitFrameworkDefine Condition="'$(DisableImplicitFrameworkDefines)' != 'true'">UAP$(TargetPlatformMinVersion.Replace('.', '_'))</ImplicitFrameworkDefine>
|
||||
<DisableImplicitFrameworkDefines Condition="'$(DisableImplicitFrameworkDefines)' != 'true'">true</DisableImplicitFrameworkDefines>
|
||||
</PropertyGroup>
|
||||
|
||||
<!--Set the nuspec properties. Dependent on version which isn't updated till after GetBuildVersion. Condition ensures we only set once since this runs multiple times for each target.-->
|
||||
<ItemGroup>
|
||||
<None Include="Microsoft.Toolkit.Uwp.Notifications.targets" Pack="true" PackagePath="build\native" />
|
||||
</ItemGroup>
|
||||
|
||||
<!-- In order to support .NET Native, we need to include an appropriate .rd.xml for UWP (remove from everything else) -->
|
||||
<ItemGroup Condition="'$(TargetFramework)' != 'uap10.0.19041' and '$(TargetFramework)' != 'native'">
|
||||
<EmbeddedResource Remove="Properties\Microsoft.Toolkit.Uwp.Notifications.rd.xml" />
|
||||
</ItemGroup>
|
||||
|
||||
<!-- Desktop Win32 apps -->
|
||||
<ItemGroup Condition="'$(TargetFramework)' == 'net461' or '$(TargetFramework)' == 'netcoreapp3.1'">
|
||||
<!-- Reference Windows SDK NuGet of correct target platform version -->
|
||||
<PackageReference Include="Microsoft.Windows.SDK.Contracts" Version="10.0.19041.1" />
|
||||
</ItemGroup>
|
||||
|
||||
<!-- The .NET Core desktop apps also need the Registry NuGet package and System.Reflection.Emit for generating COM class dynamically -->
|
||||
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1' or '$(TargetFramework)' == 'net5.0-windows10.0.17763.0'">
|
||||
<PackageReference Include="Microsoft.Win32.Registry" Version="4.7.0" />
|
||||
<PackageReference Include="System.Reflection.Emit" Version="4.7.0" />
|
||||
<PackageReference Include="System.Drawing.Common" Version="4.7.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="'$(TargetFramework)' == 'native'">
|
||||
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform" Version="$(ExtrasUwpMetaPackageVersion)" PrivateAssets="All" IsImplicitlyDefined="true" />
|
||||
</ItemGroup>
|
||||
|
||||
<!-- Native (C++) doesn't need 'System.ValueTuple' (plus it's incompatible with this package) -->
|
||||
<ItemGroup Condition="'$(TargetFramework)' != 'native'">
|
||||
<PackageReference Include="System.ValueTuple" Version="4.5.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<!-- Set the nuspec properties. Dependent on version which isn't updated till after 'GetBuildVersion'. Condition ensures we only set once since this runs multiple times for each target. -->
|
||||
<Target Name="SetNuspecProperties" AfterTargets="GetBuildVersion">
|
||||
<PropertyGroup Condition="'$(NuspecProperties)' == ''">
|
||||
<NuspecProperties>buildOutput=bin\$(Configuration);version=$(Version)</NuspecProperties>
|
||||
|
|
|
@ -3,11 +3,12 @@
|
|||
enabling the library to work in .NET Native even if developers modified their default rd.xml.
|
||||
See issue https://github.com/windows-toolkit/WindowsCommunityToolkit/issues/3093 for more details.
|
||||
-->
|
||||
|
||||
<Directives xmlns="http://schemas.microsoft.com/netfx/2013/01/metadata">
|
||||
<Library Name="Microsoft.Toolkit.Uwp.Notifications">
|
||||
<!-- TODO: We can potentially minimize the metadata needed, but further
|
||||
investigation is needed to fill this in and adequately test this -->
|
||||
<!--
|
||||
TODO: We can potentially minimize the metadata needed,
|
||||
but further investigation is needed to fill this in and adequately test this.
|
||||
-->
|
||||
<Assembly Name="Microsoft.Toolkit.Uwp.Notifications" Dynamic="Required All" />
|
||||
</Library>
|
||||
</Directives>
|
|
@ -281,6 +281,7 @@
|
|||
<Content Include="SamplePages\TabbedCommandBar\TabbedCommandBar.png" />
|
||||
<Content Include="SamplePages\Animations\Effects\FadeBehavior.png" />
|
||||
<Content Include="SamplePages\ColorPicker\ColorPicker.png" />
|
||||
<Content Include="SamplePages\MetadataControl\MetadataControl.png" />
|
||||
<Content Include="SamplePages\TilesBrush\TilesBrush.png" />
|
||||
<Content Include="SamplePages\Eyedropper\Eyedropper.png" />
|
||||
<Content Include="SamplePages\OnDevice\OnDevice.png" />
|
||||
|
@ -506,6 +507,9 @@
|
|||
<Compile Include="SamplePages\FocusBehavior\FocusBehaviorPage.xaml.cs">
|
||||
<DependentUpon>FocusBehaviorPage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="SamplePages\MetadataControl\MetadataControlPage.xaml.cs">
|
||||
<DependentUpon>MetadataControlPage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="SamplePages\TilesBrush\TilesBrushPage.xaml.cs">
|
||||
<DependentUpon>TilesBrushPage.xaml</DependentUpon>
|
||||
</Compile>
|
||||
|
@ -966,6 +970,13 @@
|
|||
<Content Include="SamplePages\TabbedCommandBar\TabbedCommandBar.bind">
|
||||
<SubType>Designer</SubType>
|
||||
</Content>
|
||||
<Content Include="SamplePages\MetadataControl\MetadataControlCode.bind">
|
||||
<SubType>Designer</SubType>
|
||||
</Content>
|
||||
<Page Include="SamplePages\MetadataControl\MetadataControlPage.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="SamplePages\CanvasPathGeometry\CanvasPathGeometryPage.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
|
@ -1478,8 +1489,6 @@
|
|||
<UseVSHostingProcess>false</UseVSHostingProcess>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
<!-- ARM64 builds for managed apps use .NET Native. We can't use the Reflection Provider for that. -->
|
||||
<EnableTypeInfoReflection>false</EnableTypeInfoReflection>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|ARM64'">
|
||||
<OutputPath>bin\ARM64\Release\</OutputPath>
|
||||
|
@ -1538,4 +1547,6 @@
|
|||
<Message Text="CSFiles: @(GeneratedCSFiles->'"%(Identity)"')" />
|
||||
<Exec Command="for %%f in (@(GeneratedCSFiles->'"%(Identity)"')) do echo #pragma warning disable > %%f.temp && type %%f | findstr /v /b "#pragma" >> %%f.temp && move /y %%f.temp %%f > NUL" />
|
||||
</Target>
|
||||
<!-- No-op to avoid build error when packing solution from commandline -->
|
||||
<Target Name="Pack" />
|
||||
</Project>
|
|
@ -12,14 +12,16 @@ namespace Microsoft.Toolkit.Uwp.SampleApp.Models
|
|||
|
||||
public string Title
|
||||
{
|
||||
get { return _title; } set { Set(ref _title, value); }
|
||||
get { return _title; }
|
||||
set { Set(ref _title, value); }
|
||||
}
|
||||
|
||||
private bool? _isFavorite = default(bool);
|
||||
|
||||
public bool? IsFavorite
|
||||
{
|
||||
get { return _isFavorite; } set { Set(ref _isFavorite, value); }
|
||||
get { return _isFavorite; }
|
||||
set { Set(ref _isFavorite, value); }
|
||||
}
|
||||
|
||||
private DelegateCommand _toggleFavorite = default(DelegateCommand);
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
Using the Namespace directive to apply reflection policy to all the types in a particular namespace
|
||||
<Namespace Name="DataClasses.ViewModels" Serialize="All" />
|
||||
-->
|
||||
|
||||
<Directives xmlns="http://schemas.microsoft.com/netfx/2013/01/metadata">
|
||||
<Application>
|
||||
<!--
|
||||
|
@ -22,13 +21,9 @@
|
|||
the application package. The asterisks are not wildcards.
|
||||
-->
|
||||
<Assembly Name="*Application*" Dynamic="Required All" />
|
||||
|
||||
|
||||
<!-- Add your application specific runtime directives here. -->
|
||||
<Type Name="Windows.UI.Xaml.Controls.Border" Dynamic="Required Public" />
|
||||
|
||||
<!-- Fix for https://github.com/windows-toolkit/WindowsCommunityToolkit/issues/3883 -->
|
||||
<Type Name="Windows.UI.Xaml.Controls.TextBlock" Dynamic="Required Public" />
|
||||
|
||||
</Application>
|
||||
</Directives>
|
Двоичные данные
Microsoft.Toolkit.Uwp.SampleApp/SamplePages/MetadataControl/MetadataControl.png
Normal file
Двоичные данные
Microsoft.Toolkit.Uwp.SampleApp/SamplePages/MetadataControl/MetadataControl.png
Normal file
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 883 B |
|
@ -0,0 +1,15 @@
|
|||
<Page
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="using:Microsoft.Toolkit.Uwp.UI.Controls"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
mc:Ignorable="d">
|
||||
|
||||
<StackPanel Padding="12">
|
||||
<controls:MetadataControl
|
||||
x:Name="metadataControl"
|
||||
Separator="@[Separator:String: • ]"
|
||||
AccessibleSeparator="@[AccessibleSeparator:String:, ]"/>
|
||||
</StackPanel>
|
||||
</Page>
|
|
@ -0,0 +1,12 @@
|
|||
<Page x:Class="Microsoft.Toolkit.Uwp.SampleApp.SamplePages.MetadataControlPage"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="using:Microsoft.Toolkit.Uwp.UI.Controls"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
mc:Ignorable="d">
|
||||
|
||||
<StackPanel Padding="12">
|
||||
<controls:MetadataControl x:Name="metadataControl" />
|
||||
</StackPanel>
|
||||
</Page>
|
|
@ -0,0 +1,83 @@
|
|||
// 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 System;
|
||||
using System.Collections.ObjectModel;
|
||||
using Microsoft.Toolkit.Uwp.SampleApp.Common;
|
||||
using Microsoft.Toolkit.Uwp.UI;
|
||||
using Microsoft.Toolkit.Uwp.UI.Controls;
|
||||
using Windows.UI.Xaml;
|
||||
using Windows.UI.Xaml.Controls;
|
||||
|
||||
namespace Microsoft.Toolkit.Uwp.SampleApp.SamplePages
|
||||
{
|
||||
/// <summary>
|
||||
/// A page that shows how to use the MetadataControl
|
||||
/// </summary>
|
||||
public sealed partial class MetadataControlPage : Page, IXamlRenderListener
|
||||
{
|
||||
private static readonly string[] Labels = "Lorem ipsum dolor sit amet consectetur adipiscing elit".Split(" ");
|
||||
|
||||
private readonly Random _random;
|
||||
private readonly ObservableCollection<MetadataItem> _units;
|
||||
private readonly DelegateCommand<object> _command;
|
||||
private MetadataControl _metadataControl;
|
||||
|
||||
public MetadataControlPage()
|
||||
{
|
||||
_random = new Random();
|
||||
_units = new ObservableCollection<MetadataItem>();
|
||||
_command = new DelegateCommand<object>(OnExecuteCommand);
|
||||
InitializeComponent();
|
||||
Setup();
|
||||
}
|
||||
|
||||
public void OnXamlRendered(FrameworkElement control)
|
||||
{
|
||||
_metadataControl = control.FindChild("metadataControl") as MetadataControl;
|
||||
if (_metadataControl != null)
|
||||
{
|
||||
_metadataControl.Items = _units;
|
||||
}
|
||||
}
|
||||
|
||||
private void Setup()
|
||||
{
|
||||
SampleController.Current.RegisterNewCommand("Add label", (sender, args) =>
|
||||
{
|
||||
_units.Add(new MetadataItem { Label = GetRandomLabel() });
|
||||
});
|
||||
|
||||
SampleController.Current.RegisterNewCommand("Add command", (sender, args) =>
|
||||
{
|
||||
var label = GetRandomLabel();
|
||||
_units.Add(new MetadataItem
|
||||
{
|
||||
Label = label,
|
||||
Command = _command,
|
||||
CommandParameter = label,
|
||||
});
|
||||
});
|
||||
|
||||
SampleController.Current.RegisterNewCommand("Clear", (sender, args) =>
|
||||
{
|
||||
_units.Clear();
|
||||
});
|
||||
}
|
||||
|
||||
private string GetRandomLabel() => Labels[_random.Next(Labels.Length)];
|
||||
|
||||
private async void OnExecuteCommand(object obj)
|
||||
{
|
||||
var dialog = new ContentDialog
|
||||
{
|
||||
Title = "Command invoked",
|
||||
Content = $"Command parameter: {obj}",
|
||||
CloseButtonText = "OK"
|
||||
};
|
||||
|
||||
await dialog.ShowAsync();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -33,8 +33,8 @@ private void PopToast()
|
|||
{
|
||||
// We'll just add two simple lines of text
|
||||
builder
|
||||
.AddText("Monday ? 63<36> / 42<34>")
|
||||
.AddText("Tuesday ? 57<35> / 38<33>");
|
||||
.AddText("Monday ⛅ 63° / 42°")
|
||||
.AddText("Tuesday ☁ 57° / 38°");
|
||||
}
|
||||
|
||||
// Set the base URI for the images, so we don't redundantly specify the entire path
|
||||
|
@ -76,7 +76,7 @@ public static TileContent GenerateTileContent()
|
|||
builder.AddTile(Notifications.TileSize.Small)
|
||||
.SetTextStacking(TileTextStacking.Center, Notifications.TileSize.Small)
|
||||
.AddText("Mon", Notifications.TileSize.Small, hintStyle: AdaptiveTextStyle.Body, hintAlign: AdaptiveTextAlign.Center)
|
||||
.AddText("63<EFBFBD>", Notifications.TileSize.Small, hintStyle: AdaptiveTextStyle.Base, hintAlign: AdaptiveTextAlign.Center);
|
||||
.AddText("63°", Notifications.TileSize.Small, hintStyle: AdaptiveTextStyle.Base, hintAlign: AdaptiveTextAlign.Center);
|
||||
|
||||
// Medium Tile
|
||||
builder.AddTile(Notifications.TileSize.Medium)
|
||||
|
@ -160,7 +160,7 @@ private static TileBindingContentAdaptive GenerateLargeTileContent()
|
|||
|
||||
new AdaptiveText()
|
||||
{
|
||||
Text = "63<EFBFBD> / 42<34>"
|
||||
Text = "63° / 42°"
|
||||
},
|
||||
|
||||
new AdaptiveText()
|
||||
|
@ -221,14 +221,14 @@ private static AdaptiveSubgroup GenerateSubgroup(string day, string img, int tem
|
|||
// High temp
|
||||
new AdaptiveText()
|
||||
{
|
||||
Text = tempHi + "<EFBFBD>",
|
||||
Text = tempHi + "°",
|
||||
HintAlign = AdaptiveTextAlign.Center
|
||||
},
|
||||
|
||||
// Low temp
|
||||
new AdaptiveText()
|
||||
{
|
||||
Text = tempLo + "<EFBFBD>",
|
||||
Text = tempLo + "°",
|
||||
HintAlign = AdaptiveTextAlign.Center,
|
||||
HintStyle = AdaptiveTextStyle.CaptionSubtle
|
||||
}
|
||||
|
@ -251,6 +251,6 @@ private static AdaptiveText GenerateLegacyToastText(string day, string weatherEm
|
|||
{
|
||||
return new AdaptiveText()
|
||||
{
|
||||
Text = $"{day} {weatherEmoji} {tempHi}<EFBFBD> / {tempLo}<7D>"
|
||||
Text = $"{day} {weatherEmoji} {tempHi}° / {tempLo}°"
|
||||
};
|
||||
}
|
|
@ -133,6 +133,16 @@
|
|||
"Icon": "/SamplePages/RadialProgressBar/RadialProgressBar.png",
|
||||
"DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/controls/RadialProgressBar.md"
|
||||
},
|
||||
{
|
||||
"Name": "MetadataControl",
|
||||
"Type": "MetadataControlPage",
|
||||
"Subcategory": "Status and Info",
|
||||
"About": "The control displays a list of metadata separated by bullets. The entries can either be strings or commands.",
|
||||
"CodeUrl": "https://github.com/windows-toolkit/WindowsCommunityToolkit/tree/master/Microsoft.Toolkit.Uwp.UI.Controls/MetadataControl",
|
||||
"XamlCodeFile": "MetadataControlCode.bind",
|
||||
"Icon": "/SamplePages/MetadataControl/MetadataControl.png",
|
||||
"DocumentationUrl": "https://raw.githubusercontent.com/MicrosoftDocs/WindowsCommunityToolkitDocs/master/docs/controls/MetadataControl.md"
|
||||
},
|
||||
{
|
||||
"Name": "RotatorTile",
|
||||
"Type": "RotatorTilePage",
|
||||
|
|
|
@ -133,8 +133,6 @@
|
|||
<PlatformTarget>ARM64</PlatformTarget>
|
||||
<UseVSHostingProcess>false</UseVSHostingProcess>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<!-- ARM64 builds for managed apps use .NET Native. We can't use the Reflection Provider for that. -->
|
||||
<EnableTypeInfoReflection>false</EnableTypeInfoReflection>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|ARM64'">
|
||||
<OutputPath>bin\ARM64\Release\</OutputPath>
|
||||
|
@ -147,14 +145,6 @@
|
|||
<ErrorReport>prompt</ErrorReport>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
<Target Name="Pack">
|
||||
<!-- No-op to avoid build error when packing solution from commandline -->
|
||||
</Target>
|
||||
<!-- No-op to avoid build error when packing solution from commandline -->
|
||||
<Target Name="Pack" />
|
||||
</Project>
|
|
@ -1,4 +1,5 @@
|
|||
<Directives xmlns="http://schemas.microsoft.com/netfx/2013/01/metadata">
|
||||
<Library Name="Microsoft.Toolkit.Uwp.UI.Animations">
|
||||
<!-- add directives for your library here -->
|
||||
</Library>
|
||||
</Directives>
|
|
@ -24,8 +24,9 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Microsoft.Toolkit.Uwp.UI\Microsoft.Toolkit.Uwp.UI.csproj" />
|
||||
<!-- TODO: Including Animation reference for now for initial refactor of the ScrollHeader behaviors, we may be able to remove, but may also have some Behaviors for Animations? -->
|
||||
<ProjectReference Include="..\Microsoft.Toolkit.Uwp.UI.Animations\Microsoft.Toolkit.Uwp.UI.Animations.csproj" />
|
||||
<ProjectReference Include="..\Microsoft.Toolkit.Uwp.UI\Microsoft.Toolkit.Uwp.UI.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
|
@ -1,4 +1,5 @@
|
|||
<Directives xmlns="http://schemas.microsoft.com/netfx/2013/01/metadata">
|
||||
<Library Name="Microsoft.Toolkit.Uwp.UI.Behaviors">
|
||||
<!-- add directives for your library here -->
|
||||
</Library>
|
||||
</Directives>
|
|
@ -0,0 +1,212 @@
|
|||
// 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 System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
using System.Text;
|
||||
using Windows.UI.Xaml;
|
||||
using Windows.UI.Xaml.Automation;
|
||||
using Windows.UI.Xaml.Automation.Peers;
|
||||
using Windows.UI.Xaml.Controls;
|
||||
using Windows.UI.Xaml.Documents;
|
||||
|
||||
namespace Microsoft.Toolkit.Uwp.UI.Controls
|
||||
{
|
||||
/// <summary>
|
||||
/// Display <see cref="MetadataItem"/>s separated by bullets.
|
||||
/// </summary>
|
||||
[TemplatePart(Name = TextContainerPart, Type = typeof(TextBlock))]
|
||||
public sealed class MetadataControl : Control
|
||||
{
|
||||
/// <summary>
|
||||
/// The DP to store the <see cref="Separator"/> property value.
|
||||
/// </summary>
|
||||
public static readonly DependencyProperty SeparatorProperty = DependencyProperty.Register(
|
||||
nameof(Separator),
|
||||
typeof(string),
|
||||
typeof(MetadataControl),
|
||||
new PropertyMetadata(" • ", OnPropertyChanged));
|
||||
|
||||
/// <summary>
|
||||
/// The DP to store the <see cref="AccessibleSeparator"/> property value.
|
||||
/// </summary>
|
||||
public static readonly DependencyProperty AccessibleSeparatorProperty = DependencyProperty.Register(
|
||||
nameof(AccessibleSeparator),
|
||||
typeof(string),
|
||||
typeof(MetadataControl),
|
||||
new PropertyMetadata(", ", OnPropertyChanged));
|
||||
|
||||
/// <summary>
|
||||
/// The DP to store the <see cref="Items"/> property value.
|
||||
/// </summary>
|
||||
public static readonly DependencyProperty ItemsProperty = DependencyProperty.Register(
|
||||
nameof(Items),
|
||||
typeof(IEnumerable<MetadataItem>),
|
||||
typeof(MetadataControl),
|
||||
new PropertyMetadata(null, OnMetadataItemsChanged));
|
||||
|
||||
/// <summary>
|
||||
/// The DP to store the TextBlockStyle value.
|
||||
/// </summary>
|
||||
public static readonly DependencyProperty TextBlockStyleProperty = DependencyProperty.Register(
|
||||
nameof(TextBlockStyle),
|
||||
typeof(Style),
|
||||
typeof(MetadataControl),
|
||||
new PropertyMetadata(null));
|
||||
|
||||
private const string TextContainerPart = "TextContainer";
|
||||
|
||||
private TextBlock _textContainer;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="MetadataControl"/> class.
|
||||
/// </summary>
|
||||
public MetadataControl()
|
||||
{
|
||||
DefaultStyleKey = typeof(MetadataControl);
|
||||
ActualThemeChanged += OnActualThemeChanged;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the separator to display between the <see cref="MetadataItem"/>.
|
||||
/// </summary>
|
||||
public string Separator
|
||||
{
|
||||
get => (string)GetValue(SeparatorProperty);
|
||||
set => SetValue(SeparatorProperty, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the separator that will be used to generate the accessible string representing the control content.
|
||||
/// </summary>
|
||||
public string AccessibleSeparator
|
||||
{
|
||||
get => (string)GetValue(AccessibleSeparatorProperty);
|
||||
set => SetValue(AccessibleSeparatorProperty, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the <see cref="MetadataItem"/> to display in the control.
|
||||
/// If it implements <see cref="INotifyCollectionChanged"/>, the control will automatically update itself.
|
||||
/// </summary>
|
||||
public IEnumerable<MetadataItem> Items
|
||||
{
|
||||
get => (IEnumerable<MetadataItem>)GetValue(ItemsProperty);
|
||||
set => SetValue(ItemsProperty, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the <see cref="Style"/> to use on the inner <see cref="TextBlock"/> control.
|
||||
/// </summary>
|
||||
public Style TextBlockStyle
|
||||
{
|
||||
get => (Style)GetValue(TextBlockStyleProperty);
|
||||
set => SetValue(TextBlockStyleProperty, value);
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
protected override void OnApplyTemplate()
|
||||
{
|
||||
_textContainer = GetTemplateChild(TextContainerPart) as TextBlock;
|
||||
Update();
|
||||
}
|
||||
|
||||
private static void OnMetadataItemsChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
||||
{
|
||||
var control = (MetadataControl)d;
|
||||
void OnCollectionChanged(object sender, NotifyCollectionChangedEventArgs args) => control.Update();
|
||||
|
||||
if (e.OldValue is INotifyCollectionChanged oldNcc)
|
||||
{
|
||||
oldNcc.CollectionChanged -= OnCollectionChanged;
|
||||
}
|
||||
|
||||
if (e.NewValue is INotifyCollectionChanged newNcc)
|
||||
{
|
||||
newNcc.CollectionChanged += OnCollectionChanged;
|
||||
}
|
||||
|
||||
control.Update();
|
||||
}
|
||||
|
||||
private static void OnPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
|
||||
=> ((MetadataControl)d).Update();
|
||||
|
||||
private void OnActualThemeChanged(FrameworkElement sender, object args) => Update();
|
||||
|
||||
private void Update()
|
||||
{
|
||||
if (_textContainer is null)
|
||||
{
|
||||
// The template is not ready yet.
|
||||
return;
|
||||
}
|
||||
|
||||
_textContainer.Inlines.Clear();
|
||||
|
||||
if (Items is null)
|
||||
{
|
||||
AutomationProperties.SetName(_textContainer, string.Empty);
|
||||
NotifyLiveRegionChanged();
|
||||
return;
|
||||
}
|
||||
|
||||
Inline unitToAppend;
|
||||
var accessibleString = new StringBuilder();
|
||||
foreach (var unit in Items)
|
||||
{
|
||||
if (_textContainer.Inlines.Count > 0)
|
||||
{
|
||||
_textContainer.Inlines.Add(new Run { Text = Separator });
|
||||
accessibleString.Append(AccessibleSeparator ?? Separator);
|
||||
}
|
||||
|
||||
unitToAppend = new Run
|
||||
{
|
||||
Text = unit.Label,
|
||||
};
|
||||
|
||||
if (unit.Command != null)
|
||||
{
|
||||
var hyperLink = new Hyperlink
|
||||
{
|
||||
UnderlineStyle = UnderlineStyle.None,
|
||||
Foreground = _textContainer.Foreground,
|
||||
};
|
||||
hyperLink.Inlines.Add(unitToAppend);
|
||||
|
||||
void OnHyperlinkClicked(Hyperlink sender, HyperlinkClickEventArgs args)
|
||||
{
|
||||
if (unit.Command.CanExecute(unit.CommandParameter))
|
||||
{
|
||||
unit.Command.Execute(unit.CommandParameter);
|
||||
}
|
||||
}
|
||||
|
||||
hyperLink.Click += OnHyperlinkClicked;
|
||||
|
||||
unitToAppend = hyperLink;
|
||||
}
|
||||
|
||||
var unitAccessibleLabel = unit.AccessibleLabel ?? unit.Label;
|
||||
AutomationProperties.SetName(unitToAppend, unitAccessibleLabel);
|
||||
accessibleString.Append(unitAccessibleLabel);
|
||||
|
||||
_textContainer.Inlines.Add(unitToAppend);
|
||||
}
|
||||
|
||||
AutomationProperties.SetName(_textContainer, accessibleString.ToString());
|
||||
NotifyLiveRegionChanged();
|
||||
}
|
||||
|
||||
private void NotifyLiveRegionChanged()
|
||||
{
|
||||
if (AutomationPeer.ListenerExists(AutomationEvents.LiveRegionChanged))
|
||||
{
|
||||
var peer = FrameworkElementAutomationPeer.FromElement(this);
|
||||
peer?.RaiseAutomationEvent(AutomationEvents.LiveRegionChanged);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="using:Microsoft.Toolkit.Uwp.UI.Controls">
|
||||
|
||||
<Style TargetType="controls:MetadataControl">
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="controls:MetadataControl">
|
||||
<TextBlock x:Name="TextContainer"
|
||||
Style="{TemplateBinding TextBlockStyle}" />
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
</ResourceDictionary>
|
|
@ -0,0 +1,37 @@
|
|||
// 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 System.Windows.Input;
|
||||
|
||||
namespace Microsoft.Toolkit.Uwp.UI.Controls
|
||||
{
|
||||
/// <summary>
|
||||
/// An item to display in <see cref="MetadataControl"/>.
|
||||
/// </summary>
|
||||
public struct MetadataItem
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the label of the item.
|
||||
/// </summary>
|
||||
public string Label { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the automation name that will be set on the item.
|
||||
/// If not set, <see cref="Label"/> will be used.
|
||||
/// </summary>
|
||||
public string AccessibleLabel { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the command associated to the item.
|
||||
/// If null, the item will be displayed as a text field.
|
||||
/// If set, the item will be displayed as an hyperlink.
|
||||
/// </summary>
|
||||
public ICommand Command { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the parameter that will be provided to the <see cref="Command"/>.
|
||||
/// </summary>
|
||||
public object CommandParameter { get; set; }
|
||||
}
|
||||
}
|
|
@ -32,8 +32,6 @@
|
|||
Text;Tool;Bar ;TextToolBar ;ToolBar ;Markdown;
|
||||
Tile;Control ;TileControl ;
|
||||
</PackageTags>
|
||||
<!-- ARM64 builds for managed apps use .NET Native. We can't use the Reflection Provider for that. -->
|
||||
<EnableTypeInfoReflection Condition="'$(Configuration)' == 'Debug'">false</EnableTypeInfoReflection>
|
||||
<LangVersion>9.0</LangVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
|
@ -63,4 +61,5 @@
|
|||
<Message Text="CSFiles: @(GeneratedCSFiles->'"%(Identity)"')" />
|
||||
<Exec Command="for %%f in (@(GeneratedCSFiles->'"%(Identity)"')) do echo #pragma warning disable > %%f.temp && type %%f >> %%f.temp && move /y %%f.temp %%f > NUL" />
|
||||
</Target>
|
||||
|
||||
</Project>
|
|
@ -7,6 +7,7 @@
|
|||
<ResourceDictionary Source="ms-appx:///Microsoft.Toolkit.Uwp.UI.Controls.Core/InAppNotification/InAppNotification.xaml" />
|
||||
<ResourceDictionary Source="ms-appx:///Microsoft.Toolkit.Uwp.UI.Controls.Core/Loading/Loading.xaml" />
|
||||
<ResourceDictionary Source="ms-appx:///Microsoft.Toolkit.Uwp.UI.Controls.Core/Menu/Menu.xaml" />
|
||||
<ResourceDictionary Source="ms-appx:///Microsoft.Toolkit.Uwp.UI.Controls.Core/MetadataControl/MetadataControl.xaml" />
|
||||
<ResourceDictionary Source="ms-appx:///Microsoft.Toolkit.Uwp.UI.Controls.Core/RadialProgressBar/RadialProgressBar.xaml" />
|
||||
<ResourceDictionary Source="ms-appx:///Microsoft.Toolkit.Uwp.UI.Controls.Core/RotatorTile/RotatorTile.xaml" />
|
||||
<ResourceDictionary Source="ms-appx:///Microsoft.Toolkit.Uwp.UI.Controls.Core/TabbedCommandBar/TabbedCommandBar.xaml" />
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
<Project Sdk="MSBuild.Sdk.Extras">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>uap10.0.17763</TargetFrameworks>
|
||||
<Title>Windows Community Toolkit Controls DataGrid</Title>
|
||||
|
@ -8,8 +9,6 @@
|
|||
</Description>
|
||||
<PackageTags>Windows;Community;Toolkit;WCT;UWP;Controls;XAML;Data;Grid;DataGrid</PackageTags>
|
||||
<RootNamespace>Microsoft.Toolkit.Uwp.UI.Controls</RootNamespace>
|
||||
<!-- ARM64 builds for managed apps use .NET Native. We can't use the Reflection Provider for that. -->
|
||||
<EnableTypeInfoReflection Condition="'$(Configuration)' == 'Debug'">false</EnableTypeInfoReflection>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
@ -44,4 +43,5 @@
|
|||
<Message Text="CSFiles: @(GeneratedCSFiles->'"%(Identity)"')" />
|
||||
<Exec Command="for %%f in (@(GeneratedCSFiles->'"%(Identity)"')) do echo #pragma warning disable > %%f.temp && type %%f >> %%f.temp && move /y %%f.temp %%f > NUL" />
|
||||
</Target>
|
||||
|
||||
</Project>
|
|
@ -1,4 +1,5 @@
|
|||
<Directives xmlns="http://schemas.microsoft.com/netfx/2013/01/metadata">
|
||||
<Library Name="Microsoft.Toolkit.Uwp.UI.Controls.DataGrid">
|
||||
<!-- add directives for your library here -->
|
||||
</Library>
|
||||
</Directives>
|
|
@ -21,8 +21,6 @@
|
|||
Remote;Device;Picker;RemoteDevicePicker;DevicePicker;RemoteDevice;
|
||||
Tokenizing;Text;Box ;TokenizingTextBox ;TextBox ;
|
||||
</PackageTags>
|
||||
<!-- ARM64 builds for managed apps use .NET Native. We can't use the Reflection Provider for that. -->
|
||||
<EnableTypeInfoReflection Condition="'$(Configuration)' == 'Debug'">false</EnableTypeInfoReflection>
|
||||
<LangVersion>8.0</LangVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
|
@ -53,4 +51,5 @@
|
|||
<Message Text="CSFiles: @(GeneratedCSFiles->'"%(Identity)"')" />
|
||||
<Exec Command="for %%f in (@(GeneratedCSFiles->'"%(Identity)"')) do echo #pragma warning disable > %%f.temp && type %%f >> %%f.temp && move /y %%f.temp %%f > NUL" />
|
||||
</Target>
|
||||
|
||||
</Project>
|
|
@ -30,7 +30,6 @@
|
|||
Orbit;View ;OrbitView ;
|
||||
</PackageTags>
|
||||
<RootNamespace>Microsoft.Toolkit.Uwp.UI.Controls</RootNamespace>
|
||||
<EnableTypeInfoReflection Condition="'$(Configuration)' == 'Debug'">false</EnableTypeInfoReflection>
|
||||
<LangVersion>8.0</LangVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
|
@ -60,4 +59,5 @@
|
|||
<Message Text="CSFiles: @(GeneratedCSFiles->'"%(Identity)"')" />
|
||||
<Exec Command="for %%f in (@(GeneratedCSFiles->'"%(Identity)"')) do echo #pragma warning disable > %%f.temp && type %%f >> %%f.temp && move /y %%f.temp %%f > NUL" />
|
||||
</Target>
|
||||
|
||||
</Project>
|
|
@ -1,4 +1,5 @@
|
|||
<Project Sdk="MSBuild.Sdk.Extras">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>uap10.0.17763</TargetFrameworks>
|
||||
<Title>Windows Community Toolkit Controls Markdown</Title>
|
||||
|
@ -8,8 +9,6 @@
|
|||
</Description>
|
||||
<PackageTags>Windows;Community;Toolkit;WCT;UWP;Controls;XAML;Markdown;Text;Block;MarkdownTextBlock</PackageTags>
|
||||
<RootNamespace>Microsoft.Toolkit.Uwp.UI.Controls</RootNamespace>
|
||||
<!-- ARM64 builds for managed apps use .NET Native. We can't use the Reflection Provider for that. -->
|
||||
<EnableTypeInfoReflection Condition="'$(Configuration)' == 'Debug'">false</EnableTypeInfoReflection>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
@ -48,4 +47,5 @@
|
|||
</ItemGroup>
|
||||
<!--<Message Text="Files After: @(PackagingOutputs)" Importance="high" />-->
|
||||
</Target>
|
||||
|
||||
</Project>
|
|
@ -17,8 +17,6 @@
|
|||
Image;Cropper ;ImageCropper ;Crop;
|
||||
Infinite;Canvas;InfiniteCanvas;
|
||||
</PackageTags>
|
||||
<!-- ARM64 builds for managed apps use .NET Native. We can't use the Reflection Provider for that. -->
|
||||
<EnableTypeInfoReflection Condition="'$(Configuration)' == 'Debug'">false</EnableTypeInfoReflection>
|
||||
<LangVersion>8.0</LangVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
|
@ -46,4 +44,5 @@
|
|||
<Message Text="CSFiles: @(GeneratedCSFiles->'"%(Identity)"')" />
|
||||
<Exec Command="for %%f in (@(GeneratedCSFiles->'"%(Identity)"')) do echo #pragma warning disable > %%f.temp && type %%f >> %%f.temp && move /y %%f.temp %%f > NUL" />
|
||||
</Target>
|
||||
|
||||
</Project>
|
|
@ -1,58 +1,57 @@
|
|||
<Project Sdk="MSBuild.Sdk.Extras">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>uap10.0.17763</TargetFrameworks>
|
||||
<Title>Windows Community Toolkit Primitive Controls</Title>
|
||||
<Description>
|
||||
This library provides controls for use in XAML which don't provide their own style. It is part of the Windows Community Toolkit.
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>uap10.0.17763</TargetFrameworks>
|
||||
<Title>Windows Community Toolkit Primitive Controls</Title>
|
||||
<Description>
|
||||
This library provides controls for use in XAML which don't provide their own style. It is part of the Windows Community Toolkit.
|
||||
|
||||
Controls:
|
||||
- AdaptiveGridView: Presents items in an evenly-spaced set of columns to fill the total available space.
|
||||
- DockPanel: Define areas where you can arrange child elements either horizontally or vertically, relative to each other.
|
||||
- StaggeredLayout: Layout of items in a column approach where an item will be added to whichever column has used the least amount of space.
|
||||
- StaggeredPanel: Layout of items in a column approach where an item will be added to whichever column has used the least amount of space.
|
||||
- SwitchPresenter: A presenter which can act as a switch statement for layout providing alternate layouts based on a value.
|
||||
- UniformGrid: Presents items in an evenly-spaced set of rows or columns to fill the total available display space.
|
||||
- WrapLayout: Positions child elements in sequential position from left to right and breaks content to the next line.
|
||||
- WrapPanel: Positions child elements in sequential position from left to right and breaks content to the next line.
|
||||
</Description>
|
||||
<PackageTags>
|
||||
Windows;Community;Toolkit;WCT;UWP;Controls;XAML;
|
||||
Adaptive;Grid;View;AdaptiveGridView;GridView ;AdaptiveGrid ;
|
||||
Dock;Panel ;DockPanel ;
|
||||
Staggered;Layout ;StaggeredLayout ;
|
||||
Staggered;Panel ;StaggeredPanel ;
|
||||
Switch;Presenter ;SwitchPresenter ;
|
||||
Uniform;Grid ;UniformGrid ;
|
||||
Wrap;Layout ;WrapLayout ;
|
||||
Wrap;Panel ;WrapPanel ;
|
||||
</PackageTags>
|
||||
<!-- ARM64 builds for managed apps use .NET Native. We can't use the Reflection Provider for that. -->
|
||||
<EnableTypeInfoReflection Condition="'$(Configuration)' == 'Debug'">false</EnableTypeInfoReflection>
|
||||
<LangVersion>8.0</LangVersion>
|
||||
</PropertyGroup>
|
||||
Controls:
|
||||
- AdaptiveGridView: Presents items in an evenly-spaced set of columns to fill the total available space.
|
||||
- DockPanel: Define areas where you can arrange child elements either horizontally or vertically, relative to each other.
|
||||
- StaggeredLayout: Layout of items in a column approach where an item will be added to whichever column has used the least amount of space.
|
||||
- StaggeredPanel: Layout of items in a column approach where an item will be added to whichever column has used the least amount of space.
|
||||
- SwitchPresenter: A presenter which can act as a switch statement for layout providing alternate layouts based on a value.
|
||||
- UniformGrid: Presents items in an evenly-spaced set of rows or columns to fill the total available display space.
|
||||
- WrapLayout: Positions child elements in sequential position from left to right and breaks content to the next line.
|
||||
- WrapPanel: Positions child elements in sequential position from left to right and breaks content to the next line.
|
||||
</Description>
|
||||
<PackageTags>
|
||||
Windows;Community;Toolkit;WCT;UWP;Controls;XAML;
|
||||
Adaptive;Grid;View;AdaptiveGridView;GridView ;AdaptiveGrid ;
|
||||
Dock;Panel ;DockPanel ;
|
||||
Staggered;Layout ;StaggeredLayout ;
|
||||
Staggered;Panel ;StaggeredPanel ;
|
||||
Switch;Presenter ;SwitchPresenter ;
|
||||
Uniform;Grid ;UniformGrid ;
|
||||
Wrap;Layout ;WrapLayout ;
|
||||
Wrap;Panel ;WrapPanel ;
|
||||
</PackageTags>
|
||||
<LangVersion>8.0</LangVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Microsoft.Toolkit.Uwp.UI\Microsoft.Toolkit.Uwp.UI.csproj" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Microsoft.Toolkit.Uwp.UI\Microsoft.Toolkit.Uwp.UI.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.UI.Xaml" Version="2.5.0" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.UI.Xaml" Version="2.5.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Include="VisualStudioToolsManifest.xml" Pack="true" PackagePath="tools" />
|
||||
<None Include="$(OutDir)\Design\$(MSBuildProjectName).Design*.dll;$(OutDir)\Design\$(MSBuildProjectName).Design*.pdb" Pack="true" PackagePath="lib\$(TargetFramework)\Design" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="VisualStudioToolsManifest.xml" Pack="true" PackagePath="tools" />
|
||||
<None Include="$(OutDir)\Design\$(MSBuildProjectName).Design*.dll;$(OutDir)\Design\$(MSBuildProjectName).Design*.pdb" Pack="true" PackagePath="lib\$(TargetFramework)\Design" />
|
||||
</ItemGroup>
|
||||
|
||||
<Import Project="$(MSBuildSDKExtrasTargets)" Condition="Exists('$(MSBuildSDKExtrasTargets)')" />
|
||||
<Import Project="$(MSBuildSDKExtrasTargets)" Condition="Exists('$(MSBuildSDKExtrasTargets)')" />
|
||||
|
||||
<!-- https://weblogs.asp.net/rweigelt/disable-warnings-in-generated-c-files-of-uwp-app -->
|
||||
<Target Name="PragmaWarningDisablePrefixer" AfterTargets="MarkupCompilePass2">
|
||||
<ItemGroup>
|
||||
<GeneratedCSFiles Include="**\*.g.cs;**\*.g.i.cs" />
|
||||
</ItemGroup>
|
||||
<Message Text="CSFiles: @(GeneratedCSFiles->'"%(Identity)"')" />
|
||||
<Exec Command="for %%f in (@(GeneratedCSFiles->'"%(Identity)"')) do echo #pragma warning disable > %%f.temp && type %%f >> %%f.temp && move /y %%f.temp %%f > NUL" />
|
||||
</Target>
|
||||
|
||||
<!-- https://weblogs.asp.net/rweigelt/disable-warnings-in-generated-c-files-of-uwp-app -->
|
||||
<Target Name="PragmaWarningDisablePrefixer" AfterTargets="MarkupCompilePass2">
|
||||
<ItemGroup>
|
||||
<GeneratedCSFiles Include="**\*.g.cs;**\*.g.i.cs" />
|
||||
</ItemGroup>
|
||||
<Message Text="CSFiles: @(GeneratedCSFiles->'"%(Identity)"')" />
|
||||
<Exec Command="for %%f in (@(GeneratedCSFiles->'"%(Identity)"')) do echo #pragma warning disable > %%f.temp && type %%f >> %%f.temp && move /y %%f.temp %%f > NUL" />
|
||||
</Target>
|
||||
</Project>
|
|
@ -1,4 +1,5 @@
|
|||
<Directives xmlns="http://schemas.microsoft.com/netfx/2013/01/metadata">
|
||||
<Library Name="Microsoft.Toolkit.Uwp.UI.Controls.Primitives">
|
||||
<!-- add directives for your library here -->
|
||||
</Library>
|
||||
</Directives>
|
|
@ -1,4 +1,5 @@
|
|||
<Project Sdk="MSBuild.Sdk.Extras">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>uap10.0.17763</TargetFrameworks>
|
||||
<Title>Windows Community Toolkit Controls</Title>
|
||||
|
@ -11,7 +12,7 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Include="$(MSBuildThisFileDirectory)readme.txt" Pack="true" PackagePath="\"/>
|
||||
<None Include="$(MSBuildThisFileDirectory)ReadMe.txt" Pack="true" PackagePath="\" />
|
||||
<ProjectReference Include="..\Microsoft.Toolkit.Uwp.UI.Controls.Primitives\Microsoft.Toolkit.Uwp.UI.Controls.Primitives.csproj" />
|
||||
<ProjectReference Include="..\Microsoft.Toolkit.Uwp.UI.Controls.Core\Microsoft.Toolkit.Uwp.UI.Controls.Core.csproj" />
|
||||
<ProjectReference Include="..\Microsoft.Toolkit.Uwp.UI.Controls.Media\Microsoft.Toolkit.Uwp.UI.Controls.Media.csproj" />
|
||||
|
@ -20,4 +21,5 @@
|
|||
<ProjectReference Include="..\Microsoft.Toolkit.Uwp.UI.Controls.Layout\Microsoft.Toolkit.Uwp.UI.Controls.Layout.csproj" />
|
||||
<ProjectReference Include="..\Microsoft.Toolkit.Uwp.UI.Controls.Input\Microsoft.Toolkit.Uwp.UI.Controls.Input.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
|
@ -1,30 +1,32 @@
|
|||
Thanks for installing the Windows Community Toolkit Controls NuGet package!
|
||||
Windows Community Toolkit — UWP Controls
|
||||
|
||||
Thanks for installing the “Windows Community Toolkit — UI Controls” package!
|
||||
|
||||
This is a meta-package made up of various Windows Community Toolkit packages.
|
||||
It is for your ease and convenience to use all of the controls available!
|
||||
It is for your ease and convenience to use any and all controls available!
|
||||
|
||||
You also have the option to only use packages you need which can help optimize the
|
||||
size of your application once you are ready to ship. Visit https://aka.ms/wct/optimize to learn more.
|
||||
|
||||
You can find out more about the Windows Community Toolkit at https://aka.ms/windowstoolkit
|
||||
Or even try our controls in our sample app at https://aka.ms/windowstoolkitapp
|
||||
Docs are available here: https://aka.ms/windowstoolkitdocs
|
||||
You can find out more about the Windows Community Toolkit at https://aka.ms/windowstoolkit.
|
||||
Or even try our controls in our sample app at https://aka.ms/windowstoolkitapp.
|
||||
Docs are available here: https://aka.ms/windowstoolkitdocs.
|
||||
|
||||
The Windows Community Toolkit is made possible by our developer community!
|
||||
Every contribution made to the Toolkit helps everyone, to learn how to contribute visit https://aka.ms/wct/wiki
|
||||
Every contribution made to the Toolkit helps everyone, to learn how to contribute visit https://aka.ms/wct/wiki.
|
||||
|
||||
----
|
||||
|
||||
This package also depends on the WinUI library, so you'll need to set XamlControlsResources as your Application resources in App.xaml:
|
||||
This package also depends on the "WinUI" library, so you'll need to set "XamlControlsResources" as your Application resources in "App.xaml":
|
||||
|
||||
<Application>
|
||||
<Application.Resources>
|
||||
<XamlControlsResources xmlns="using:Microsoft.UI.Xaml.Controls" />
|
||||
</Application.Resources>
|
||||
</Application>
|
||||
<Application>
|
||||
<Application.Resources>
|
||||
<XamlControlsResources xmlns="using:Microsoft.UI.Xaml.Controls" />
|
||||
</Application.Resources>
|
||||
</Application>
|
||||
|
||||
If you have other resources, then we recommend you add those to the XamlControlsResources' MergedDictionaries.
|
||||
This works with the platform's resource system to allow overrides of the XamlControlsResources resources.
|
||||
If you have other resources, then we recommend you add those to the "XamlControlsResources.MergedDictionaries".
|
||||
This works with the platform's resource system to allow overrides of the "XamlControlsResources" resources.
|
||||
|
||||
<Application
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
|
@ -39,4 +41,4 @@ This works with the platform's resource system to allow overrides of the XamlCon
|
|||
</Application.Resources>
|
||||
</Application>
|
||||
|
||||
See http://aka.ms/winui for more information about the WinUI library.
|
||||
See http://aka.ms/winui for more information about the "WinUI" library.
|
|
@ -50,4 +50,5 @@
|
|||
<ItemGroup>
|
||||
<ProjectReference Include="..\Microsoft.Toolkit.Uwp.UI.Animations\Microsoft.Toolkit.Uwp.UI.Animations.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
|
@ -1,4 +1,5 @@
|
|||
<Directives xmlns="http://schemas.microsoft.com/netfx/2013/01/metadata">
|
||||
<Library Name="Microsoft.Toolkit.Uwp.UI.Media">
|
||||
<!-- add directives for your library here -->
|
||||
</Library>
|
||||
</Directives>
|
|
@ -1,4 +1,5 @@
|
|||
<Directives xmlns="http://schemas.microsoft.com/netfx/2013/01/metadata">
|
||||
<Library Name="Microsoft.Toolkit.Uwp.UI">
|
||||
<!-- add directives for your library here -->
|
||||
</Library>
|
||||
</Directives>
|
|
@ -232,7 +232,7 @@ namespace Microsoft.Toolkit.Uwp
|
|||
.ContinueWith(
|
||||
t =>
|
||||
{
|
||||
if(t.IsFaulted)
|
||||
if (t.IsFaulted)
|
||||
{
|
||||
throw t.Exception;
|
||||
}
|
||||
|
|
|
@ -9,9 +9,7 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
<ProjectReference Include="..\Microsoft.Toolkit\Microsoft.Toolkit.csproj" />
|
||||
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
|
@ -76,4 +76,6 @@
|
|||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(WapProjPath)\Microsoft.DesktopBridge.targets" />
|
||||
<!-- No-op to avoid build error when packing solution from commandline -->
|
||||
<Target Name="Pack" />
|
||||
</Project>
|
|
@ -14,14 +14,14 @@
|
|||
<PackageTags>Windows;Community;Toolkit;WCT;UWP;Incremental;Loading;Collection;IncrementalLoadingCollection;String;Array;extensions;helpers</PackageTags>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- .NET Standard 1.4 doesn't have the [Pure] attribute -->
|
||||
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard1.4' ">
|
||||
<PackageReference Include="System.Diagnostics.Contracts" Version="4.3.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<!-- .NET Standard 2.1 and .NET 5 already have [NotNullIfNotNull] and [NotNullWhen] -->
|
||||
<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard2.1' OR '$(TargetFramework)' == 'net5.0' ">
|
||||
<PropertyGroup Condition="'$(TargetFramework)' == 'netstandard2.1' OR '$(TargetFramework)' == 'net5.0'">
|
||||
<DefineConstants>NETSTANDARD2_1_OR_GREATER</DefineConstants>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- .NET Standard 1.4 doesn't have the [Pure] attribute -->
|
||||
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard1.4'">
|
||||
<PackageReference Include="System.Diagnostics.Contracts" Version="4.3.0" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
|
@ -14,7 +14,6 @@
|
|||
Using the Namespace directive to apply reflection policy to all the types in a particular namespace
|
||||
<Namespace Name="DataClasses.ViewModels" Serialize="All" />
|
||||
-->
|
||||
|
||||
<Directives xmlns="http://schemas.microsoft.com/netfx/2013/01/metadata">
|
||||
<Application>
|
||||
<!--
|
||||
|
@ -22,10 +21,6 @@
|
|||
the application package. The asterisks are not wildcards.
|
||||
-->
|
||||
<Assembly Name="*Application*" Dynamic="Required All" />
|
||||
|
||||
|
||||
<!-- Add your application specific runtime directives here. -->
|
||||
|
||||
|
||||
</Application>
|
||||
</Directives>
|
|
@ -111,7 +111,7 @@
|
|||
<!-- Only the Layout package have a dependency on WinUI -->
|
||||
<ItemGroup Condition="$(CurrentProject) == 'UWPBaselineWinUI' or $(CurrentProject) == 'Microsoft.Toolkit.Uwp.UI.Controls.Layout'">
|
||||
<PackageReference Include="Microsoft.UI.Xaml">
|
||||
<Version>2.4.3</Version>
|
||||
<Version>2.5.0</Version>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="'$(CurrentProject)' != '' and '$(CurrentProject)' != 'UWPBaseline' and '$(CurrentProject)' != 'UWPBaselineWinUI' and '$(NuGetPackageVersion)' != 'To Fill In With Local Version Number'">
|
||||
|
@ -123,10 +123,12 @@
|
|||
<Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" />
|
||||
<Target Name="BeforeBuild">
|
||||
<ItemGroup Condition="$(CurrentProject) != 'UWPBaseline' and '$(CurrentProject)' != 'UWPBaselineWinUI'">
|
||||
<ToolkitNugets Include="../bin/nupkg/$(CurrentProject).*.nupkg"/>
|
||||
<ToolkitNuget Condition="$([System.Text.RegularExpressions.Regex]::IsMatch('%(Identity)', `$(CurrentProject).([0-9]+)\.([0-9]+)\.([0-9]+)(?:-([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?(?:\+[0-9A-Za-z-]+)?.nupkg`))" Include="@(ToolkitNugets)"/>
|
||||
<ToolkitNuGets Include="$(MSBuildThisFileDirectory)..\bin\nupkg\$(CurrentProject).*.nupkg" />
|
||||
<ToolkitNuGet Condition="$([System.Text.RegularExpressions.Regex]::IsMatch('%(Identity)', `$(CurrentProject).([0-9]+)\.([0-9]+)\.([0-9]+)(?:-([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?(?:\+[0-9A-Za-z-]+)?.nupkg`))" Include="@(ToolkitNuGets)" />
|
||||
</ItemGroup>
|
||||
<Error Condition="'@(ToolkitNuget)' == '' and $(CurrentProject) != 'UWPBaseline' and '$(CurrentProject)' != 'UWPBaselineWinUI'" Text="NuGet $(CurrentProject).[SEMVER].nupkg doesn't exist!"/>
|
||||
<Error Condition="'$(CurrentProject)' != 'UWPBaseline' and '$(CurrentProject)' != 'UWPBaselineWinUI' and '$(NuGetPackageVersion)' == 'To Fill In With Local Version Number'" Text="Please set NuGetPackageVersion at the top of SmokeTest.csproj with the version to smoke test locally."/>
|
||||
<Error Condition="'@(ToolkitNuGet)' == '' and $(CurrentProject) != 'UWPBaseline' and '$(CurrentProject)' != 'UWPBaselineWinUI'" Text="NuGet '$(CurrentProject).[SEMVER].nupkg' doesn't exist!" />
|
||||
<Error Condition="'$(CurrentProject)' != 'UWPBaseline' and '$(CurrentProject)' != 'UWPBaselineWinUI' and '$(NuGetPackageVersion)' == 'To Fill In With Local Version Number'" Text="Please set 'NuGetPackageVersion' at the top of 'SmokeTest.csproj' with the version to smoke test locally." />
|
||||
</Target>
|
||||
<!-- No-op to avoid build error when packing solution from commandline -->
|
||||
<Target Name="Pack" />
|
||||
</Project>
|
|
@ -49,10 +49,10 @@
|
|||
|
||||
<MSBuild Projects="SmokeTest.csproj"
|
||||
Targets="restore;build"
|
||||
Properties="CurrentProject=%(ProjectsToBuild.Identity);Configuration=%(ProjectsToBuild.Configuration);Platform=%(ProjectsToBuild.Platform);NuGetPackageVersion=$(NuGetPackageVersion)"/>
|
||||
Properties="CurrentProject=%(ProjectsToBuild.Identity);Configuration=%(ProjectsToBuild.Configuration);Platform=%(ProjectsToBuild.Platform);NuGetPackageVersion=$(NuGetPackageVersion)" />
|
||||
</Target>
|
||||
|
||||
<Target Name="ChooseProjectsToBuild" DependsOnTargets="CheckNugets">
|
||||
<Target Name="ChooseProjectsToBuild" DependsOnTargets="CheckNuGets">
|
||||
<ItemGroup>
|
||||
<BuildPlatform Include="$(BuildPlatforms)" />
|
||||
<BuildConfiguration Include="$(BuildConfigurations)" />
|
||||
|
@ -80,14 +80,14 @@
|
|||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<Target Name="CheckNugets">
|
||||
<Target Name="CheckNuGets">
|
||||
<PropertyGroup>
|
||||
<ToolkitNugets>../bin/nupkg/*.nupkg</ToolkitNugets>
|
||||
<ToolkitNuGets>$(MSBuildThisFileDirectory)..\bin\nupkg\*.nupkg</ToolkitNuGets>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<ToolkitNugets Include="$(ToolkitNugets)" />
|
||||
<ToolkitNuGets Include="$(ToolkitNuGets)" />
|
||||
</ItemGroup>
|
||||
<Error Condition="'@(ToolkitNugets)' == ''" Text="Directory '$(ToolkitNugets)' is empty"/>
|
||||
<Error Condition="'@(ToolkitNuGets)' == ''" Text="Directory '$(ToolkitNuGets)' is empty" />
|
||||
</Target>
|
||||
|
||||
</Project>
|
|
@ -14,7 +14,6 @@
|
|||
Using the Namespace directive to apply reflection policy to all the types in a particular namespace
|
||||
<Namespace Name="DataClasses.ViewModels" Serialize="All" />
|
||||
-->
|
||||
|
||||
<Directives xmlns="http://schemas.microsoft.com/netfx/2013/01/metadata">
|
||||
<Application>
|
||||
<!--
|
||||
|
@ -22,10 +21,6 @@
|
|||
the application package. The asterisks are not wildcards.
|
||||
-->
|
||||
<Assembly Name="*Application*" Dynamic="Required All" />
|
||||
|
||||
|
||||
<!-- Add your application specific runtime directives here. -->
|
||||
|
||||
|
||||
</Application>
|
||||
</Directives>
|
|
@ -28,8 +28,6 @@
|
|||
<AppxPackageSigningEnabled>True</AppxPackageSigningEnabled>
|
||||
<IsTestHost>true</IsTestHost>
|
||||
</PropertyGroup>
|
||||
<Target Name="Pack">
|
||||
</Target>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\x86\Debug\</OutputPath>
|
||||
|
@ -242,12 +240,7 @@
|
|||
<VisualStudioVersion>14.0</VisualStudioVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
<Import Project="..\UITests.Tests.Shared\UITests.Tests.Shared.projitems" Label="Shared" />
|
||||
<!-- No-op to avoid build error when packing solution from commandline -->
|
||||
<Target Name="Pack" />
|
||||
</Project>
|
|
@ -56,7 +56,7 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Include="MainClass.cs"/>
|
||||
<Compile Include="MainClass.cs" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<!-- .NET Core 2.1 doesn't have the Unsafe type -->
|
||||
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.1' ">
|
||||
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp2.1'">
|
||||
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="5.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
Using the Namespace directive to apply reflection policy to all the types in a particular namespace
|
||||
<Namespace Name="DataClasses.ViewModels" Serialize="All" />
|
||||
-->
|
||||
|
||||
<Directives xmlns="http://schemas.microsoft.com/netfx/2013/01/metadata">
|
||||
<Application>
|
||||
<!--
|
||||
|
@ -23,7 +22,5 @@
|
|||
-->
|
||||
<Assembly Name="*Application*" Dynamic="Required All" />
|
||||
<!-- Add your application specific runtime directives here. -->
|
||||
|
||||
|
||||
</Application>
|
||||
</Directives>
|
|
@ -20,8 +20,6 @@
|
|||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<LangVersion>8.0</LangVersion>
|
||||
</PropertyGroup>
|
||||
<Target Name="Pack">
|
||||
</Target>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\x86\Debug\</OutputPath>
|
||||
|
@ -173,11 +171,6 @@
|
|||
<VisualStudioVersion>14.0</VisualStudioVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
<!-- No-op to avoid build error when packing solution from commandline -->
|
||||
<Target Name="Pack" />
|
||||
</Project>
|
|
@ -8,14 +8,14 @@
|
|||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="FluentAssertions" Version="5.10.3" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.0.1" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.7.1" />
|
||||
<PackageReference Include="MSTest.TestAdapter" Version="2.1.2" />
|
||||
<PackageReference Include="MSTest.TestFramework" Version="2.1.2" />
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="3.1.5" />
|
||||
</ItemGroup>
|
||||
|
||||
<!-- Workaround for the .NET Core 2.1 binary not resolving the Unsafe assembly properly -->
|
||||
<ItemGroup Condition=" '$(TargetFramework)' == 'netcoreapp2.1' ">
|
||||
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp2.1'">
|
||||
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="5.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
Using the Namespace directive to apply reflection policy to all the types in a particular namespace
|
||||
<Namespace Name="DataClasses.ViewModels" Serialize="All" />
|
||||
-->
|
||||
|
||||
<Directives xmlns="http://schemas.microsoft.com/netfx/2013/01/metadata">
|
||||
<Application>
|
||||
<!--
|
||||
|
@ -23,7 +22,5 @@
|
|||
-->
|
||||
<Assembly Name="*Application*" Dynamic="Required All" />
|
||||
<!-- Add your application specific runtime directives here. -->
|
||||
|
||||
|
||||
</Application>
|
||||
</Directives>
|
|
@ -18,8 +18,6 @@
|
|||
<UnitTestPlatformVersion Condition="'$(UnitTestPlatformVersion)' == ''">$(VisualStudioVersion)</UnitTestPlatformVersion>
|
||||
<AppxPackageSigningEnabled>false</AppxPackageSigningEnabled>
|
||||
</PropertyGroup>
|
||||
<Target Name="Pack">
|
||||
</Target>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\x86\Debug\</OutputPath>
|
||||
|
@ -179,11 +177,6 @@
|
|||
<VisualStudioVersion>14.0</VisualStudioVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
<!-- No-op to avoid build error when packing solution from commandline -->
|
||||
<Target Name="Pack" />
|
||||
</Project>
|
|
@ -14,7 +14,6 @@
|
|||
Using the Namespace directive to apply reflection policy to all the types in a particular namespace
|
||||
<Namespace Name="DataClasses.ViewModels" Serialize="All" />
|
||||
-->
|
||||
|
||||
<Directives xmlns="http://schemas.microsoft.com/netfx/2013/01/metadata">
|
||||
<Application>
|
||||
<!--
|
||||
|
@ -23,7 +22,5 @@
|
|||
-->
|
||||
<Assembly Name="*Application*" Dynamic="Required All" />
|
||||
<!-- Add your application specific runtime directives here. -->
|
||||
|
||||
|
||||
</Application>
|
||||
</Directives>
|
|
@ -18,8 +18,6 @@
|
|||
<UnitTestPlatformVersion Condition="'$(UnitTestPlatformVersion)' == ''">$(VisualStudioVersion)</UnitTestPlatformVersion>
|
||||
<AppxPackageSigningEnabled>false</AppxPackageSigningEnabled>
|
||||
</PropertyGroup>
|
||||
<Target Name="Pack">
|
||||
</Target>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\x86\Debug\</OutputPath>
|
||||
|
@ -178,11 +176,6 @@
|
|||
</Reference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
<!-- No-op to avoid build error when packing solution from commandline -->
|
||||
<Target Name="Pack" />
|
||||
</Project>
|
|
@ -77,7 +77,7 @@ namespace UnitTests.Converters
|
|||
|
||||
Assert.AreEqual(DependencyProperty.UnsetValue, converter.Convert(null, null, null, null));
|
||||
Assert.AreEqual(DependencyProperty.UnsetValue, converter.Convert("Hello world", null, null, null));
|
||||
}
|
||||
}
|
||||
|
||||
[TestCategory("Converters")]
|
||||
[UITestMethod]
|
||||
|
|
|
@ -126,17 +126,17 @@ namespace UnitTests.Extensions
|
|||
await App.DispatcherQueue.EnqueueAsync(() =>
|
||||
{
|
||||
var treeRoot = XamlReader.Load(@"<Page
|
||||
xmlns=""http://schemas.microsoft.com/winfx/2006/xaml/presentation""
|
||||
xmlns:x=""http://schemas.microsoft.com/winfx/2006/xaml""> <!-- Starting Point -->
|
||||
<Grid>
|
||||
xmlns=""http://schemas.microsoft.com/winfx/2006/xaml/presentation""
|
||||
xmlns:x=""http://schemas.microsoft.com/winfx/2006/xaml""> <!-- Starting Point -->
|
||||
<Grid>
|
||||
<Border/>
|
||||
<StackPanel>
|
||||
<TextBox/>
|
||||
<TextBlock/> <!-- Target -->
|
||||
</StackPanel>
|
||||
<Grid>
|
||||
<Border/>
|
||||
<StackPanel>
|
||||
<TextBox/>
|
||||
<TextBlock/> <!-- Target -->
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Page>") as Page;
|
||||
|
||||
// Test Setup
|
||||
|
|
|
@ -36,8 +36,9 @@ namespace UnitTests.Markdown.Parse
|
|||
public void Paragraph_NoLineBreak_OneSpace()
|
||||
{
|
||||
// A line break in the markup does not translate to a line break in the resulting formatted text.
|
||||
AssertEqual(CollapseWhitespace(@"
|
||||
line 1
|
||||
var space = " ";
|
||||
AssertEqual(CollapseWhitespace($@"
|
||||
line 1{space}
|
||||
line 2"),
|
||||
new ParagraphBlock().AddChildren(
|
||||
new TextRunInline { Text = "line 1 line 2" }));
|
||||
|
@ -48,9 +49,10 @@ namespace UnitTests.Markdown.Parse
|
|||
public void Paragraph_LineBreak()
|
||||
{
|
||||
// Two spaces at the end of the line results in a line break.
|
||||
AssertEqual(CollapseWhitespace(@"
|
||||
line 1
|
||||
line 2 with *italic
|
||||
var spaces = " ";
|
||||
AssertEqual(CollapseWhitespace($@"
|
||||
line 1{spaces}
|
||||
line 2 with *italic{spaces}
|
||||
formatting*"),
|
||||
new ParagraphBlock().AddChildren(
|
||||
new TextRunInline { Text = "line 1\r\nline 2 with " },
|
||||
|
@ -63,8 +65,9 @@ namespace UnitTests.Markdown.Parse
|
|||
public void Paragraph_LineBreak_ThreeSpaces()
|
||||
{
|
||||
// Three spaces at the end of the line also results in a line break.
|
||||
AssertEqual(CollapseWhitespace(@"
|
||||
line 1
|
||||
var spaces = " ";
|
||||
AssertEqual(CollapseWhitespace($@"
|
||||
line 1{spaces}
|
||||
line 2"),
|
||||
new ParagraphBlock().AddChildren(
|
||||
new TextRunInline { Text = "line 1 \r\nline 2" }));
|
||||
|
@ -90,9 +93,10 @@ namespace UnitTests.Markdown.Parse
|
|||
public void Paragraph_NewParagraph_Whitespace()
|
||||
{
|
||||
// A line that contains only whitespace starts a new paragraph.
|
||||
AssertEqual(CollapseWhitespace(@"
|
||||
var spaces = " ";
|
||||
AssertEqual(CollapseWhitespace($@"
|
||||
line 1
|
||||
|
||||
{spaces}
|
||||
line 2"),
|
||||
new ParagraphBlock().AddChildren(
|
||||
new TextRunInline { Text = "line 1" }),
|
||||
|
@ -379,11 +383,14 @@ namespace UnitTests.Markdown.Parse
|
|||
♥
|
||||
♦"),
|
||||
new ParagraphBlock().AddChildren(
|
||||
new TextRunInline { Text = @""" & ' < > ¡ ¢ £ ¤ ¥ ¦ § ¨ © ª « ¬ ® ¯ ° ± ² ³ ´ µ ¶ · ¸ ¹ º » ¼ ½ ¾ " +
|
||||
new TextRunInline
|
||||
{
|
||||
Text = @""" & ' < > ¡ ¢ £ ¤ ¥ ¦ § ¨ © ª « ¬ ® ¯ ° ± ² ³ ´ µ ¶ · ¸ ¹ º » ¼ ½ ¾ " +
|
||||
"¿ À Á Â Ã Ä Å Æ Ç È É Ê Ë Ì Í Î Ï Ð Ñ Ò Ó Ô Õ Ö × Ø Ù Ú Û Ü Ý Þ ß à á â ã ä å æ ç è é ê ë ì í î ï ð ñ ò ó ô " +
|
||||
"õ ö ÷ ø ù ú û ü ý þ ÿ Œ œ Š š Ÿ ƒ ˆ ˜ Α Β Γ Δ Ε Ζ Η Θ Ι Κ Λ Μ Ν Ξ Ο Π Ρ Σ Τ Υ Φ Χ Ψ Ω α β γ δ ε ζ η θ ι κ λ " +
|
||||
"μ ν ξ ο π ρ ς σ τ υ φ χ ψ ω ϑ ϒ ϖ – — ‘ ’ ‚ “ ” „ † ‡ • … ‰ ′ ″ ‹ › ‾ ⁄ € ℑ ℘ ℜ ™ ℵ ← ↑ → ↓ ↔ ↵ ⇐ " +
|
||||
"⇑ ⇒ ⇓ ⇔ ∀ ∂ ∃ ∅ ∇ ∈ ∉ ∋ ∏ ∑ − ∗ √ ∝ ∞ ∠ ∧ ∨ ∩ ∪ ∫ ∴ ∼ ≅ ≈ ≠ ≡ ≤ ≥ ⊂ ⊃ ⊄ ⊆ ⊇ ⊕ ⊗ ⊥ ⋅ ⌈ ⌉ ⌊ ⌋ 〈 〉 ◊ ♠ ♣ ♥ ♦" }));
|
||||
"⇑ ⇒ ⇓ ⇔ ∀ ∂ ∃ ∅ ∇ ∈ ∉ ∋ ∏ ∑ − ∗ √ ∝ ∞ ∠ ∧ ∨ ∩ ∪ ∫ ∴ ∼ ≅ ≈ ≠ ≡ ≤ ≥ ⊂ ⊃ ⊄ ⊆ ⊇ ⊕ ⊗ ⊥ ⋅ ⌈ ⌉ ⌊ ⌋ 〈 〉 ◊ ♠ ♣ ♥ ♦"
|
||||
}));
|
||||
}
|
||||
#pragma warning restore CS0618 // Type or member is obsolete
|
||||
}
|
||||
|
|
|
@ -29,10 +29,11 @@ namespace UnitTests.Markdown.Parse
|
|||
[TestCategory("Parse - block")]
|
||||
public void Quote_MultiLine_1()
|
||||
{
|
||||
AssertEqual(CollapseWhitespace(@"
|
||||
var spaces = " ";
|
||||
AssertEqual(CollapseWhitespace($@"
|
||||
> Single line
|
||||
|
||||
>Quote
|
||||
>Quote{spaces}
|
||||
with line break
|
||||
|
||||
|
||||
|
@ -96,11 +97,12 @@ namespace UnitTests.Markdown.Parse
|
|||
[TestCategory("Parse - block")]
|
||||
public void Quote_Nested()
|
||||
{
|
||||
AssertEqual(CollapseWhitespace(@"
|
||||
var empty = string.Empty;
|
||||
AssertEqual(CollapseWhitespace($@"
|
||||
>Quoted
|
||||
>>Nested quote
|
||||
>Still nested
|
||||
|
||||
{empty}
|
||||
>Not nested"),
|
||||
new QuoteBlock().AddChildren(
|
||||
new ParagraphBlock().AddChildren(
|
||||
|
@ -178,10 +180,11 @@ namespace UnitTests.Markdown.Parse
|
|||
[TestCategory("Parse - block")]
|
||||
public void Quote_WithCode()
|
||||
{
|
||||
AssertEqual(CollapseWhitespace(@"
|
||||
var empty = string.Empty;
|
||||
AssertEqual(CollapseWhitespace($@"
|
||||
> code, line 1
|
||||
>
|
||||
|
||||
{empty}
|
||||
> code, line 4"),
|
||||
|
||||
new QuoteBlock().AddChildren(
|
||||
|
@ -192,10 +195,11 @@ namespace UnitTests.Markdown.Parse
|
|||
[TestCategory("Parse - block")]
|
||||
public void Quote_WithList()
|
||||
{
|
||||
AssertEqual(CollapseWhitespace(@"
|
||||
var empty = string.Empty;
|
||||
AssertEqual(CollapseWhitespace($@"
|
||||
> code, line 1
|
||||
>
|
||||
|
||||
{empty}
|
||||
> code, line 4"),
|
||||
|
||||
new QuoteBlock().AddChildren(
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
Using the Namespace directive to apply reflection policy to all the types in a particular namespace
|
||||
<Namespace Name="DataClasses.ViewModels" Serialize="All" />
|
||||
-->
|
||||
|
||||
<Directives xmlns="http://schemas.microsoft.com/netfx/2013/01/metadata">
|
||||
<Application>
|
||||
<!--
|
||||
|
@ -25,10 +24,10 @@
|
|||
|
||||
<!-- Add your application specific runtime directives here. -->
|
||||
<Type Name="Windows.UI.Xaml.Controls.Page" Serialize="Required All" />
|
||||
|
||||
<Type Name="Windows.UI.Xaml.Controls.FontIcon" Dynamic="Required All" Serialize="Required All" />
|
||||
<Type Name="Windows.UI.Xaml.Controls.BitmapIcon" Dynamic="Required All" Serialize="Required All" />
|
||||
<Type Name="UnitTests.Extensions.MockSwipeItem" Dynamic="Required All" Serialize="Required All" />
|
||||
|
||||
<Type Name="System.Collections.Generic.IList{Windows.UI.Xaml.Automation.Peers.AutomationPeer}" MarshalObject="Required All"/>
|
||||
|
||||
<Type Name="Microsoft.Toolkit.Uwp.UI.BitmapIconExtension" Dynamic="Required All" Serialize="Required All"/>
|
||||
<Type Name="Microsoft.Toolkit.Uwp.UI.FontIconExtension" Dynamic="Required All" Serialize="Required All"/>
|
||||
|
@ -37,7 +36,6 @@
|
|||
<Type Name="Microsoft.Toolkit.Uwp.UI.SymbolIconSourceExtension" Dynamic="Required All" Serialize="Required All"/>
|
||||
<Type Name="Microsoft.Toolkit.Uwp.UI.EnumValuesExtension" Dynamic="Required All" Serialize="Required All"/>
|
||||
|
||||
<Type Name="System.Collections.Generic.IList{Windows.UI.Xaml.Automation.Peers.AutomationPeer}" MarshalObject="Required All"/>
|
||||
|
||||
<Type Name="UnitTests.Extensions.MockSwipeItem" Dynamic="Required All" Serialize="Required All" />
|
||||
</Application>
|
||||
</Directives>
|
|
@ -19,8 +19,6 @@
|
|||
<AppxPackageSigningEnabled>false</AppxPackageSigningEnabled>
|
||||
<LangVersion>9.0</LangVersion>
|
||||
</PropertyGroup>
|
||||
<Target Name="Pack">
|
||||
</Target>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\x86\Debug\</OutputPath>
|
||||
|
@ -546,11 +544,6 @@
|
|||
<Prefer32Bit>true</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
<!-- No-op to avoid build error when packing solution from commandline -->
|
||||
<Target Name="Pack" />
|
||||
</Project>
|
|
@ -94,4 +94,6 @@
|
|||
</_FilteredNonWapProjProjectOutput>
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
<!-- No-op to avoid build error when packing solution from commandline -->
|
||||
<Target Name="Pack" />
|
||||
</Project>
|
|
@ -14,7 +14,6 @@
|
|||
Using the Namespace directive to apply reflection policy to all the types in a particular namespace
|
||||
<Namespace Name="DataClasses.ViewModels" Serialize="All" />
|
||||
-->
|
||||
|
||||
<Directives xmlns="http://schemas.microsoft.com/netfx/2013/01/metadata">
|
||||
<Application>
|
||||
<!--
|
||||
|
@ -22,10 +21,6 @@
|
|||
the application package. The asterisks are not wildcards.
|
||||
-->
|
||||
<Assembly Name="*Application*" Dynamic="Required All" />
|
||||
|
||||
|
||||
<!-- Add your application specific runtime directives here. -->
|
||||
|
||||
|
||||
</Application>
|
||||
</Directives>
|
|
@ -17,8 +17,6 @@
|
|||
<ProjectTypeGuids>{A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||
<WindowsXamlEnableOverview>true</WindowsXamlEnableOverview>
|
||||
<AppxPackageSigningEnabled>false</AppxPackageSigningEnabled>
|
||||
<EnableTypeInfoReflection>false</EnableTypeInfoReflection>
|
||||
<EnableXBindDiagnostics>false</EnableXBindDiagnostics>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
|
@ -225,11 +223,6 @@
|
|||
<VisualStudioVersion>14.0</VisualStudioVersion>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
<!-- No-op to avoid build error when packing solution from commandline -->
|
||||
<Target Name="Pack" />
|
||||
</Project>
|
Загрузка…
Ссылка в новой задаче