This repository was archived by the owner on Feb 25, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Split out Controls.Media package. #3669
Merged
michael-hawker
merged 18 commits into
CommunityToolkit:dev/split-controls
from
Rosuavio:split-media
Jan 20, 2021
Merged
Changes from 6 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
c763049
WIP: move Eyedropper, ImageCropper, InfiniteCanvas
Rosuavio f66ae16
Controls.Media: Remove System.ValueTuple
Rosuavio 8927201
Controls: Remove System.ValueTuple, System.Text.Json
Rosuavio 0869c79
Fix assemly name in test file
Rosuavio b298fd0
Controls.Media: ControlHelpers.XamlHost.cs, use file like in project …
Rosuavio b85d0dd
Merge branch 'dev/split-controls' into split-media
Rosuavio e4db504
Handle V1 of InfiniteCanvasExport data, and regresion test for V2
Rosuavio 250f5d4
Merge branch 'dev/split-controls' into split-media
Rosuavio 8ee6b1a
Controls.Media: Add smoke tests.
Rosuavio ddc7950
Controls.Media: Eyedroper to Project description and Package Tags
Rosuavio 8f60463
Controls.Media: change title to include Media
Rosuavio 97dda4a
Controls.Media: List Eyedropper and ImageCropper in VisualStudioTools…
Rosuavio fb228c3
Controls.Media: Imporove description
Rosuavio c61156d
Fix usages of old assembly name
Rosuavio 56609a0
Handel descirminator textDrawable from Control Assembly
Rosuavio 53344dc
Test sample exported from inifinate canvase instead of modified from …
Rosuavio 5a987f9
Merge branch 'dev/split-controls' into split-media
Rosuavio aed5068
TEMP: Remove usages of graph controls
Rosuavio File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
42 changes: 42 additions & 0 deletions
42
Microsoft.Toolkit.Uwp.UI.Controls.Media/Microsoft.Toolkit.Uwp.UI.Controls.Media.csproj
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 & 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->'"%(Identity)"')" /> | ||
| <Exec Command="for %%f in (@(GeneratedCSFiles->'"%(Identity)"')) do echo #pragma warning disable > %%f.temp && type %%f >> %%f.temp && move /y %%f.temp %%f > NUL" /> | ||
| </Target> | ||
| </Project> |
13 changes: 13 additions & 0 deletions
13
Microsoft.Toolkit.Uwp.UI.Controls.Media/Properties/AssemblyInfo.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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")] |
File renamed without changes.
10 changes: 10 additions & 0 deletions
10
Microsoft.Toolkit.Uwp.UI.Controls.Media/Themes/Generic.xaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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> |
7 changes: 7 additions & 0 deletions
7
Microsoft.Toolkit.Uwp.UI.Controls.Media/VisualStudioToolsManifest.xml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
UnitTests/UnitTests.UWP/Assets/Samples/InfiniteCanvasExport.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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.Jsonright? Is there some custom Type resolver we could provide to help it do the migration?There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.