Skip to content
This repository was archived by the owner on Feb 25, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1498,6 +1498,10 @@
<Project>{6fedf199-b052-49dd-8f3e-2a9224998e0f}</Project>
<Name>Microsoft.Toolkit.Uwp.UI.Controls.Markdown</Name>
</ProjectReference>
<ProjectReference Include="..\Microsoft.Toolkit.Uwp.UI.Controls.Media\Microsoft.Toolkit.Uwp.UI.Controls.Media.csproj">
<Project>{43bd2a36-9e12-4788-80ae-2377e41e6d05}</Project>
<Name>Microsoft.Toolkit.Uwp.UI.Controls.Media</Name>
</ProjectReference>
<ProjectReference Include="..\Microsoft.Toolkit.Uwp.UI.Controls.Primitives\Microsoft.Toolkit.Uwp.UI.Controls.Primitives.csproj">
<Project>{84ab7dc5-95c9-4cf8-a370-d077e9e9ef1a}</Project>
<Name>Microsoft.Toolkit.Uwp.UI.Controls.Primitives</Name>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<Project Sdk="MSBuild.Sdk.Extras">

<PropertyGroup>
<TargetFrameworks>uap10.0.17763</TargetFrameworks>
<Title>Windows Community Toolkit Controls</Title>
<Description>
This library provides XAML templated controls. It is part of the Windows Community Toolkit.

Controls:
- ImageCropper: ImageCropper control allows user to crop image freely.
- InfiniteCanvas: Supports Infinite Scrolling, Ink, Text, Format Text, Zoom in/out, Redo, Undo, Export &amp; Import.
</Description>
<PackageTags>UWP Toolkit Windows Controls XAML 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>

<ItemGroup>
<PackageReference Include="System.Text.Json" Version="4.7.2" />
<PackageReference Include="Win2D.uwp" Version="1.25.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Microsoft.Toolkit.Uwp.UI\Microsoft.Toolkit.Uwp.UI.csproj" />
</ItemGroup>

<ItemGroup>
<Compile Include="..\Microsoft.Toolkit.Uwp.UI.Controls\ControlHelpers.XamlHost.cs" Link="ControlHelpers.XamlHost.cs" />
<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>

<!-- 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>
13 changes: 13 additions & 0 deletions Microsoft.Toolkit.Uwp.UI.Controls.Media/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// 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.Resources;
using System.Runtime.CompilerServices;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: InternalsVisibleTo("UnitTests.UWP")]
[assembly: InternalsVisibleTo("UnitTests.XamlIslands.UWPApp")]
[assembly: NeutralResourcesLanguage("en-US")]
10 changes: 10 additions & 0 deletions Microsoft.Toolkit.Uwp.UI.Controls.Media/Themes/Generic.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="ms-appx:///Microsoft.Toolkit.Uwp.UI.Controls/Eyedropper/Eyedropper.xaml" />
<ResourceDictionary Source="ms-appx:///Microsoft.Toolkit.Uwp.UI.Controls/Eyedropper/EyedropperToolButton.xaml" />
<ResourceDictionary Source="ms-appx:///Microsoft.Toolkit.Uwp.UI.Controls/ImageCropper/ImageCropper.xaml" />
<ResourceDictionary Source="ms-appx:///Microsoft.Toolkit.Uwp.UI.Controls/ImageCropper/ImageCropperThumb.xaml" />
<ResourceDictionary Source="ms-appx:///Microsoft.Toolkit.Uwp.UI.Controls/InfiniteCanvas/InfiniteCanvas.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<FileList>
<File Reference="Microsoft.Toolkit.Uwp.UI.Controls.dll">
<ToolboxItems VSCategory="Windows Community Toolkit" BlendCategory="Windows Community Toolkit">
<Item Type="Microsoft.Toolkit.Uwp.UI.Controls.InfiniteCanvas" />
</ToolboxItems>
</File>
</FileList>
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,8 @@
- GridSplitter: A the control that redistributes space between columns or rows of a Grid control.
- HeaderedContentControl: Provides a header to content.
- HeaderedItemsControl: Provides a header to items.
- ImageCropper: ImageCropper control allows user to crop image freely.
- ImageEx: Images are downloaded asynchronously showing a load indicator and can be stored in a local cache.
- InAppNotification: Show local notifications in your application.
- InfiniteCanvas: Supports Infinite Scrolling, Ink, Text, Format Text, Zoom in/out, Redo, Undo, Export &amp; Import.
- LayoutTransformControl: Support for transformations as if applied by LayoutTransform.
- Loading: Helps to show content with animation to the user while the app is doing some calculation.
- MasterDetailsView: Implements the Master/Details design pattern.
Expand All @@ -40,11 +38,6 @@
<LangVersion>8.0</LangVersion>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="System.ValueTuple" Version="4.5.0" />
<PackageReference Include="System.Text.Json" Version="4.7.2" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\Microsoft.Toolkit.Uwp.UI.Animations\Microsoft.Toolkit.Uwp.UI.Animations.csproj" />
<ProjectReference Include="..\Microsoft.Toolkit.Uwp.UI.Controls.Primitives\Microsoft.Toolkit.Uwp.UI.Controls.Primitives.csproj" />
Expand Down
7 changes: 0 additions & 7 deletions Microsoft.Toolkit.Uwp.UI.Controls/Themes/Generic.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,8 @@
<ResourceDictionary Source="ms-appx:///Microsoft.Toolkit.Uwp.UI.Controls/GridSplitter/GridSplitter.xaml" />
<ResourceDictionary Source="ms-appx:///Microsoft.Toolkit.Uwp.UI.Controls/HeaderedContentControl/HeaderedContentControl.xaml" />
<ResourceDictionary Source="ms-appx:///Microsoft.Toolkit.Uwp.UI.Controls/HeaderedItemsControl/HeaderedItemsControl.xaml" />
<ResourceDictionary Source="ms-appx:///Microsoft.Toolkit.Uwp.UI.Controls/ImageCropper/ImageCropper.xaml" />
<ResourceDictionary Source="ms-appx:///Microsoft.Toolkit.Uwp.UI.Controls/ImageCropper/ImageCropperThumb.xaml" />
<ResourceDictionary Source="ms-appx:///Microsoft.Toolkit.Uwp.UI.Controls/ImageEx/ImageEx.xaml" />
<ResourceDictionary Source="ms-appx:///Microsoft.Toolkit.Uwp.UI.Controls/InAppNotification/InAppNotification.xaml" />
<ResourceDictionary Source="ms-appx:///Microsoft.Toolkit.Uwp.UI.Controls/InfiniteCanvas/InfiniteCanvas.xaml" />
<ResourceDictionary Source="ms-appx:///Microsoft.Toolkit.Uwp.UI.Controls/LayoutTransformControl/LayoutTransformControl.xaml" />
<ResourceDictionary Source="ms-appx:///Microsoft.Toolkit.Uwp.UI.Controls/Loading/Loading.xaml" />
<ResourceDictionary Source="ms-appx:///Microsoft.Toolkit.Uwp.UI.Controls/MasterDetailsView/MasterDetailsView.xaml" />
Expand All @@ -28,10 +25,6 @@
<ResourceDictionary Source="ms-appx:///Microsoft.Toolkit.Uwp.UI.Controls/RemoteDevicePicker/RemoteDevicePicker.xaml" />
<ResourceDictionary Source="ms-appx:///Microsoft.Toolkit.Uwp.UI.Controls/RotatorTile/RotatorTile.xaml" />
<ResourceDictionary Source="ms-appx:///Microsoft.Toolkit.Uwp.UI.Controls/ScrollHeader/ScrollHeader.xaml" />
<ResourceDictionary Source="ms-appx:///Microsoft.Toolkit.Uwp.UI.Controls/ImageCropper/ImageCropperThumb.xaml" />
<ResourceDictionary Source="ms-appx:///Microsoft.Toolkit.Uwp.UI.Controls/ImageCropper/ImageCropper.xaml" />
<ResourceDictionary Source="ms-appx:///Microsoft.Toolkit.Uwp.UI.Controls/Eyedropper/Eyedropper.xaml" />
<ResourceDictionary Source="ms-appx:///Microsoft.Toolkit.Uwp.UI.Controls/Eyedropper/EyedropperToolButton.xaml" />
<ResourceDictionary Source="ms-appx:///Microsoft.Toolkit.Uwp.UI.Controls/TextToolbar/TextToolbar.xaml" />
<ResourceDictionary Source="ms-appx:///Microsoft.Toolkit.Uwp.UI.Controls/TileControl/TileControl.xaml" />
<ResourceDictionary Source="ms-appx:///Microsoft.Toolkit.Uwp.UI.Controls/TokenizingTextBox/TokenizingTextBox.xaml" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
<Item Type="Microsoft.Toolkit.Uwp.UI.Controls.ImageEx" />
<Item Type="Microsoft.Toolkit.Uwp.UI.Controls.ImageExBase" />
<Item Type="Microsoft.Toolkit.Uwp.UI.Controls.InAppNotification" />
<Item Type="Microsoft.Toolkit.Uwp.UI.Controls.InfiniteCanvas" />
<Item Type="Microsoft.Toolkit.Uwp.UI.Controls.LayoutTransformControl" />
<Item Type="Microsoft.Toolkit.Uwp.UI.Controls.Loading" />
<Item Type="Microsoft.Toolkit.Uwp.UI.Controls.MasterDetailsView" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"DrawableList": [
{
"$type": "Microsoft.Toolkit.Uwp.UI.Controls.InkDrawable, Microsoft.Toolkit.Uwp.UI.Controls",
"$type": "Microsoft.Toolkit.Uwp.UI.Controls.InkDrawable, Microsoft.Toolkit.Uwp.UI.Controls.Media",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@azchohfi talking to Rosario, this appears to be the assembly name. So this is going to break compatibility with previously exported InfiniteCanvas files, eh? This is going to be an issue for apps using this control, right?

Any thoughts on how we may be able to mitigate this? This is used directly by System.Text.Json right? Is there some custom Type resolver we could provide to help it do the migration?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We already have a custom type resolver:
https://github.com/windows-toolkit/WindowsCommunityToolkit/blob/0d43da7ae459d000ee29dcb108cc08a56bf5073f/Microsoft.Toolkit.Uwp.UI.Controls/InfiniteCanvas/JsonConverters/IDrawableConverter.cs#L43-L50
We could either introduce a new version or just try to handle this here. I think it makes more sense to introduce a new version.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

e4db504 Added a check for the old Discriminator.

"SerializableStrokeList": [
{
"DrawingAttributes": {
Expand Down
4 changes: 4 additions & 0 deletions UnitTests/UnitTests.UWP/UnitTests.UWP.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,10 @@
<Project>{b1e850ff-dde6-44d5-a830-34250e97a687}</Project>
<Name>Microsoft.Toolkit.Uwp.Connectivity</Name>
</ProjectReference>
<ProjectReference Include="..\..\Microsoft.Toolkit.Uwp.UI.Controls.Media\Microsoft.Toolkit.Uwp.UI.Controls.Media.csproj">
<Project>{43bd2a36-9e12-4788-80ae-2377e41e6d05}</Project>
<Name>Microsoft.Toolkit.Uwp.UI.Controls.Media</Name>
</ProjectReference>
<ProjectReference Include="..\..\Microsoft.Toolkit.Uwp.UI.Controls.Primitives\Microsoft.Toolkit.Uwp.UI.Controls.Primitives.csproj">
<Project>{84ab7dc5-95c9-4cf8-a370-d077e9e9ef1a}</Project>
<Name>Microsoft.Toolkit.Uwp.UI.Controls.Primitives</Name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,10 @@
<Project>{5bf75694-798a-43a0-8150-415de195359c}</Project>
<Name>Microsoft.Toolkit.Uwp.Input.GazeInteraction</Name>
</ProjectReference>
<ProjectReference Include="..\..\Microsoft.Toolkit.Uwp.UI.Controls.Media\Microsoft.Toolkit.Uwp.UI.Controls.Media.csproj">
<Project>{43bd2a36-9e12-4788-80ae-2377e41e6d05}</Project>
<Name>Microsoft.Toolkit.Uwp.UI.Controls.Media</Name>
</ProjectReference>
<ProjectReference Include="..\..\Microsoft.Toolkit.Uwp.UI.Controls\Microsoft.Toolkit.Uwp.UI.Controls.csproj">
<Project>{e9faabfb-d726-42c1-83c1-cb46a29fea81}</Project>
<Name>Microsoft.Toolkit.Uwp.UI.Controls</Name>
Expand Down
23 changes: 23 additions & 0 deletions Windows Community Toolkit.sln
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UITests.Tests.TAEF", "UITes
EndProject
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "UITests.Tests.Shared", "UITests\UITests.Tests.Shared\UITests.Tests.Shared.shproj", "{1D8B0260-5C17-41DA-9C38-1E37441B3925}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Toolkit.Uwp.UI.Controls.Media", "Microsoft.Toolkit.Uwp.UI.Controls.Media\Microsoft.Toolkit.Uwp.UI.Controls.Media.csproj", "{43BD2A36-9E12-4788-80AE-2377E41E6D05}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Toolkit.Uwp.UI.Controls.Primitives", "Microsoft.Toolkit.Uwp.UI.Controls.Primitives\Microsoft.Toolkit.Uwp.UI.Controls.Primitives.csproj", "{84AB7DC5-95C9-4CF8-A370-D077E9E9EF1A}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Toolkit.Uwp.UI.Controls.Primitives.DesignTools", "Microsoft.Toolkit.Uwp.UI.Controls.Primitives.Design\Microsoft.Toolkit.Uwp.UI.Controls.Primitives.DesignTools.csproj", "{AF5045DE-0D13-45C2-AC33-50CF5FDB333A}"
Expand Down Expand Up @@ -963,6 +965,26 @@ Global
{C8182EF0-77FB-4B43-A588-C71748A309C7}.Release|x64.Build.0 = Release|Any CPU
{C8182EF0-77FB-4B43-A588-C71748A309C7}.Release|x86.ActiveCfg = Release|Any CPU
{C8182EF0-77FB-4B43-A588-C71748A309C7}.Release|x86.Build.0 = Release|Any CPU
{43BD2A36-9E12-4788-80AE-2377E41E6D05}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{43BD2A36-9E12-4788-80AE-2377E41E6D05}.Debug|Any CPU.Build.0 = Debug|Any CPU
{43BD2A36-9E12-4788-80AE-2377E41E6D05}.Debug|ARM.ActiveCfg = Debug|Any CPU
{43BD2A36-9E12-4788-80AE-2377E41E6D05}.Debug|ARM.Build.0 = Debug|Any CPU
{43BD2A36-9E12-4788-80AE-2377E41E6D05}.Debug|ARM64.ActiveCfg = Debug|Any CPU
{43BD2A36-9E12-4788-80AE-2377E41E6D05}.Debug|ARM64.Build.0 = Debug|Any CPU
{43BD2A36-9E12-4788-80AE-2377E41E6D05}.Debug|x64.ActiveCfg = Debug|Any CPU
{43BD2A36-9E12-4788-80AE-2377E41E6D05}.Debug|x64.Build.0 = Debug|Any CPU
{43BD2A36-9E12-4788-80AE-2377E41E6D05}.Debug|x86.ActiveCfg = Debug|Any CPU
{43BD2A36-9E12-4788-80AE-2377E41E6D05}.Debug|x86.Build.0 = Debug|Any CPU
{43BD2A36-9E12-4788-80AE-2377E41E6D05}.Release|Any CPU.ActiveCfg = Release|Any CPU
{43BD2A36-9E12-4788-80AE-2377E41E6D05}.Release|Any CPU.Build.0 = Release|Any CPU
{43BD2A36-9E12-4788-80AE-2377E41E6D05}.Release|ARM.ActiveCfg = Release|Any CPU
{43BD2A36-9E12-4788-80AE-2377E41E6D05}.Release|ARM.Build.0 = Release|Any CPU
{43BD2A36-9E12-4788-80AE-2377E41E6D05}.Release|ARM64.ActiveCfg = Release|Any CPU
{43BD2A36-9E12-4788-80AE-2377E41E6D05}.Release|ARM64.Build.0 = Release|Any CPU
{43BD2A36-9E12-4788-80AE-2377E41E6D05}.Release|x64.ActiveCfg = Release|Any CPU
{43BD2A36-9E12-4788-80AE-2377E41E6D05}.Release|x64.Build.0 = Release|Any CPU
{43BD2A36-9E12-4788-80AE-2377E41E6D05}.Release|x86.ActiveCfg = Release|Any CPU
{43BD2A36-9E12-4788-80AE-2377E41E6D05}.Release|x86.Build.0 = Release|Any CPU
{84AB7DC5-95C9-4CF8-A370-D077E9E9EF1A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{84AB7DC5-95C9-4CF8-A370-D077E9E9EF1A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{84AB7DC5-95C9-4CF8-A370-D077E9E9EF1A}.Debug|ARM.ActiveCfg = Debug|Any CPU
Expand Down Expand Up @@ -1036,6 +1058,7 @@ Global
{5F720475-E263-4A5A-8C88-2B805B45B5BC} = {6FAA1CFE-3368-4FD2-9DBD-F4700F69174C}
{C8182EF0-77FB-4B43-A588-C71748A309C7} = {6FAA1CFE-3368-4FD2-9DBD-F4700F69174C}
{1D8B0260-5C17-41DA-9C38-1E37441B3925} = {6FAA1CFE-3368-4FD2-9DBD-F4700F69174C}
{43BD2A36-9E12-4788-80AE-2377E41E6D05} = {F1AFFFA7-28FE-4770-BA48-10D76F3E59BC}
{84AB7DC5-95C9-4CF8-A370-D077E9E9EF1A} = {F1AFFFA7-28FE-4770-BA48-10D76F3E59BC}
{AF5045DE-0D13-45C2-AC33-50CF5FDB333A} = {F1AFFFA7-28FE-4770-BA48-10D76F3E59BC}
EndGlobalSection
Expand Down