Skip to content

Commit

Permalink
Add Design project for the UWP Media controls
Browse files Browse the repository at this point in the history
Basic DesignTime support on-par with other controls in the toolkit.

Reverts the following commit
- Commit Message: `Media Controls does not have a "DesignTools" project`
- Commit Hash   : `1781e7f4291061c642fedfa5307aa80879838b56`
  • Loading branch information
Nirmal4G committed Aug 14, 2021
1 parent 3f9e651 commit 1bbfe00
Show file tree
Hide file tree
Showing 5 changed files with 255 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">

<PropertyGroup>
<TargetFramework>net472</TargetFramework>
<RootNamespace>Microsoft.Toolkit.Uwp.UI.Controls</RootNamespace>
</PropertyGroup>

<PropertyGroup>
<AssemblyTitle>Windows Community Toolkit - Media Controls (Design)</AssemblyTitle>
<Description>Design time support for Windows Community Toolkit Media Controls</Description>
</PropertyGroup>

<ItemGroup>
<Compile Include="..\Microsoft.Toolkit.Uwp.UI.Controls.Core.Design\Common\*.cs" LinkBase="Common" />
</ItemGroup>

<Import Project="$(BuildToolsDirectory)Windows.Toolkit.VisualStudio.Design.targets" />

</Project>

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="CategoryCommon" xml:space="preserve">
<value>Common</value>
</data>
<data name="CategoryLayout" xml:space="preserve">
<value>Layout</value>
</data>
</root>
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,17 @@

<ItemGroup>
<Compile Include="..\Microsoft.Toolkit.Uwp.UI.Controls.Core\ControlHelpers.XamlHost.cs" Link="ControlHelpers.XamlHost.cs" />
<None Include="VisualStudioToolsManifest.xml" Pack="true" PackagePath="tools" />
</ItemGroup>

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

<ItemGroup>
<PackageReference Include="Microsoft.UI.Xaml" Version="2.6.1" />
<PackageReference Include="System.Text.Json" Version="5.0.2" />
<PackageReference Include="Win2D.uwp" Version="1.25.0" />
</ItemGroup>

<Import Project="$(BuildToolsDirectory)Windows.Toolkit.UWP.Controls.targets" />

</Project>
28 changes: 27 additions & 1 deletion Windows Community Toolkit.sln
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,11 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Toolkit.Diagnosti
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.Media.DesignTools", "Microsoft.Toolkit.Uwp.UI.Controls.Media.Design\Microsoft.Toolkit.Uwp.UI.Controls.Media.DesignTools.csproj", "{B9940334-BD06-44E2-B9E9-A65DA791CE32}"
ProjectSection(ProjectDependencies) = postProject
{43BD2A36-9E12-4788-80AE-2377E41E6D05} = {43BD2A36-9E12-4788-80AE-2377E41E6D05}
EndProjectSection
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("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "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 All @@ -161,7 +166,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Toolkit.Mvvm.Sour
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UnitTests.SourceGenerators", "UnitTests\UnitTests.SourceGenerators\UnitTests.SourceGenerators.csproj", "{338C3BE4-2E71-4F21-AD30-03FDBB47A272}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnitTests.NetStandard", "UnitTests\UnitTests.NetStandard\UnitTests.NetStandard.csproj", "{D9C82C0D-31D7-4888-B024-3CF3A4F54FE1}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UnitTests.NetStandard", "UnitTests\UnitTests.NetStandard\UnitTests.NetStandard.csproj", "{D9C82C0D-31D7-4888-B024-3CF3A4F54FE1}"
EndProject
Global
GlobalSection(SharedMSBuildProjectFiles) = preSolution
Expand Down Expand Up @@ -996,6 +1001,26 @@ Global
{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
{B9940334-BD06-44E2-B9E9-A65DA791CE32}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B9940334-BD06-44E2-B9E9-A65DA791CE32}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B9940334-BD06-44E2-B9E9-A65DA791CE32}.Debug|ARM.ActiveCfg = Debug|Any CPU
{B9940334-BD06-44E2-B9E9-A65DA791CE32}.Debug|ARM.Build.0 = Debug|Any CPU
{B9940334-BD06-44E2-B9E9-A65DA791CE32}.Debug|ARM64.ActiveCfg = Debug|Any CPU
{B9940334-BD06-44E2-B9E9-A65DA791CE32}.Debug|ARM64.Build.0 = Debug|Any CPU
{B9940334-BD06-44E2-B9E9-A65DA791CE32}.Debug|x64.ActiveCfg = Debug|Any CPU
{B9940334-BD06-44E2-B9E9-A65DA791CE32}.Debug|x64.Build.0 = Debug|Any CPU
{B9940334-BD06-44E2-B9E9-A65DA791CE32}.Debug|x86.ActiveCfg = Debug|Any CPU
{B9940334-BD06-44E2-B9E9-A65DA791CE32}.Debug|x86.Build.0 = Debug|Any CPU
{B9940334-BD06-44E2-B9E9-A65DA791CE32}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B9940334-BD06-44E2-B9E9-A65DA791CE32}.Release|Any CPU.Build.0 = Release|Any CPU
{B9940334-BD06-44E2-B9E9-A65DA791CE32}.Release|ARM.ActiveCfg = Release|Any CPU
{B9940334-BD06-44E2-B9E9-A65DA791CE32}.Release|ARM.Build.0 = Release|Any CPU
{B9940334-BD06-44E2-B9E9-A65DA791CE32}.Release|ARM64.ActiveCfg = Release|Any CPU
{B9940334-BD06-44E2-B9E9-A65DA791CE32}.Release|ARM64.Build.0 = Release|Any CPU
{B9940334-BD06-44E2-B9E9-A65DA791CE32}.Release|x64.ActiveCfg = Release|Any CPU
{B9940334-BD06-44E2-B9E9-A65DA791CE32}.Release|x64.Build.0 = Release|Any CPU
{B9940334-BD06-44E2-B9E9-A65DA791CE32}.Release|x86.ActiveCfg = Release|Any CPU
{B9940334-BD06-44E2-B9E9-A65DA791CE32}.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 @@ -1219,6 +1244,7 @@ Global
{1D8B0260-5C17-41DA-9C38-1E37441B3925} = {6FAA1CFE-3368-4FD2-9DBD-F4700F69174C}
{D4FF799D-0DF2-495A-ADC9-3BBC4AEF8971} = {F1AFFFA7-28FE-4770-BA48-10D76F3E59BC}
{43BD2A36-9E12-4788-80AE-2377E41E6D05} = {F1AFFFA7-28FE-4770-BA48-10D76F3E59BC}
{B9940334-BD06-44E2-B9E9-A65DA791CE32} = {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}
{1B55A026-5BF8-4D04-B7C0-A82AB49BA017} = {F1AFFFA7-28FE-4770-BA48-10D76F3E59BC}
Expand Down

0 comments on commit 1bbfe00

Please sign in to comment.