Merge branch 'main' into metadataControl

This commit is contained in:
Vincent 2021-06-16 09:14:57 +02:00 коммит произвёл GitHub
Родитель 3dcaf4ff9e 6c63d55528
Коммит e6d3c3b3b2
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
69 изменённых файлов: 341 добавлений и 449 удалений

Просмотреть файл

Просмотреть файл

@ -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->'&quot;%(Identity)&quot;')" />
<Exec Command="for %%f in (@(GeneratedCSFiles->'&quot;%(Identity)&quot;')) do echo #pragma warning disable &gt; %%f.temp &amp;&amp; type %%f &gt;&gt; %%f.temp &amp;&amp; move /y %%f.temp %%f &gt; 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>

Просмотреть файл

@ -1489,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>
@ -1549,4 +1547,6 @@
<Message Text="CSFiles: @(GeneratedCSFiles->'&quot;%(Identity)&quot;')" />
<Exec Command="for %%f in (@(GeneratedCSFiles->'&quot;%(Identity)&quot;')) do echo #pragma warning disable &gt; %%f.temp &amp;&amp; type %%f | findstr /v /b &quot;#pragma&quot; &gt;&gt; %%f.temp &amp;&amp; move /y %%f.temp %%f &gt; 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>

Просмотреть файл

@ -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,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>

Просмотреть файл

@ -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->'&quot;%(Identity)&quot;')" />
<Exec Command="for %%f in (@(GeneratedCSFiles->'&quot;%(Identity)&quot;')) do echo #pragma warning disable &gt; %%f.temp &amp;&amp; type %%f &gt;&gt; %%f.temp &amp;&amp; move /y %%f.temp %%f &gt; NUL" />
</Target>
</Project>

Просмотреть файл

@ -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->'&quot;%(Identity)&quot;')" />
<Exec Command="for %%f in (@(GeneratedCSFiles->'&quot;%(Identity)&quot;')) do echo #pragma warning disable &gt; %%f.temp &amp;&amp; type %%f &gt;&gt; %%f.temp &amp;&amp; move /y %%f.temp %%f &gt; 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->'&quot;%(Identity)&quot;')" />
<Exec Command="for %%f in (@(GeneratedCSFiles->'&quot;%(Identity)&quot;')) do echo #pragma warning disable &gt; %%f.temp &amp;&amp; type %%f &gt;&gt; %%f.temp &amp;&amp; move /y %%f.temp %%f &gt; 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->'&quot;%(Identity)&quot;')" />
<Exec Command="for %%f in (@(GeneratedCSFiles->'&quot;%(Identity)&quot;')) do echo #pragma warning disable &gt; %%f.temp &amp;&amp; type %%f &gt;&gt; %%f.temp &amp;&amp; move /y %%f.temp %%f &gt; 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->'&quot;%(Identity)&quot;')" />
<Exec Command="for %%f in (@(GeneratedCSFiles->'&quot;%(Identity)&quot;')) do echo #pragma warning disable &gt; %%f.temp &amp;&amp; type %%f &gt;&gt; %%f.temp &amp;&amp; move /y %%f.temp %%f &gt; 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->'&quot;%(Identity)&quot;')" />
<Exec Command="for %%f in (@(GeneratedCSFiles->'&quot;%(Identity)&quot;')) do echo #pragma warning disable &gt; %%f.temp &amp;&amp; type %%f &gt;&gt; %%f.temp &amp;&amp; move /y %%f.temp %%f &gt; 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->'&quot;%(Identity)&quot;')" />
<Exec Command="for %%f in (@(GeneratedCSFiles->'&quot;%(Identity)&quot;')) do echo #pragma warning disable &gt; %%f.temp &amp;&amp; type %%f &gt;&gt; %%f.temp &amp;&amp; move /y %%f.temp %%f &gt; 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
&hearts;
&diams;"),
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>