This commit is contained in:
Alexandre Zollinger Chohfi 2020-05-05 10:44:40 -07:00
Родитель e6ac2bc827
Коммит 296c98164e
129 изменённых файлов: 2235 добавлений и 1268 удалений

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

@ -104,7 +104,7 @@
<ItemGroup Condition="'$(IsUwpProject)' == 'true' or '$(IsDesignProject)' == 'true' or '$(IsSampleProject)' == 'true' or '$(IsTestProject)' == 'true'">
<PackageReference Include="Microsoft.WinUI">
<Version>3.0.0-preview1.200501.0-nightly</Version>
<Version>3.0.0-preview1.200504.8-CI</Version>
</PackageReference>
</ItemGroup>

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

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\Microsoft.WinUI.3.0.0-preview1.200501.0-nightly\build\native\Microsoft.WinUI.props" Condition="Exists('..\packages\Microsoft.WinUI.3.0.0-preview1.200501.0-nightly\build\native\Microsoft.WinUI.props')" />
<Import Project="..\packages\Microsoft.WinUI.3.0.0-preview1.200504.8-CI\build\native\Microsoft.WinUI.props" Condition="Exists('..\packages\Microsoft.WinUI.3.0.0-preview1.200504.8-CI\build\native\Microsoft.WinUI.props')" />
<Import Project="..\packages\Microsoft.Windows.CppWinRT.2.0.200316.3\build\native\Microsoft.Windows.CppWinRT.props" Condition="Exists('..\packages\Microsoft.Windows.CppWinRT.2.0.200316.3\build\native\Microsoft.Windows.CppWinRT.props')" />
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|ARM">
@ -408,7 +408,7 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
<Import Project="..\packages\Microsoft.Windows.CppWinRT.2.0.200316.3\build\native\Microsoft.Windows.CppWinRT.targets" Condition="Exists('..\packages\Microsoft.Windows.CppWinRT.2.0.200316.3\build\native\Microsoft.Windows.CppWinRT.targets')" />
<Import Project="..\packages\Microsoft.WinUI.3.0.0-preview1.200501.0-nightly\build\native\Microsoft.WinUI.targets" Condition="Exists('..\packages\Microsoft.WinUI.3.0.0-preview1.200501.0-nightly\build\native\Microsoft.WinUI.targets')" />
<Import Project="..\packages\Microsoft.WinUI.3.0.0-preview1.200504.8-CI\build\native\Microsoft.WinUI.targets" Condition="Exists('..\packages\Microsoft.WinUI.3.0.0-preview1.200504.8-CI\build\native\Microsoft.WinUI.targets')" />
</ImportGroup>
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
@ -416,7 +416,7 @@
</PropertyGroup>
<Error Condition="!Exists('..\packages\Microsoft.Windows.CppWinRT.2.0.200316.3\build\native\Microsoft.Windows.CppWinRT.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Windows.CppWinRT.2.0.200316.3\build\native\Microsoft.Windows.CppWinRT.props'))" />
<Error Condition="!Exists('..\packages\Microsoft.Windows.CppWinRT.2.0.200316.3\build\native\Microsoft.Windows.CppWinRT.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.Windows.CppWinRT.2.0.200316.3\build\native\Microsoft.Windows.CppWinRT.targets'))" />
<Error Condition="!Exists('..\packages\Microsoft.WinUI.3.0.0-preview1.200501.0-nightly\build\native\Microsoft.WinUI.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.WinUI.3.0.0-preview1.200501.0-nightly\build\native\Microsoft.WinUI.props'))" />
<Error Condition="!Exists('..\packages\Microsoft.WinUI.3.0.0-preview1.200501.0-nightly\build\native\Microsoft.WinUI.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.WinUI.3.0.0-preview1.200501.0-nightly\build\native\Microsoft.WinUI.targets'))" />
<Error Condition="!Exists('..\packages\Microsoft.WinUI.3.0.0-preview1.200504.8-CI\build\native\Microsoft.WinUI.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.WinUI.3.0.0-preview1.200504.8-CI\build\native\Microsoft.WinUI.props'))" />
<Error Condition="!Exists('..\packages\Microsoft.WinUI.3.0.0-preview1.200504.8-CI\build\native\Microsoft.WinUI.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.WinUI.3.0.0-preview1.200504.8-CI\build\native\Microsoft.WinUI.targets'))" />
</Target>
</Project>

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

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.Windows.CppWinRT" version="2.0.200316.3" targetFramework="native" />
<package id="Microsoft.WinUI" version="3.0.0-preview1.200501.0-nightly" targetFramework="native" />
<package id="Microsoft.WinUI" version="3.0.0-preview1.200504.8-CI" targetFramework="native" />
</packages>

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

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net5.0;net461</TargetFrameworks> <!-- TODO WinUI3 add netstandard1.4 and native back-->
<TargetFramework>net5.0</TargetFramework> <!-- TODO WinUI3 add netstandard1.4, native and net461 back-->
<DefineConstants>$(DefineConstants);NETFX_CORE</DefineConstants>
<Title>Windows Community Toolkit Notifications</Title>
<Description>

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

До

Ширина:  |  Высота:  |  Размер: 483 B

После

Ширина:  |  Высота:  |  Размер: 483 B

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

До

Ширина:  |  Высота:  |  Размер: 564 B

После

Ширина:  |  Высота:  |  Размер: 564 B

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

До

Ширина:  |  Высота:  |  Размер: 703 B

После

Ширина:  |  Высота:  |  Размер: 703 B

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

До

Ширина:  |  Высота:  |  Размер: 859 B

После

Ширина:  |  Высота:  |  Размер: 859 B

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

До

Ширина:  |  Высота:  |  Размер: 1.4 KiB

После

Ширина:  |  Высота:  |  Размер: 1.4 KiB

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

До

Ширина:  |  Высота:  |  Размер: 118 B

После

Ширина:  |  Высота:  |  Размер: 118 B

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

До

Ширина:  |  Высота:  |  Размер: 118 B

После

Ширина:  |  Высота:  |  Размер: 118 B

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

До

Ширина:  |  Высота:  |  Размер: 127 B

После

Ширина:  |  Высота:  |  Размер: 127 B

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

До

Ширина:  |  Высота:  |  Размер: 127 B

После

Ширина:  |  Высота:  |  Размер: 127 B

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

До

Ширина:  |  Высота:  |  Размер: 134 B

После

Ширина:  |  Высота:  |  Размер: 134 B

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

До

Ширина:  |  Высота:  |  Размер: 134 B

После

Ширина:  |  Высота:  |  Размер: 134 B

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

До

Ширина:  |  Высота:  |  Размер: 613 B

После

Ширина:  |  Высота:  |  Размер: 613 B

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

До

Ширина:  |  Высота:  |  Размер: 613 B

После

Ширина:  |  Высота:  |  Размер: 613 B

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

До

Ширина:  |  Высота:  |  Размер: 144 B

После

Ширина:  |  Высота:  |  Размер: 144 B

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

До

Ширина:  |  Высота:  |  Размер: 144 B

После

Ширина:  |  Высота:  |  Размер: 144 B

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

До

Ширина:  |  Высота:  |  Размер: 146 B

После

Ширина:  |  Высота:  |  Размер: 146 B

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

До

Ширина:  |  Высота:  |  Размер: 146 B

После

Ширина:  |  Высота:  |  Размер: 146 B

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

До

Ширина:  |  Высота:  |  Размер: 160 B

После

Ширина:  |  Высота:  |  Размер: 160 B

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

До

Ширина:  |  Высота:  |  Размер: 160 B

После

Ширина:  |  Высота:  |  Размер: 160 B

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

До

Ширина:  |  Высота:  |  Размер: 163 B

После

Ширина:  |  Высота:  |  Размер: 163 B

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

До

Ширина:  |  Высота:  |  Размер: 163 B

После

Ширина:  |  Высота:  |  Размер: 163 B

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

До

Ширина:  |  Высота:  |  Размер: 176 B

После

Ширина:  |  Высота:  |  Размер: 176 B

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

До

Ширина:  |  Высота:  |  Размер: 176 B

После

Ширина:  |  Высота:  |  Размер: 176 B

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

До

Ширина:  |  Высота:  |  Размер: 208 B

После

Ширина:  |  Высота:  |  Размер: 208 B

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

До

Ширина:  |  Высота:  |  Размер: 208 B

После

Ширина:  |  Высота:  |  Размер: 208 B

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

До

Ширина:  |  Высота:  |  Размер: 220 B

После

Ширина:  |  Высота:  |  Размер: 220 B

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

До

Ширина:  |  Высота:  |  Размер: 220 B

После

Ширина:  |  Высота:  |  Размер: 220 B

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

До

Ширина:  |  Высота:  |  Размер: 239 B

После

Ширина:  |  Высота:  |  Размер: 239 B

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

До

Ширина:  |  Высота:  |  Размер: 239 B

После

Ширина:  |  Высота:  |  Размер: 239 B

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

До

Ширина:  |  Высота:  |  Размер: 261 B

После

Ширина:  |  Высота:  |  Размер: 261 B

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

До

Ширина:  |  Высота:  |  Размер: 261 B

После

Ширина:  |  Высота:  |  Размер: 261 B

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

До

Ширина:  |  Высота:  |  Размер: 293 B

После

Ширина:  |  Высота:  |  Размер: 293 B

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

До

Ширина:  |  Высота:  |  Размер: 293 B

После

Ширина:  |  Высота:  |  Размер: 293 B

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

До

Ширина:  |  Высота:  |  Размер: 134 B

После

Ширина:  |  Высота:  |  Размер: 134 B

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

До

Ширина:  |  Высота:  |  Размер: 144 B

После

Ширина:  |  Высота:  |  Размер: 144 B

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

До

Ширина:  |  Высота:  |  Размер: 160 B

После

Ширина:  |  Высота:  |  Размер: 160 B

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

До

Ширина:  |  Высота:  |  Размер: 176 B

После

Ширина:  |  Высота:  |  Размер: 176 B

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

До

Ширина:  |  Высота:  |  Размер: 294 B

После

Ширина:  |  Высота:  |  Размер: 294 B

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

До

Ширина:  |  Высота:  |  Размер: 2.8 KiB

После

Ширина:  |  Высота:  |  Размер: 2.8 KiB

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

До

Ширина:  |  Высота:  |  Размер: 3.5 KiB

После

Ширина:  |  Высота:  |  Размер: 3.5 KiB

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

До

Ширина:  |  Высота:  |  Размер: 4.4 KiB

После

Ширина:  |  Высота:  |  Размер: 4.4 KiB

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

До

Ширина:  |  Высота:  |  Размер: 5.8 KiB

После

Ширина:  |  Высота:  |  Размер: 5.8 KiB

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

До

Ширина:  |  Высота:  |  Размер: 15 KiB

После

Ширина:  |  Высота:  |  Размер: 15 KiB

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

До

Ширина:  |  Высота:  |  Размер: 1.2 KiB

После

Ширина:  |  Высота:  |  Размер: 1.2 KiB

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

До

Ширина:  |  Высота:  |  Размер: 1.7 KiB

После

Ширина:  |  Высота:  |  Размер: 1.7 KiB

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

До

Ширина:  |  Высота:  |  Размер: 2.2 KiB

После

Ширина:  |  Высота:  |  Размер: 2.2 KiB

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

До

Ширина:  |  Высота:  |  Размер: 2.7 KiB

После

Ширина:  |  Высота:  |  Размер: 2.7 KiB

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

До

Ширина:  |  Высота:  |  Размер: 5.5 KiB

После

Ширина:  |  Высота:  |  Размер: 5.5 KiB

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

До

Ширина:  |  Высота:  |  Размер: 14 KiB

После

Ширина:  |  Высота:  |  Размер: 14 KiB

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

До

Ширина:  |  Высота:  |  Размер: 14 KiB

После

Ширина:  |  Высота:  |  Размер: 14 KiB

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

До

Ширина:  |  Высота:  |  Размер: 15 KiB

После

Ширина:  |  Высота:  |  Размер: 15 KiB

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

До

Ширина:  |  Высота:  |  Размер: 15 KiB

После

Ширина:  |  Высота:  |  Размер: 15 KiB

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

До

Ширина:  |  Высота:  |  Размер: 16 KiB

После

Ширина:  |  Высота:  |  Размер: 16 KiB

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

До

Ширина:  |  Высота:  |  Размер: 16 KiB

После

Ширина:  |  Высота:  |  Размер: 16 KiB

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

До

Ширина:  |  Высота:  |  Размер: 17 KiB

После

Ширина:  |  Высота:  |  Размер: 17 KiB

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

До

Ширина:  |  Высота:  |  Размер: 18 KiB

После

Ширина:  |  Высота:  |  Размер: 18 KiB

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

До

Ширина:  |  Высота:  |  Размер: 20 KiB

После

Ширина:  |  Высота:  |  Размер: 20 KiB

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

До

Ширина:  |  Высота:  |  Размер: 32 KiB

После

Ширина:  |  Высота:  |  Размер: 32 KiB

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

До

Ширина:  |  Высота:  |  Размер: 14 KiB

После

Ширина:  |  Высота:  |  Размер: 14 KiB

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

До

Ширина:  |  Высота:  |  Размер: 14 KiB

После

Ширина:  |  Высота:  |  Размер: 14 KiB

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

До

Ширина:  |  Высота:  |  Размер: 14 KiB

После

Ширина:  |  Высота:  |  Размер: 14 KiB

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

До

Ширина:  |  Высота:  |  Размер: 15 KiB

После

Ширина:  |  Высота:  |  Размер: 15 KiB

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

До

Ширина:  |  Высота:  |  Размер: 15 KiB

После

Ширина:  |  Высота:  |  Размер: 15 KiB

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

До

Ширина:  |  Высота:  |  Размер: 15 KiB

После

Ширина:  |  Высота:  |  Размер: 15 KiB

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

До

Ширина:  |  Высота:  |  Размер: 15 KiB

После

Ширина:  |  Высота:  |  Размер: 15 KiB

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

До

Ширина:  |  Высота:  |  Размер: 16 KiB

После

Ширина:  |  Высота:  |  Размер: 16 KiB

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

До

Ширина:  |  Высота:  |  Размер: 16 KiB

После

Ширина:  |  Высота:  |  Размер: 16 KiB

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

До

Ширина:  |  Высота:  |  Размер: 20 KiB

После

Ширина:  |  Высота:  |  Размер: 20 KiB

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

До

Ширина:  |  Высота:  |  Размер: 20 KiB

После

Ширина:  |  Высота:  |  Размер: 20 KiB

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

@ -0,0 +1,142 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="'$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '15.0'">
<VisualStudioVersion>15.0</VisualStudioVersion>
</PropertyGroup>
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|x86">
<Configuration>Debug</Configuration>
<Platform>x86</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x86">
<Configuration>Release</Configuration>
<Platform>x86</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|ARM">
<Configuration>Debug</Configuration>
<Platform>ARM</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|ARM">
<Configuration>Release</Configuration>
<Platform>ARM</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|ARM64">
<Configuration>Debug</Configuration>
<Platform>ARM64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|ARM64">
<Configuration>Release</Configuration>
<Platform>ARM64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|AnyCPU">
<Configuration>Debug</Configuration>
<Platform>AnyCPU</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|AnyCPU">
<Configuration>Release</Configuration>
<Platform>AnyCPU</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup>
<WapProjPath Condition="'$(WapProjPath)'==''">$(MSBuildExtensionsPath)\Microsoft\DesktopBridge\</WapProjPath>
</PropertyGroup>
<Import Project="$(WapProjPath)\Microsoft.DesktopBridge.props" />
<PropertyGroup>
<ProjectGuid>c1216b01-7c56-48c2-b1ad-50d9dabac37b</ProjectGuid>
<TargetPlatformVersion>10.0.18362.0</TargetPlatformVersion>
<TargetPlatformMinVersion>10.0.17134.0</TargetPlatformMinVersion>
<DefaultLanguage>en-US</DefaultLanguage>
<AppxPackageSigningEnabled>false</AppxPackageSigningEnabled>
<EntryPointProjectUniqueName>..\Microsoft.Toolkit.Uwp.SampleApp\Microsoft.Toolkit.Uwp.SampleApp.csproj</EntryPointProjectUniqueName>
</PropertyGroup>
<ItemGroup>
<AppxManifest Include="Package.appxmanifest">
<SubType>Designer</SubType>
</AppxManifest>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Microsoft.Toolkit.Uwp.SampleApp\Microsoft.Toolkit.Uwp.SampleApp.csproj">
<SkipGetTargetFrameworkProperties>True</SkipGetTargetFrameworkProperties>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Content Include="Images\UWPCommunityToolkitSampleAppAppList.scale-100.png" />
<Content Include="Images\UWPCommunityToolkitSampleAppAppList.scale-125.png" />
<Content Include="Images\UWPCommunityToolkitSampleAppAppList.scale-150.png" />
<Content Include="Images\UWPCommunityToolkitSampleAppAppList.scale-200.png" />
<Content Include="Images\UWPCommunityToolkitSampleAppAppList.scale-400.png" />
<Content Include="Images\UWPCommunityToolkitSampleAppAppList.targetsize-16.png" />
<Content Include="Images\UWPCommunityToolkitSampleAppAppList.targetsize-16_altform-unplated.png" />
<Content Include="Images\UWPCommunityToolkitSampleAppAppList.targetsize-20.png" />
<Content Include="Images\UWPCommunityToolkitSampleAppAppList.targetsize-20_altform-unplated.png" />
<Content Include="Images\UWPCommunityToolkitSampleAppAppList.targetsize-24.png" />
<Content Include="Images\UWPCommunityToolkitSampleAppAppList.targetsize-24_altform-unplated.png" />
<Content Include="Images\UWPCommunityToolkitSampleAppAppList.targetsize-256.png" />
<Content Include="Images\UWPCommunityToolkitSampleAppAppList.targetsize-256_altform-unplated.png" />
<Content Include="Images\UWPCommunityToolkitSampleAppAppList.targetsize-30.png" />
<Content Include="Images\UWPCommunityToolkitSampleAppAppList.targetsize-30_altform-unplated.png" />
<Content Include="Images\UWPCommunityToolkitSampleAppAppList.targetsize-32.png" />
<Content Include="Images\UWPCommunityToolkitSampleAppAppList.targetsize-32_altform-unplated.png" />
<Content Include="Images\UWPCommunityToolkitSampleAppAppList.targetsize-36.png" />
<Content Include="Images\UWPCommunityToolkitSampleAppAppList.targetsize-36_altform-unplated.png" />
<Content Include="Images\UWPCommunityToolkitSampleAppAppList.targetsize-40.png" />
<Content Include="Images\UWPCommunityToolkitSampleAppAppList.targetsize-40_altform-unplated.png" />
<Content Include="Images\UWPCommunityToolkitSampleAppAppList.targetsize-48.png" />
<Content Include="Images\UWPCommunityToolkitSampleAppAppList.targetsize-48_altform-unplated.png" />
<Content Include="Images\UWPCommunityToolkitSampleAppAppList.targetsize-60.png" />
<Content Include="Images\UWPCommunityToolkitSampleAppAppList.targetsize-60_altform-unplated.png" />
<Content Include="Images\UWPCommunityToolkitSampleAppAppList.targetsize-64.png" />
<Content Include="Images\UWPCommunityToolkitSampleAppAppList.targetsize-64_altform-unplated.png" />
<Content Include="Images\UWPCommunityToolkitSampleAppAppList.targetsize-72.png" />
<Content Include="Images\UWPCommunityToolkitSampleAppAppList.targetsize-72_altform-unplated.png" />
<Content Include="Images\UWPCommunityToolkitSampleAppAppList.targetsize-80.png" />
<Content Include="Images\UWPCommunityToolkitSampleAppAppList.targetsize-80_altform-unplated.png" />
<Content Include="Images\UWPCommunityToolkitSampleAppAppList.targetsize-96.png" />
<Content Include="Images\UWPCommunityToolkitSampleAppAppList.targetsize-96_altform-unplated.png" />
<Content Include="Images\UWPCommunityToolkitSampleAppBadgeLogo.scale-100.png" />
<Content Include="Images\UWPCommunityToolkitSampleAppBadgeLogo.scale-125.png" />
<Content Include="Images\UWPCommunityToolkitSampleAppBadgeLogo.scale-150.png" />
<Content Include="Images\UWPCommunityToolkitSampleAppBadgeLogo.scale-200.png" />
<Content Include="Images\UWPCommunityToolkitSampleAppBadgeLogo.scale-400.png" />
<Content Include="Images\UWPCommunityToolkitSampleAppLargeTile.scale-100.png" />
<Content Include="Images\UWPCommunityToolkitSampleAppLargeTile.scale-125.png" />
<Content Include="Images\UWPCommunityToolkitSampleAppLargeTile.scale-150.png" />
<Content Include="Images\UWPCommunityToolkitSampleAppLargeTile.scale-200.png" />
<Content Include="Images\UWPCommunityToolkitSampleAppLargeTile.scale-400.png" />
<Content Include="Images\UWPCommunityToolkitSampleAppMedTile.scale-100.png" />
<Content Include="Images\UWPCommunityToolkitSampleAppMedTile.scale-125.png" />
<Content Include="Images\UWPCommunityToolkitSampleAppMedTile.scale-150.png" />
<Content Include="Images\UWPCommunityToolkitSampleAppMedTile.scale-200.png" />
<Content Include="Images\UWPCommunityToolkitSampleAppMedTile.scale-400.png" />
<Content Include="Images\UWPCommunityToolkitSampleAppSmallTile.scale-100.png" />
<Content Include="Images\UWPCommunityToolkitSampleAppSmallTile.scale-125.png" />
<Content Include="Images\UWPCommunityToolkitSampleAppSmallTile.scale-150.png" />
<Content Include="Images\UWPCommunityToolkitSampleAppSmallTile.scale-200.png" />
<Content Include="Images\UWPCommunityToolkitSampleAppSmallTile.scale-400.png" />
<Content Include="Images\UWPCommunityToolkitSampleAppSplashScreen.scale-100.png" />
<Content Include="Images\UWPCommunityToolkitSampleAppSplashScreen.scale-125.png" />
<Content Include="Images\UWPCommunityToolkitSampleAppSplashScreen.scale-150.png" />
<Content Include="Images\UWPCommunityToolkitSampleAppSplashScreen.scale-200.png" />
<Content Include="Images\UWPCommunityToolkitSampleAppSplashScreen.scale-400.png" />
<Content Include="Images\UWPCommunityToolkitSampleAppStoreLogo.scale-100.png" />
<Content Include="Images\UWPCommunityToolkitSampleAppStoreLogo.scale-125.png" />
<Content Include="Images\UWPCommunityToolkitSampleAppStoreLogo.scale-150.png" />
<Content Include="Images\UWPCommunityToolkitSampleAppStoreLogo.scale-200.png" />
<Content Include="Images\UWPCommunityToolkitSampleAppStoreLogo.scale-400.png" />
<Content Include="Images\UWPCommunityToolkitSampleAppWideTile.scale-100.png" />
<Content Include="Images\UWPCommunityToolkitSampleAppWideTile.scale-125.png" />
<Content Include="Images\UWPCommunityToolkitSampleAppWideTile.scale-150.png" />
<Content Include="Images\UWPCommunityToolkitSampleAppWideTile.scale-200.png" />
<Content Include="Images\UWPCommunityToolkitSampleAppWideTile.scale-400.png" />
<Content Include="Images\Wide310x150Logo.scale-400.png" />
</ItemGroup>
<Import Project="$(WapProjPath)\Microsoft.DesktopBridge.targets" />
</Project>

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

@ -0,0 +1,75 @@
<?xml version="1.0" encoding="utf-8"?>
<Package
xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
xmlns:uap3="http://schemas.microsoft.com/appx/manifest/uap/windows10/3"
xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
IgnorableNamespaces="uap uap3 rescap">
<Identity
Name="e89944d1-807e-4f30-a28a-3fe6952f5f71"
Publisher="CN=alzollin"
Version="1.0.0.0" />
<Properties>
<DisplayName>Microsoft.Toolkit.Uwp.SampleApp.Package</DisplayName>
<PublisherDisplayName>Microsoft</PublisherDisplayName>
<Logo>Images\UWPCommunityToolkitSampleAppStoreLogo.png</Logo>
</Properties>
<Dependencies>
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.0.0" MaxVersionTested="10.0.0.0" />
<TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.14393.0" MaxVersionTested="10.0.14393.0" />
</Dependencies>
<Resources>
<Resource Language="x-generate"/>
</Resources>
<Applications>
<Application Id="App"
Executable="$targetnametoken$.exe"
EntryPoint="$targetentrypoint$">
<uap:VisualElements
DisplayName="Windows Community Toolkit Sample App"
Description="This app demonstrates the controls, services and APIs available in the Windows Community Toolkit. The toolkit is available as NuGet package for your C# or VB.NET projects. Source code of the toolkit and the sample app is available on GitHub."
BackgroundColor="#3750D1"
Square150x150Logo="Images\UWPCommunityToolkitSampleAppMedTile.png"
Square44x44Logo="Images\UWPCommunityToolkitSampleAppAppList.png">
<uap:LockScreen Notification="badge" BadgeLogo="Images\UWPCommunityToolkitSampleAppBadgeLogo.png" />
<uap:DefaultTile Wide310x150Logo="Images\UWPCommunityToolkitSampleAppWideTile.png" Square310x310Logo="Images\UWPCommunityToolkitSampleAppLargeTile.png" Square71x71Logo="Images\UWPCommunityToolkitSampleAppSmallTile.png">
<uap:ShowNameOnTiles>
<uap:ShowOn Tile="square150x150Logo" />
<uap:ShowOn Tile="wide310x150Logo" />
<uap:ShowOn Tile="square310x310Logo" />
</uap:ShowNameOnTiles>
</uap:DefaultTile>
<uap:SplashScreen Image="Images\UWPCommunityToolkitSampleAppSplashScreen.png" BackgroundColor="#3750D1"/>
</uap:VisualElements>
<Extensions>
<uap:Extension Category="windows.protocol">
<uap:Protocol Name="uwpct">
<uap:DisplayName>Windows Community Toolkit</uap:DisplayName>
</uap:Protocol>
</uap:Extension>
<!--<Extension Category="windows.backgroundTasks" EntryPoint="Microsoft.Toolkit.Uwp.Samples.BackgroundTasks.TestBackgroundTask">
<BackgroundTasks>
<Task Type="timer" />
</BackgroundTasks>
</Extension>-->
</Extensions>
</Application>
</Applications>
<Capabilities>
<Capability Name="internetClient" />
<Capability Name="privateNetworkClientServer" />
<uap3:Capability Name="remoteSystem" />
<rescap:Capability Name="runFullTrust" />
<DeviceCapability Name="location" />
<DeviceCapability Name="bluetooth" />
<DeviceCapability Name="webcam" />
<DeviceCapability Name="gazeInput" />
</Capabilities>
</Package>

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

@ -7,9 +7,8 @@ using Microsoft.Toolkit.Uwp.Helpers;
using Microsoft.Toolkit.Uwp.SampleApp.Common;
using Microsoft.Toolkit.Uwp.SampleApp.SamplePages;
using Microsoft.Toolkit.Uwp.SampleApp.Styles;
using Microsoft.UI.Threading;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
using Microsoft.UI.Xaml.Navigation;
using Windows.ApplicationModel;
using Windows.ApplicationModel.Activation;
using Windows.System.Profile;
@ -17,16 +16,10 @@ using Windows.UI.ViewManagement;
namespace Microsoft.Toolkit.Uwp.SampleApp
{
/// <summary>
/// Provides application-specific behavior to supplement the default Application class.
/// </summary>
public sealed partial class App : Application
{
/// <summary>
/// Initializes a new instance of the <see cref="App"/> class.
/// Initializes the singleton application object. This is the first line of authored code
/// executed, and as such is the logical equivalent of main() or WinMain().
/// </summary>
private MainWindow _window;
public App()
{
InitializeComponent();
@ -56,27 +49,20 @@ namespace Microsoft.Toolkit.Uwp.SampleApp
}
}
/// <summary>
/// Invoked when the application is launched normally by the end user. Other entry points
/// will be used such as when the application is launched to open a specific file.
/// </summary>
/// <param name="e">Details about the launch request and process.</param>
protected override async void OnLaunched(Microsoft.UI.Xaml.LaunchActivatedEventArgs e)
{
ApplicationView.GetForCurrentView().SetPreferredMinSize(new Windows.Foundation.Size(500, 500));
DispatcherQueueSyncContext.SetForCurrentThread();
base.OnLaunched(e);
if (e.UWPLaunchActivatedEventArgs.PrelaunchActivated)
{
return;
}
IActivatedEventArgs activatedArgs = AppInstance.GetActivatedEventArgs();
if (e.UWPLaunchActivatedEventArgs.PreviousExecutionState != ApplicationExecutionState.Running
&& e.UWPLaunchActivatedEventArgs.PreviousExecutionState != ApplicationExecutionState.Suspended)
if (activatedArgs.PreviousExecutionState != ApplicationExecutionState.Running
&& activatedArgs.PreviousExecutionState != ApplicationExecutionState.Suspended)
{
await RunAppInitialization(e?.Arguments);
}
SystemInformation.Instance.TrackAppUse(e.UWPLaunchActivatedEventArgs);
SystemInformation.Instance.TrackAppUse(activatedArgs);
}
/// <summary>
@ -112,62 +98,19 @@ namespace Microsoft.Toolkit.Uwp.SampleApp
// Initialize the constant for the app display name, used for tile and toast previews
if (Constants.ApplicationDisplayName == null)
{
Constants.ApplicationDisplayName = (await Package.Current.GetAppListEntriesAsync())[0].DisplayInfo.DisplayName;
// Constants.ApplicationDisplayName = (await Package.Current.GetAppListEntriesAsync())[0].DisplayInfo.DisplayName;
}
// Check if the Cache is Latest, wipe if not.
Sample.EnsureCacheLatest();
Frame rootFrame = Window.Current.Content as Frame;
_window = new MainWindow(launchParameters);
// Do not repeat app initialization when the Window already has content,
// just ensure that the window is active
if (rootFrame == null)
{
// Create a Frame to act as the navigation context and navigate to the first page
rootFrame = new Frame();
rootFrame.NavigationFailed += OnNavigationFailed;
// Place the frame in the current Window
Window.Current.Content = rootFrame;
}
if (rootFrame.Content == null)
{
// When the navigation stack isn't restored navigate to the first page,
// configuring the new page by passing required information as a navigation
// parameter
rootFrame.Navigate(typeof(Shell), launchParameters);
}
// Ensure the current window is active
Window.Current.Activate();
_window.Activate();
}
/// <summary>
/// Invoked when Navigation to a certain page fails
/// </summary>
/// <param name="sender">The Frame which failed navigation</param>
/// <param name="e">Details about the navigation failure</param>
private void OnNavigationFailed(object sender, NavigationFailedEventArgs e)
{
throw new Exception("Failed to load Page " + e.SourcePageType.FullName);
}
/// <summary>
/// Invoked when application execution is being suspended. Application state is saved
/// without knowing whether the application will be terminated or resumed with the contents
/// of memory still intact.
/// </summary>
/// <param name="sender">The source of the suspend request.</param>
/// <param name="e">Details about the suspend request.</param>
private void OnSuspending(object sender, SuspendingEventArgs e)
{
var deferral = e.SuspendingOperation.GetDeferral();
// TODO: Save application state and stop any background activity
deferral.Complete();
}
}
}

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

@ -4,7 +4,7 @@
using System;
using System.Diagnostics;
using Microsoft.UI.Xaml.Input;
using System.Windows.Input;
namespace Microsoft.Toolkit.Uwp.SampleApp.Common
{
@ -43,7 +43,7 @@ namespace Microsoft.Toolkit.Uwp.SampleApp.Common
/// <summary>
/// Occurs when changes occur that affect whether or not the command should execute.
/// </summary>
public event EventHandler<object> CanExecuteChanged;
public event EventHandler CanExecuteChanged;
/// <summary>
/// Defines the method that determines whether the command can execute in its current state.

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

@ -4,7 +4,7 @@
using System;
using System.Diagnostics;
using Microsoft.UI.Xaml.Input;
using System.Windows.Input;
namespace Microsoft.Toolkit.Uwp.SampleApp.Common
{
@ -28,7 +28,7 @@ namespace Microsoft.Toolkit.Uwp.SampleApp.Common
/// <summary>
/// Occurs when changes occur that affect whether or not the command should execute.
/// </summary>
public event EventHandler<object> CanExecuteChanged;
public event EventHandler CanExecuteChanged;
/// <summary>
/// Defines the method that determines whether the command can execute in its current state.

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

@ -12,7 +12,7 @@ namespace Microsoft.Toolkit.Uwp.SampleApp.Common
{
public object Convert(object value, Type targetType, object parameter, string language)
{
return ThicknessHelper.FromLengths(0, (double)value, 0, 0);
return new Thickness(0, (double)value, 0, 0);
}
public object ConvertBack(object value, Type targetType, object parameter, string language)

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

@ -3,7 +3,6 @@
// See the LICENSE file in the project root for more information.
using System;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Data;
namespace Microsoft.Toolkit.Uwp.SampleApp.Common
@ -12,9 +11,9 @@ namespace Microsoft.Toolkit.Uwp.SampleApp.Common
{
public object Convert(object value, Type targetType, object parameter, string language)
{
if (value is Duration dur)
if (value is TimeSpan tSpan)
{
return dur.TimeSpan.TotalMilliseconds;
return tSpan.TotalMilliseconds;
}
return value;
@ -24,10 +23,10 @@ namespace Microsoft.Toolkit.Uwp.SampleApp.Common
{
if (value is double milliseconds)
{
return DurationHelper.FromTimeSpan(TimeSpan.FromMilliseconds(milliseconds));
return TimeSpan.FromMilliseconds(milliseconds);
}
return DurationHelper.FromTimeSpan(TimeSpan.MinValue);
return TimeSpan.MinValue;
}
}
}
}

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

@ -202,7 +202,7 @@ namespace Microsoft.Toolkit.Uwp.SampleApp.Controls
}
controlToAdd.SetBinding(dependencyProperty, binding);
controlToAdd.Margin = ThicknessHelper.FromLengths(0, 5, 0, 20);
controlToAdd.Margin = new Thickness(0, 5, 0, 20);
RootPanel.Children.Add(controlToAdd);
}
}

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

@ -174,13 +174,13 @@ namespace Microsoft.Toolkit.Uwp.SampleApp.Controls
Background = new SolidColorBrush(Windows.UI.Color.FromArgb(50, 0, 0, 0))
};
headerGrid.ColumnDefinitions.Add(new ColumnDefinition());
headerGrid.ColumnDefinitions.Add(new ColumnDefinition { Width = GridLengthHelper.Auto });
headerGrid.ColumnDefinitions.Add(new ColumnDefinition { Width = GridLength.Auto });
var languageBlock = new TextBlock
{
Text = language,
VerticalAlignment = VerticalAlignment.Center,
Margin = ThicknessHelper.FromLengths(10, 0, 0, 0)
Margin = new Thickness(10, 0, 0, 0)
};
headerGrid.Children.Add(languageBlock);
@ -332,22 +332,22 @@ namespace Microsoft.Toolkit.Uwp.SampleApp.Controls
// Gets the current Quote Block UI from the UI Collection, and then styles it. Adds a header.
if (collection.Last() is Border border)
{
border.CornerRadius = CornerRadiusHelper.FromUniformRadius(6);
border.BorderThickness = ThicknessHelper.FromUniformLength(0);
border.Padding = ThicknessHelper.FromUniformLength(20);
border.Margin = ThicknessHelper.FromLengths(0, 5, 0, 5);
border.CornerRadius = new CornerRadius(6);
border.BorderThickness = new Thickness(0);
border.Padding = new Thickness(20);
border.Margin = new Thickness(0, 5, 0, 5);
border.Background = localbackground;
if (theme == ElementTheme.Light)
{
border.BorderThickness = ThicknessHelper.FromUniformLength(0.5);
border.BorderThickness = new Thickness(0.5);
border.BorderBrush = localforeground;
}
var headerPanel = new StackPanel
{
Orientation = Orientation.Horizontal,
Margin = ThicknessHelper.FromLengths(0, 0, 0, 10)
Margin = new Thickness(0, 0, 0, 10)
};
headerPanel.Children.Add(new TextBlock
@ -362,7 +362,7 @@ namespace Microsoft.Toolkit.Uwp.SampleApp.Controls
{
FontSize = 16,
Foreground = localforeground,
Margin = ThicknessHelper.FromLengths(5, 0, 0, 0),
Margin = new Thickness(5, 0, 0, 0),
Text = header,
VerticalAlignment = VerticalAlignment.Center,
TextLineBounds = TextLineBounds.Tight,

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

@ -44,7 +44,7 @@ namespace Microsoft.Toolkit.Uwp.SampleApp.Controls
{
XamlCodeRenderer.Options.GlyphMargin = true;
var range = new Range(error.StartLine, 1, error.EndLine, await XamlCodeRenderer.GetModel().GetLineMaxColumnAsync(error.EndLine));
var range = new Monaco.Range(error.StartLine, 1, error.EndLine, await XamlCodeRenderer.GetModel().GetLineMaxColumnAsync(error.EndLine));
// Highlight Error Line
XamlCodeRenderer.Decorations.Add(new IModelDeltaDecoration(

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

@ -0,0 +1,10 @@
<Window
x:Class="Microsoft.Toolkit.Uwp.SampleApp.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:Microsoft.Toolkit.Uwp.SampleApp"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<Frame x:Name="rootFrame"/>
</Window>

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

@ -0,0 +1,16 @@
// 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.
namespace Microsoft.Toolkit.Uwp.SampleApp
{
public sealed partial class MainWindow
{
public MainWindow(string launchParameters)
{
InitializeComponent();
rootFrame.Navigate(typeof(Shell), launchParameters);
}
}
}

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

@ -1,116 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProjectGuid>{719C43C6-8753-4395-ADAA-2FCC70F76BF3}</ProjectGuid>
<OutputType>AppContainerExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Microsoft.Toolkit.Uwp.SampleApp</RootNamespace>
<AssemblyName>Microsoft.Toolkit.Uwp.SampleApp</AssemblyName>
<DefaultLanguage>en-US</DefaultLanguage>
<TargetPlatformIdentifier>UAP</TargetPlatformIdentifier>
<OutputType>WinExe</OutputType>
<TargetFramework>net5.0</TargetFramework>
<TargetPlatformVersion>10.0.18362.0</TargetPlatformVersion>
<TargetPlatformMinVersion>10.0.17134.0</TargetPlatformMinVersion>
<MinimumVisualStudioVersion>14</MinimumVisualStudioVersion>
<FileAlignment>512</FileAlignment>
<ProjectTypeGuids>{A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<AppxAutoIncrementPackageRevision>True</AppxAutoIncrementPackageRevision>
<AppxBundle>Always</AppxBundle>
<AppxBundlePlatforms>x86|x64</AppxBundlePlatforms>
<Win32Resource>MiddleClickScrolling-CursorType.res</Win32Resource>
<AppxPackageSigningEnabled>false</AppxPackageSigningEnabled>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x86\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<NoWarn>;2008</NoWarn>
<DebugType>full</DebugType>
<PlatformTarget>x86</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
<DocumentationFile>$(OutputPath)$(AssemblyName).xml</DocumentationFile>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<OutputPath>bin\x86\Release\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<Optimize>true</Optimize>
<NoWarn>;2008;CS8305</NoWarn>
<!-- CS8305 is temporary since WinUI3 is not stable yet -->
<DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
<UseDotNetNativeToolchain>false</UseDotNetNativeToolchain> <!-- temporary since WinUI3 is not stable yet -->
<RunCodeAnalysis>false</RunCodeAnalysis>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<DocumentationFile>$(OutputPath)$(AssemblyName).xml</DocumentationFile>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|ARM'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\ARM\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<NoWarn>;2008</NoWarn>
<DebugType>full</DebugType>
<PlatformTarget>ARM</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|ARM'">
<OutputPath>bin\ARM\Release\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<Optimize>true</Optimize>
<NoWarn>;2008;CS8305</NoWarn>
<!-- CS8305 is temporary since WinUI3 is not stable yet -->
<DebugType>pdbonly</DebugType>
<PlatformTarget>ARM</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
<UseDotNetNativeToolchain>false</UseDotNetNativeToolchain> <!-- temporary since WinUI3 is not stable yet -->
<RunCodeAnalysis>false</RunCodeAnalysis>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<DocumentationFile>$(OutputPath)$(AssemblyName).xml</DocumentationFile>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<NoWarn>;2008</NoWarn>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<Optimize>true</Optimize>
<NoWarn>;2008;CS8305</NoWarn>
<!-- CS8305 is temporary since WinUI3 is not stable yet -->
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
<UseDotNetNativeToolchain>false</UseDotNetNativeToolchain> <!-- temporary since WinUI3 is not stable yet -->
<RunCodeAnalysis>false</RunCodeAnalysis>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<DocumentationFile>$(OutputPath)$(AssemblyName).xml</DocumentationFile>
</PropertyGroup>
<PropertyGroup>
<RestoreProjectStyle>PackageReference</RestoreProjectStyle>
<RootNamespace>Microsoft.Toolkit.Uwp.SampleApp</RootNamespace>
<Platforms>x86;x64</Platforms>
<RuntimeIdentifiers>win10-x86;win10-x64</RuntimeIdentifiers>
<AssetTargetFallback>uap10.0.17134</AssetTargetFallback>
<ApplicationManifest>app.manifest</ApplicationManifest>
<LangVersion>8.0</LangVersion>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>
<ItemGroup>
<None Remove="MainWindow.xaml" />
</ItemGroup>
<ItemGroup>
<Manifest Include="$(ApplicationManifest)" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform">
<Version>6.2.10</Version>
</PackageReference>
<PackageReference Include="Microsoft.Services.Store.Engagement">
<Version>10.1901.28001</Version>
</PackageReference>
@ -133,8 +49,8 @@
<Version>4.5.0</Version>
</PackageReference>
</ItemGroup>
<!--
<ItemGroup>
<!-- A reference to the entire .Net Framework and Windows SDK are automatically included -->
<Content Include="Assets\mslogo.png" />
<Content Include="Assets\NotificationAssets\Cloudy-Square.png" />
<Content Include="Assets\NotificationAssets\Cloudy.png" />
@ -294,7 +210,6 @@
<Content Include="SamplePages\DataGrid\DataGrid.png" />
<Content Include="SamplePages\DispatcherQueueHelper\DispatchQueueHelper.png" />
<Content Include="SamplePages\DockPanel\DockPanel.png" />
<Content Include="SamplePages\Facebook Service\FacebookLogo.png" />
<Content Include="SamplePages\LoginButton\LoginButton.png" />
<Content Include="SamplePages\FadeHeader\FadeHeaderBehavior.png" />
<Content Include="SamplePages\Fade\FadeBehavior.png" />
@ -361,7 +276,6 @@
<Content Include="SamplePages\Twitter Service\TwitterLogo.png" />
<Content Include="SamplePages\Twitter Service\TwitterCode.bind" />
<Content Include="SamplePages\Twitter Service\icon.png" />
<Content Include="SamplePages\Facebook Service\FacebookCode.bind" />
<Content Include="SamplePages\HeaderedTextBlock\HeaderedTextBlockCode.bind" />
<Content Include="SamplePages\ViewExtensions\ViewExtensions.png" />
<Content Include="SamplePages\ViewportBehavior\ViewportBehavior.png" />
@ -388,7 +302,6 @@
<Content Include="SamplePages\samples.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<None Include="Microsoft.Toolkit.Uwp.SampleApp_TemporaryKey.pfx" />
<None Include="readme.md" />
<Content Include="SamplePages\LiveTile\LiveTileCode.bind" />
<Content Include="SamplePages\Toast\ToastCode.bind" />
@ -736,7 +649,6 @@
<Compile Include="SamplePages\Expander\ExpanderPage.xaml.cs">
<DependentUpon>ExpanderPage.xaml</DependentUpon>
</Compile>
<Compile Include="SamplePages\Facebook Service\FacebookPhotoTemplateSelector.cs" />
<Compile Include="Controls\CodeRenderer.cs" />
<Compile Include="Controls\PropertyControl.xaml.cs">
<DependentUpon>PropertyControl.xaml</DependentUpon>
@ -788,9 +700,6 @@
</Compile>
<Compile Include="SamplePages\Incremental Loading Collection\PeopleSource.cs" />
<Compile Include="SamplePages\Incremental Loading Collection\Person.cs" />
<Compile Include="SamplePages\Light\LightBehaviorPage.xaml.cs">
<DependentUpon>LightBehaviorPage.xaml</DependentUpon>
</Compile>
<Compile Include="SamplePages\LinkedIn Service\LinkedInPage.xaml.cs">
<DependentUpon>LinkedInPage.xaml</DependentUpon>
</Compile>
@ -842,9 +751,6 @@
<Compile Include="SamplePages\Fade\FadeBehaviorPage.xaml.cs">
<DependentUpon>FadeBehaviorPage.xaml</DependentUpon>
</Compile>
<Compile Include="SamplePages\Facebook Service\FacebookPage.xaml.cs">
<DependentUpon>FacebookPage.xaml</DependentUpon>
</Compile>
<Compile Include="SamplePages\HeaderedTextBlock\HeaderedTextBlockPage.xaml.cs">
<DependentUpon>HeaderedTextBlockPage.xaml</DependentUpon>
</Compile>
@ -896,14 +802,6 @@
<Compile Include="Styles\ThemeInjector.cs" />
<Compile Include="TrackingManager.cs" />
</ItemGroup>
<ItemGroup>
<AppxManifest Include="Package.appxmanifest">
<SubType>Designer</SubType>
</AppxManifest>
</ItemGroup>
<ItemGroup>
<Content Include="Properties\Default.rd.xml" />
</ItemGroup>
<ItemGroup>
<ApplicationDefinition Include="App.xaml">
<Generator>MSBuild:Compile</Generator>
@ -1212,10 +1110,6 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="SamplePages\Light\LightBehaviorPage.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="SamplePages\LinkedIn Service\LinkedInPage.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
@ -1284,10 +1178,6 @@
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="SamplePages\Facebook Service\FacebookPage.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
</Page>
<Page Include="SamplePages\HeaderedTextBlock\HeaderedTextBlockPage.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
@ -1364,6 +1254,7 @@
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Page>
</ItemGroup>
-->
<ItemGroup>
<ProjectReference Include="..\Microsoft.Toolkit.Parsers\Microsoft.Toolkit.Parsers.csproj">
<Project>{42CA4935-54BE-42EA-AC19-992378C08DE6}</Project>
@ -1385,14 +1276,14 @@
<Project>{97ee849b-403c-490e-80ed-d19d7cc153fd}</Project>
<Name>Microsoft.Toolkit.Uwp.Notifications</Name>
</ProjectReference>
<ProjectReference Include="..\Microsoft.Toolkit.Uwp.Samples.BackgroundTasks\Microsoft.Toolkit.Uwp.Samples.BackgroundTasks.csproj">
<!--<ProjectReference Include="..\Microsoft.Toolkit.Uwp.Samples.BackgroundTasks\Microsoft.Toolkit.Uwp.Samples.BackgroundTasks.csproj">
<Project>{1ae2cb5c-58a0-4f12-8e6f-2cd4aaadb34c}</Project>
<Name>Microsoft.Toolkit.Uwp.Samples.BackgroundTasks</Name>
</ProjectReference>
<ProjectReference Include="..\Microsoft.Toolkit.Uwp.Services\Microsoft.Toolkit.Uwp.Services.csproj">
</ProjectReference>-->
<!--<ProjectReference Include="..\Microsoft.Toolkit.Uwp.Services\Microsoft.Toolkit.Uwp.Services.csproj">
<Project>{7189a42d-6f1a-4fa3-8e00-e2c14fdf167a}</Project>
<Name>Microsoft.Toolkit.Uwp.Services</Name>
</ProjectReference>
</ProjectReference>-->
<ProjectReference Include="..\Microsoft.Toolkit.Uwp.UI.Controls.DataGrid\Microsoft.Toolkit.Uwp.UI.Controls.DataGrid.csproj">
<Project>{daeb9cec-c817-33b2-74b2-bc379380db72}</Project>
<Name>Microsoft.Toolkit.Uwp.UI.Controls.DataGrid</Name>
@ -1433,36 +1324,11 @@
<Name>Visual C++ 2015 UWP Desktop Runtime for native apps</Name>
</SDKReference>
</ItemGroup>
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '14.0' ">
<VisualStudioVersion>14.0</VisualStudioVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|ARM64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\ARM64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<NoWarn>;2008</NoWarn>
<NoStdLib>true</NoStdLib>
<DebugType>full</DebugType>
<PlatformTarget>ARM64</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|ARM64'">
<OutputPath>bin\ARM64\Release\</OutputPath>
<DefineConstants>TRACE;NETFX_CORE;WINDOWS_UWP</DefineConstants>
<Optimize>true</Optimize>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<NoWarn>;2008;CS8305</NoWarn>
<!-- CS8305 is temporary since WinUI3 is not stable yet -->
<NoStdLib>true</NoStdLib>
<DebugType>pdbonly</DebugType>
<PlatformTarget>ARM64</PlatformTarget>
<UseVSHostingProcess>false</UseVSHostingProcess>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" />
<ItemGroup>
<Page Update="MainWindow.xaml">
<Generator>MSBuild:Compile</Generator>
</Page>
</ItemGroup>
<PropertyGroup Condition="'$(Configuration)' == 'Debug'">
<_GenerateAppxManifestDependsOn>
ModifyAppXPackageDebug;
@ -1495,12 +1361,4 @@
</AppxPackagePayload>
</ItemGroup>
</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 | findstr /v /b &quot;#pragma&quot; &gt;&gt; %%f.temp &amp;&amp; move /y %%f.temp %%f &gt; NUL" />
</Target>
</Project>

Двоичный файл не отображается.

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

@ -2,7 +2,7 @@
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using Microsoft.UI.Xaml.Data;
using System.ComponentModel;
namespace Microsoft.Toolkit.Uwp.SampleApp.Models
{

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

@ -528,7 +528,7 @@ namespace Microsoft.Toolkit.Uwp.SampleApp
case PropertyKind.TimeSpan:
try
{
var sliderOptions = new SliderPropertyOptions { DefaultValue = DurationHelper.FromTimeSpan(TimeSpan.FromMilliseconds(double.Parse(value, CultureInfo.InvariantCulture))) };
var sliderOptions = new SliderPropertyOptions { DefaultValue = TimeSpan.FromMilliseconds(double.Parse(value, CultureInfo.InvariantCulture)) };
var parameters = match.Groups["parameters"].Value;
var split = parameters.Split('-');
int minIndex = 0;
@ -658,8 +658,8 @@ namespace Microsoft.Toolkit.Uwp.SampleApp
}
}
// Search in Windows
var wuxType = Windows.UI.Xaml.VerticalAlignment.Center;
// Search in Microsoft
var wuxType = VerticalAlignment.Center;
assembly = wuxType.GetType().GetTypeInfo().Assembly;
foreach (var typeInfo in assembly.ExportedTypes)

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

@ -1,52 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest" xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10" xmlns:uap3="http://schemas.microsoft.com/appx/manifest/uap/windows10/3" IgnorableNamespaces="uap mp uap3">
<Identity Name="52b9212c-97a9-4639-9426-3e1ea9c1569e" Publisher="CN=alzollin" Version="8.0.0.0" />
<mp:PhoneIdentity PhoneProductId="52b9212c-97a9-4639-9426-3e1ea9c1569e" PhonePublisherId="00000000-0000-0000-0000-000000000000" />
<Properties>
<DisplayName>Microsoft.Toolkit.Uwp.SampleApp</DisplayName>
<PublisherDisplayName>Microsoft</PublisherDisplayName>
<Logo>Assets\UWPCommunityToolkitSampleAppStoreLogo.png</Logo>
</Properties>
<Dependencies>
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.0.0" MaxVersionTested="10.0.0.0" />
</Dependencies>
<Resources>
<Resource Language="x-generate" />
</Resources>
<Applications>
<Application Id="App" Executable="$targetnametoken$.exe" EntryPoint="Microsoft.Toolkit.Uwp.SampleApp.App">
<uap:VisualElements DisplayName="Windows Community Toolkit Sample App" Square150x150Logo="Assets\UWPCommunityToolkitSampleAppMedTile.png" Square44x44Logo="Assets\UWPCommunityToolkitSampleAppAppList.png" Description="This app demonstrates the controls, services and APIs available in the Windows Community Toolkit. The toolkit is available as NuGet package for your C# or VB.NET projects. Source code of the toolkit and the sample app is available on GitHub." BackgroundColor="#3750D1">
<uap:LockScreen Notification="badge" BadgeLogo="Assets\UWPCommunityToolkitSampleAppBadgeLogo.png" />
<uap:DefaultTile Wide310x150Logo="Assets\UWPCommunityToolkitSampleAppWideTile.png" Square310x310Logo="Assets\UWPCommunityToolkitSampleAppLargeTile.png" Square71x71Logo="Assets\UWPCommunityToolkitSampleAppSmallTile.png">
<uap:ShowNameOnTiles>
<uap:ShowOn Tile="square150x150Logo" />
<uap:ShowOn Tile="wide310x150Logo" />
<uap:ShowOn Tile="square310x310Logo" />
</uap:ShowNameOnTiles>
</uap:DefaultTile>
<uap:SplashScreen Image="Assets\UWPCommunityToolkitSampleAppSplashScreen.png" BackgroundColor="#3750D1" />
</uap:VisualElements>
<Extensions>
<uap:Extension Category="windows.protocol">
<uap:Protocol Name="uwpct">
<uap:DisplayName>Windows Community Toolkit</uap:DisplayName>
</uap:Protocol>
</uap:Extension>
<Extension Category="windows.backgroundTasks" EntryPoint="Microsoft.Toolkit.Uwp.Samples.BackgroundTasks.TestBackgroundTask">
<BackgroundTasks>
<Task Type="timer" />
</BackgroundTasks>
</Extension>
</Extensions>
</Application>
</Applications>
<Capabilities>
<Capability Name="internetClient" />
<Capability Name="privateNetworkClientServer" />
<uap3:Capability Name="remoteSystem" />
<DeviceCapability Name="location" />
<DeviceCapability Name="bluetooth" />
<DeviceCapability Name="webcam" />
<DeviceCapability Name="gazeInput" />
</Capabilities>
</Package>

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

@ -4,6 +4,7 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Threading.Tasks;
@ -12,7 +13,6 @@ using Microsoft.Toolkit.Uwp.UI.Animations;
using Microsoft.UI.Composition;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
using Microsoft.UI.Xaml.Data;
using Microsoft.UI.Xaml.Hosting;
using Microsoft.UI.Xaml.Navigation;
using Newtonsoft.Json;
@ -148,8 +148,8 @@ namespace Microsoft.Toolkit.Uwp.SampleApp.Pages
{
From = 0,
To = 1,
Duration = DurationHelper.FromTimeSpan(TimeSpan.FromMilliseconds(300)),
Delay = DurationHelper.FromTimeSpan(TimeSpan.FromMilliseconds(counter++ * delay)),
Duration = TimeSpan.FromMilliseconds(300),
Delay = TimeSpan.FromMilliseconds(counter++ * delay),
SetInitialValueBeforeDelay = true
});
}

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

@ -4,6 +4,7 @@
using System;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
@ -15,7 +16,6 @@ using Microsoft.Toolkit.Uwp.UI.Extensions;
using Microsoft.Toolkit.Uwp.UI.Helpers;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
using Microsoft.UI.Xaml.Data;
using Microsoft.UI.Xaml.Media.Imaging;
using Microsoft.UI.Xaml.Navigation;
using Windows.System;

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

@ -1,23 +0,0 @@
// Initialize service
FacebookService.Instance.Initialize(AppIDText.Text);
// Login to Facebook
if (!await FacebookService.Instance.LoginAsync())
{
return;
}
// Get user's feed
ListView.ItemsSource = await FacebookService.Instance.RequestAsync(FacebookDataConfig.MyFeed, 50);
// Get current user profile picture
ProfileImage.DataContext = await FacebookService.Instance.GetUserPictureInfoAsync();
// Post a message on your wall using Facebook Dialog
await FacebookService.Instance.PostToFeedWithDialogAsync(TitleText.Text, DescriptionText.Text, UrlText.Text);
// Get current user's photo albums
await FacebookService.Instance.GetUserAlbumsAsync();
// Get current user's photos by album Id
await FacebookService.Instance.GetUserPhotosByAlbumIdAsync(addedItem.Id);

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 1.3 KiB

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

@ -1,288 +0,0 @@
<Page x:Class="Microsoft.Toolkit.Uwp.SampleApp.SamplePages.FacebookPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:facebook="using:Microsoft.Toolkit.Uwp.Services.Facebook"
xmlns:local="using:Microsoft.Toolkit.Uwp.SampleApp.SamplePages"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<Page.Resources>
<DataTemplate x:Key="FacebookPostSchemaTemplate"
x:DataType="facebook:FacebookPost">
<Border Margin="24,0,24,12"
Background="White"
BorderBrush="{ThemeResource InfoArea-Titlebar}"
BorderThickness="1">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Image MaxHeight="320"
VerticalAlignment="Center"
Source="{Binding Full_Picture}"
Stretch="UniformToFill" />
<TextBlock Grid.Row="1"
Margin="12"
Text="{x:Bind Message}"
TextTrimming="CharacterEllipsis"
TextWrapping="WrapWholeWords" />
<TextBlock Grid.Row="2"
Margin="12,0,12,12"
FontWeight="ExtraLight"
Text="{x:Bind Created_Time}" />
</Grid>
</Border>
</DataTemplate>
<DataTemplate x:Key="FacebookAlbumSchemaTemplate"
x:DataType="facebook:FacebookAlbum">
<Border Margin="24,0,24,12"
Background="White"
BorderBrush="{ThemeResource InfoArea-Titlebar}"
BorderThickness="1">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Image MaxHeight="160"
VerticalAlignment="Center"
Source="{Binding Picture.Data.Url}"
Stretch="Uniform" />
<TextBlock Grid.Row="1"
Margin="12"
Text="{x:Bind Name}"
TextTrimming="CharacterEllipsis"
TextWrapping="WrapWholeWords" />
<TextBlock Grid.Row="2"
Margin="12,0,12,12"
FontWeight="ExtraLight"
Text="{x:Bind Description}"
TextTrimming="CharacterEllipsis"
TextWrapping="WrapWholeWords" />
</Grid>
</Border>
</DataTemplate>
<DataTemplate x:Key="FacebookPhotoSchemaTemplate"
x:DataType="facebook:FacebookPhoto">
<Border Margin="24,0,24,12"
Background="White"
BorderBrush="{ThemeResource InfoArea-Titlebar}"
BorderThickness="1">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Image MaxHeight="160"
VerticalAlignment="Center"
Source="{Binding Picture}"
Stretch="Uniform" />
<TextBlock Grid.Row="1"
Margin="12,0,12,12"
FontWeight="ExtraLight"
Text="{x:Bind Name}"
TextTrimming="CharacterEllipsis"
TextWrapping="WrapWholeWords" />
</Grid>
</Border>
</DataTemplate>
<local:FacebookPhotoTemplateSelector x:Key="facebookPhotoTemplateSelector"
FacebookAlbumTemplate="{StaticResource FacebookAlbumSchemaTemplate}"
FacebookPhotoTemplate="{StaticResource FacebookPhotoSchemaTemplate}" />
</Page.Resources>
<Grid MaxWidth="800"
Background="{ThemeResource Brush-Grey-05}">
<Grid Margin="24"
Background="{ThemeResource Brush-Grey-04}"
BorderBrush="{ThemeResource InfoArea-Titlebar}"
BorderThickness="1"
CornerRadius="4">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition />
</Grid.RowDefinitions>
<StackPanel HorizontalAlignment="Center"
Orientation="Horizontal">
<Image Width="100"
Height="100"
Margin="24"
Source="/SamplePages/Facebook Service/FacebookLogo.png"
Stretch="Uniform" />
<Border x:Name="ProfileImage"
Width="100"
Height="100"
CornerRadius="50"
Visibility="Collapsed">
<Border.Background>
<ImageBrush ImageSource="{Binding Url}"
Stretch="Uniform" />
</Border.Background>
</Border>
</StackPanel>
<ScrollViewer Grid.Row="1">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition />
</Grid.RowDefinitions>
<!-- Credentials area -->
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid Background="{ThemeResource InfoArea-Titlebar}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Button x:Name="CredentialsBoxExpandButton"
VerticalAlignment="Stretch"
Click="CredentialsBoxExpandButton_OnClick"
Content=""
FontFamily="Segoe MDL2 Assets" />
<TextBlock Grid.Column="1"
Margin="12,6"
HorizontalAlignment="Left"
VerticalAlignment="Center"
Foreground="{ThemeResource Brush-Grey-01}"
Text="Credentials" />
</Grid>
<StackPanel x:Name="CredentialsBox"
Grid.Row="1"
Margin="24"
Orientation="Vertical">
<TextBox x:Name="AppIDText"
Margin="0,0,0,12"
Header="App ID" />
<HyperlinkButton Margin="0,0,0,15"
Content="Show me how to get this ID"
NavigateUri="https://docs.microsoft.com/windows/uwpcommunitytoolkit/services/facebook" />
<StackPanel Orientation="Horizontal">
<ComboBox x:Name="QueryType"
Header="Type:" />
<Button x:Name="ConnectButton"
Margin="10,0,0,0"
VerticalAlignment="Bottom"
Click="ConnectButton_OnClick"
Content="Connect" />
</StackPanel>
</StackPanel>
</Grid>
<!-- Share to Facebook -->
<Grid x:Name="ShareBox"
Grid.Row="1">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid Background="{ThemeResource InfoArea-Titlebar}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Button x:Name="PostBoxExpandButton"
VerticalAlignment="Stretch"
Click="PostBoxExpandButton_OnClick"
Content=""
FontFamily="Segoe MDL2 Assets" />
<TextBlock Grid.Column="1"
Margin="12,6"
HorizontalAlignment="Left"
VerticalAlignment="Center"
Foreground="{ThemeResource Brush-Grey-01}"
Text="Post" />
</Grid>
<Grid x:Name="PostPanel"
Grid.Row="1"
Margin="24">
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<TextBox x:Name="UrlText"
Header="Url"
Text="https://github.com/windows-toolkit/WindowsCommunityToolkit" />
<Button x:Name="ShareButton"
Grid.Column="1"
Margin="12,0,0,0"
Click="ShareButton_OnClick"
VerticalAlignment="Bottom"
Content="Share with dialog" />
</Grid>
</Grid>
<!-- Posts -->
<ListView x:Name="PostListView"
Grid.Row="2"
ItemTemplate="{StaticResource FacebookPostSchemaTemplate}">
<ListView.ItemContainerStyle>
<Style TargetType="ListViewItem">
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ListViewItem">
<ListViewItemPresenter PointerOverBackground="{x:Null}" />
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</ListView.ItemContainerStyle>
</ListView>
<!-- Photos -->
<Grid x:Name="PhotoBox"
Grid.Row="2"
VerticalAlignment="Top">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid Background="{ThemeResource InfoArea-Titlebar}">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Button x:Name="PhotoBoxExpandButton"
VerticalAlignment="Stretch"
Click="PhotoBoxExpandButton_Click"
Content=""
FontFamily="Segoe MDL2 Assets" />
<TextBlock Grid.Column="1"
Margin="12,6"
HorizontalAlignment="Left"
VerticalAlignment="Center"
Foreground="{ThemeResource Brush-Grey-01}"
Text="Photos" />
</Grid>
<ScrollViewer x:Name="PhotoScroller"
Grid.Row="1">
<GridView x:Name="PhotoGridView"
ItemTemplateSelector="{StaticResource facebookPhotoTemplateSelector}"
SelectionChanged="PhotoGridView_SelectionChanged" />
</ScrollViewer>
</Grid>
</Grid>
</ScrollViewer>
</Grid>
</Grid>
</Page>

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

@ -1,192 +0,0 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System;
using Microsoft.Toolkit.Uwp.Services.Facebook;
using Microsoft.UI.Xaml;
using Windows.Storage;
using Windows.Storage.Pickers;
using Windows.UI.Popups;
namespace Microsoft.Toolkit.Uwp.SampleApp.SamplePages
{
public sealed partial class FacebookPage
{
public FacebookPage()
{
InitializeComponent();
QueryType.ItemsSource = new[] { "My feed", "My posts", "My tagged", "My albums" };
QueryType.SelectedIndex = 0;
ShareBox.Visibility = Visibility.Collapsed;
PhotoBox.Visibility = Visibility.Collapsed;
HidePostPanel();
HidePhotoPanel();
}
private async void ConnectButton_OnClick(object sender, RoutedEventArgs e)
{
if (!await Tools.CheckInternetConnectionAsync())
{
return;
}
if (string.IsNullOrEmpty(AppIDText.Text))
{
return;
}
SampleController.Current.DisplayWaitRing = true;
FacebookService.Instance.Initialize(AppIDText.Text, FacebookPermissions.PublicProfile | FacebookPermissions.UserPosts | FacebookPermissions.UserPhotos);
if (!await FacebookService.Instance.LoginAsync())
{
ShareBox.Visibility = Visibility.Collapsed;
SampleController.Current.DisplayWaitRing = false;
var error = new MessageDialog("Unable to log to Facebook");
await error.ShowAsync();
return;
}
FacebookDataConfig config;
switch (QueryType.SelectedIndex)
{
case 1:
config = FacebookDataConfig.MyPosts;
break;
case 2:
config = FacebookDataConfig.MyTagged;
break;
default:
config = FacebookDataConfig.MyFeed;
break;
}
if (QueryType.SelectedIndex == 3)
{
PhotoGridView.ItemsSource = await FacebookService.Instance.GetUserAlbumsAsync();
ShareBox.Visibility = Visibility.Collapsed;
PhotoBox.Visibility = Visibility.Visible;
HidePostPanel();
ShowPhotoPanel();
PhotoGridView.Visibility = Visibility.Visible;
PostListView.Visibility = Visibility.Collapsed;
}
else
{
PostListView.ItemsSource = await FacebookService.Instance.RequestAsync(config, 50);
ShareBox.Visibility = Visibility.Visible;
PhotoBox.Visibility = Visibility.Collapsed;
ShowPostPanel();
HidePhotoPanel();
PhotoGridView.Visibility = Visibility.Collapsed;
PostListView.Visibility = Visibility.Visible;
}
HideCredentialsPanel();
ProfileImage.DataContext = await FacebookService.Instance.GetUserPictureInfoAsync();
ProfileImage.Visibility = Visibility.Visible;
SampleController.Current.DisplayWaitRing = false;
}
private async void ShareButton_OnClick(object sender, RoutedEventArgs e)
{
if (!await Tools.CheckInternetConnectionAsync())
{
return;
}
await FacebookService.Instance.PostToFeedWithDialogAsync(UrlText.Text);
var message = new MessageDialog("Post sent to facebook");
await message.ShowAsync();
}
private void CredentialsBoxExpandButton_OnClick(object sender, RoutedEventArgs e)
{
if (CredentialsBox.Visibility == Visibility.Visible)
{
HideCredentialsPanel();
}
else
{
ShowCredentialsPanel();
}
}
private void PostBoxExpandButton_OnClick(object sender, RoutedEventArgs e)
{
if (PostPanel.Visibility == Visibility.Visible)
{
HidePostPanel();
}
else
{
ShowPostPanel();
}
}
private void PhotoBoxExpandButton_Click(object sender, RoutedEventArgs e)
{
if (PhotoScroller.Visibility == Visibility.Visible)
{
HidePhotoPanel();
}
else
{
ShowPhotoPanel();
}
}
private void ShowCredentialsPanel()
{
CredentialsBoxExpandButton.Content = "";
CredentialsBox.Visibility = Visibility.Visible;
}
private void HideCredentialsPanel()
{
CredentialsBoxExpandButton.Content = "";
CredentialsBox.Visibility = Visibility.Collapsed;
}
private void ShowPostPanel()
{
PostBoxExpandButton.Content = "";
PostPanel.Visibility = Visibility.Visible;
}
private void HidePostPanel()
{
PostBoxExpandButton.Content = "";
PostPanel.Visibility = Visibility.Collapsed;
}
private void ShowPhotoPanel()
{
PhotoBoxExpandButton.Content = "";
PhotoScroller.Visibility = Visibility.Visible;
}
private void HidePhotoPanel()
{
PhotoBoxExpandButton.Content = "";
PhotoScroller.Visibility = Visibility.Collapsed;
}
private async void PhotoGridView_SelectionChanged(object sender, Microsoft.UI.Xaml.Controls.SelectionChangedEventArgs e)
{
SampleController.Current.DisplayWaitRing = true;
var addedItem = e.AddedItems.Count > 0 ? e.AddedItems[0] as FacebookAlbum : null;
if (addedItem != null)
{
PhotoGridView.ItemsSource = await FacebookService.Instance.GetUserPhotosByAlbumIdAsync(addedItem.Id);
}
SampleController.Current.DisplayWaitRing = false;
}
}
}

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

@ -1,37 +0,0 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using Microsoft.Toolkit.Uwp.Services.Facebook;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
namespace Microsoft.Toolkit.Uwp.SampleApp.SamplePages
{
public class FacebookPhotoTemplateSelector : DataTemplateSelector
{
public DataTemplate FacebookPhotoTemplate { get; set; }
public DataTemplate FacebookAlbumTemplate { get; set; }
protected override DataTemplate SelectTemplateCore(object item)
{
if (item.GetType() == typeof(FacebookPhoto))
{
return FacebookPhotoTemplate;
}
if (item.GetType() == typeof(FacebookAlbum))
{
return FacebookAlbumTemplate;
}
return base.SelectTemplateCore(item);
}
protected override DataTemplate SelectTemplateCore(object item, DependencyObject container)
{
return SelectTemplateCore(item);
}
}
}

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 871 B

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

@ -111,7 +111,7 @@ namespace Microsoft.Toolkit.Uwp.SampleApp.SamplePages
if (round)
{
newImage.CornerRadius = CornerRadiusHelper.FromUniformRadius(999);
newImage.CornerRadius = new CornerRadius(999);
}
newImage.Source = broken ? photos[imageIndex].Thumbnail + "broken" : photos[imageIndex].Thumbnail;

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

@ -3,11 +3,11 @@
// See the LICENSE file in the project root for more information.
using System;
using System.Windows.Input;
using Microsoft.Toolkit.Uwp.UI.Controls;
using Microsoft.Toolkit.Uwp.UI.Extensions;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
using Microsoft.UI.Xaml.Input;
namespace Microsoft.Toolkit.Uwp.SampleApp.SamplePages
{
@ -64,18 +64,18 @@ namespace Microsoft.Toolkit.Uwp.SampleApp.SamplePages
var grid = new Grid()
{
Margin = ThicknessHelper.FromLengths(0, 0, -38, 0)
Margin = new Thickness(0, 0, -38, 0)
};
grid.ColumnDefinitions.Add(new ColumnDefinition { Width = GridLengthHelper.FromValueAndType(1, GridUnitType.Star) });
grid.ColumnDefinitions.Add(new ColumnDefinition { Width = GridLengthHelper.Auto });
grid.ColumnDefinitions.Add(new ColumnDefinition { Width = new GridLength(1, GridUnitType.Star) });
grid.ColumnDefinitions.Add(new ColumnDefinition { Width = GridLength.Auto });
// Text part
var textBlock = new TextBlock
{
Text = "Do you like it?",
VerticalAlignment = VerticalAlignment.Center,
Margin = ThicknessHelper.FromLengths(0, 0, 24, 0),
Margin = new Thickness(0, 0, 24, 0),
FontSize = 16
};
grid.Children.Add(textBlock);
@ -103,7 +103,7 @@ namespace Microsoft.Toolkit.Uwp.SampleApp.SamplePages
Width = 120,
Height = 40,
FontSize = 16,
Margin = ThicknessHelper.FromLengths(4, 0, 0, 0)
Margin = new Thickness(4, 0, 0, 0)
};
noButton.Click += NoButton_Click;
stackPanel.Children.Add(noButton);
@ -209,7 +209,7 @@ namespace Microsoft.Toolkit.Uwp.SampleApp.SamplePages
#pragma warning restore SA1402 // File may only contain a single class
{
#pragma warning disable CS0067 // An event was declared but never used in the class in which it was declared.
public event EventHandler<object> CanExecuteChanged;
public event EventHandler CanExecuteChanged;
#pragma warning restore CS0067 // An event was declared but never used in the class in which it was declared.
public bool CanExecute(object parameter)

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше