diff --git a/Directory.Build.props b/Directory.Build.props
index d43a2ceffc3..9048c242b14 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -14,8 +14,9 @@
$(MSBuildProjectName.Contains('Test'))$(MSBuildProjectName.Contains('Uwp'))$(MSBuildProjectName.Contains('Sample'))
- 19041
- 17763
+ 10.0
+ 19041
+ 17763$(MSBuildThisFileDirectory)bin\nupkg
@@ -88,7 +89,6 @@
-
$(NoWarn);8002
@@ -103,4 +103,7 @@
stylecop.json
+
+
+
\ No newline at end of file
diff --git a/Directory.Build.targets b/Directory.Build.targets
index 111afac2e44..ab132c6cf4c 100644
--- a/Directory.Build.targets
+++ b/Directory.Build.targets
@@ -1,26 +1,11 @@
-
-
-
-
- 10.0.$(DefaultTargetPlatformVersion).0
- 10.0.$(DefaultTargetPlatformMinVersion).0
-
-
- Portable
-
+
+ true
+
-
-
- Windows Desktop Extensions for the UWP
-
-
-
-
-
-
+ true$(MSBuildThisFileDirectory)toolkit.snk
@@ -28,6 +13,8 @@
+
+
@@ -36,4 +23,5 @@
+
\ No newline at end of file
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.DataGrid.Design/Common/MetadataRegistrationBase.cs b/Microsoft.Toolkit.Uwp.UI.Controls.DataGrid.Design/Common/MetadataRegistrationBase.cs
deleted file mode 100644
index 733b19ca7ce..00000000000
--- a/Microsoft.Toolkit.Uwp.UI.Controls.DataGrid.Design/Common/MetadataRegistrationBase.cs
+++ /dev/null
@@ -1,253 +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.Windows.Design.Metadata;
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Diagnostics;
-using System.Diagnostics.CodeAnalysis;
-using System.IO;
-using System.Linq;
-using System.Reflection;
-using System.Xml.Linq;
-
-namespace Microsoft.Toolkit.Uwp.Design.Common
-{
- public class MetadataRegistrationBase
- {
- private AttributeTable masterMetadataTable;
-
- internal MetadataRegistrationBase() { }
-
- ///
- /// Build design time metadata attribute table.
- ///
- /// Custom attribute table.
- protected virtual AttributeTable BuildAttributeTable()
- {
- AttributeTableBuilder builder = new AttributeTableBuilder();
-
- AddDescriptions(builder);
- AddAttributes(builder);
- AddTables(builder, this);
- masterMetadataTable = builder.CreateTable();
- return masterMetadataTable;
- }
-
- ///
- /// Find all AttributeTableBuilder subclasses in the assembly
- /// and add their attributes to the assembly attribute table.
- ///
- /// The assembly attribute table builder.
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Design time dll should not fail!")]
- private void AddTables(AttributeTableBuilder builder, object parent)
- {
- Debug.Assert(builder != null, "AddTables is called with null parameter!");
-
- Assembly asm = parent.GetType().Assembly;
- foreach (Type t in asm.GetTypes())
- {
- if (t.IsSubclassOf(typeof(AttributeTableBuilder)))
- {
- try
- {
- AttributeTableBuilder atb = (AttributeTableBuilder)Activator.CreateInstance(t);
- builder.AddTable(atb.CreateTable());
- }
- catch (Exception)
- {
- //error loading design assembly
- }
- }
- }
- }
-
- ///
- /// Gets or sets the case sensitive resource name of the embedded XML file.
- ///
- protected string XmlResourceName { get; set; }
-
- ///
- /// Gets or sets the FullName of the corresponding run time assembly.
- ///
- protected string AssemblyFullName { get; set; }
-
- ///
- /// Create description attribute from run time assembly xml file.
- ///
- /// The assembly attribute table builder.
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Design time dll should not fail.")]
- private void AddDescriptions(AttributeTableBuilder builder)
- {
- Debug.Assert(builder != null, "AddDescriptions is called with null parameter!");
-
- if (string.IsNullOrEmpty(XmlResourceName) ||
- string.IsNullOrEmpty(AssemblyFullName))
- {
- return;
- }
- XDocument xdoc = null;
- try
- {
- xdoc = XDocument.Load(new StreamReader(
- Assembly.GetExecutingAssembly().GetManifestResourceStream(XmlResourceName)));
- }
- catch { return; }
- if (xdoc == null)
- {
- return;
- }
-
- foreach (XElement member in xdoc.Descendants("member"))
- {
- try
- {
- string name = (string)member.Attribute("name");
- if (name == null)
- continue;
- bool isType = name.StartsWith("T:", StringComparison.OrdinalIgnoreCase);
- if (isType ||
- name.StartsWith("P:", StringComparison.OrdinalIgnoreCase))
- {
- int lastDot = name.Length;
- string typeName;
- if (isType)
- {
- typeName = name.Substring(2); // skip leading "T:"
- }
- else
- {
- lastDot = name.LastIndexOf('.');
- typeName = name.Substring(2, lastDot - 2);
- }
- typeName += AssemblyFullName;
-
- Type t = Type.GetType(typeName);
- if (t != null && t.IsPublic && t.IsClass &&
- t.IsSubclassOf(Types.PlatformTypes.DependencyObjectType))
- {
- string desc = ParseDescription(member);
- if (desc == null)
- continue;
-
- desc = desc.Trim();
- desc = string.Join(" ", desc.Split(new char[] { ' ', '\t', '\n', '\r' }, StringSplitOptions.RemoveEmptyEntries));
- if (isType)
- {
- bool isBrowsable = true;
- try
- {
- isBrowsable = IsBrowsable(t);
- }
- catch { isBrowsable = false; }
- if (isBrowsable)
- builder.AddCallback(t, b => b.AddCustomAttributes(new DescriptionAttribute(desc)));
- else //Hide from intellisense
- {
- builder.AddCallback(t, b => b.AddCustomAttributes(
- new BrowsableAttribute(false),
- new Windows.Design.ToolboxBrowsableAttribute(false),
- new ToolboxItemAttribute(false)));
- }
- }
- else
- {
- string propName = name.Substring(lastDot + 1);
- PropertyInfo pi = t.GetProperty(propName, BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly);
- if (pi != null)
- {
- bool isBrowsable = true;
- try
- {
- isBrowsable = IsBrowsable(pi);
- }
- catch { isBrowsable = false; }
- if (isBrowsable)
- builder.AddCallback(t, b => b.AddCustomAttributes(propName, new DescriptionAttribute(desc)));
- else //Hide from intellisense
- builder.AddCallback(t, b => b.AddCustomAttributes(new BrowsableAttribute(false)));
- }
- }
- }
- }
- }
- catch (Exception)
- {
- }
- }
- }
-
- private static bool IsBrowsable(Type t)
- {
- var attrs = t.GetCustomAttributes(Types.PlatformTypes.EditorBrowsableAttributeType, false);
- foreach (var attr in attrs)
- {
- return Types.PlatformTypes.IsBrowsable(attr);
- }
- return true;
- }
-
- private static bool IsBrowsable(PropertyInfo pi)
- {
- var attrs = pi.GetCustomAttributes(Types.PlatformTypes.EditorBrowsableAttributeType, false);
- foreach (var attr in attrs)
- {
- return Types.PlatformTypes.IsBrowsable(attr);
- }
- return true;
- }
-
- ///
- /// Create description string from xml doc summary tag.
- ///
- /// A single node of the xml doc.
- /// Description string.
- private static string ParseDescription(XElement member)
- {
- string desc = null;
- XElement memberDesc = member.Descendants("summary").FirstOrDefault();
-
- if (memberDesc != null)
- {
- IEnumerable nodes = memberDesc.DescendantNodes();
-
- if (nodes != null)
- {
- foreach (XNode node in nodes)
- {
- if (node.NodeType == System.Xml.XmlNodeType.Text)
- {
- desc += node.ToString();
- }
- else
- {
- string s = node.ToString();
- int i = s.LastIndexOf('.');
- int j = s.LastIndexOf('"');
-
- if ((i != -1 || j != -1) && j - i - 1 > 0)
- {
- try
- {
- desc += s.Substring(i + 1, j - i - 1);
- }
- catch { }
- }
- }
- }
- }
- }
- return desc;
- }
-
- ///
- /// Provide a place to add custom attributes without creating a AttributeTableBuilder subclass.
- ///
- /// The assembly attribute table builder.
- protected virtual void AddAttributes(AttributeTableBuilder builder)
- {
- }
- }
-}
\ No newline at end of file
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.DataGrid.Design/Common/PlatformTypes.cs b/Microsoft.Toolkit.Uwp.UI.Controls.DataGrid.Design/Common/PlatformTypes.cs
deleted file mode 100644
index 46b93f3f374..00000000000
--- a/Microsoft.Toolkit.Uwp.UI.Controls.DataGrid.Design/Common/PlatformTypes.cs
+++ /dev/null
@@ -1,49 +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.Windows.Design.Metadata;
-using Windows.UI.Xaml;
-
-namespace Microsoft.Toolkit.Uwp.Design.Types
-{
- internal class PlatformTypes
- {
- public static readonly Type DependencyObjectType = typeof(DependencyObject);
- public static readonly Type UIElementType = typeof(UIElement);
- public static readonly Type FrameworkElementType = typeof(FrameworkElement);
- public static readonly Type EditorBrowsableAttributeType = typeof(System.ComponentModel.EditorBrowsableAttribute);
-
- ///
- /// Used by MetadataRegistrationBase to get the browsable state
- ///
- /// This parameter must be of type 'System.ComponentModel.EditorBrowsableAttribute'
- ///
- public static bool IsBrowsable(object editorBrowsableAttribute)
- {
- if (editorBrowsableAttribute is System.ComponentModel.EditorBrowsableAttribute)
- return (editorBrowsableAttribute as System.ComponentModel.EditorBrowsableAttribute).State !=
- System.ComponentModel.EditorBrowsableState.Never;
- return true;
- }
-
- public static class Control
- {
- public static readonly TypeIdentifier TypeId = new TypeIdentifier("http://schemas.microsoft.com/winfx/2006/xaml/presentation", "Control");
- public static readonly PropertyIdentifier BackgroundProperty = new PropertyIdentifier(TypeId, "Background");
- public static readonly PropertyIdentifier BorderBrushProperty = new PropertyIdentifier(TypeId, "BorderBrush");
- public static readonly PropertyIdentifier BorderThicknessProperty = new PropertyIdentifier(TypeId, "BorderThickness");
- }
-
- public static class FrameworkElement
- {
- public static readonly TypeIdentifier TypeId = new TypeIdentifier("http://schemas.microsoft.com/winfx/2006/xaml/presentation", "FrameworkElement");
- public static readonly PropertyIdentifier MarginProperty = new PropertyIdentifier(TypeId, "Margin");
- public static readonly PropertyIdentifier HorizontalAlignmentProperty = new PropertyIdentifier(TypeId, "HorizontalAlignment");
- public static readonly PropertyIdentifier VerticalAlignmentProperty = new PropertyIdentifier(TypeId, "VerticalAlignment");
- public static readonly PropertyIdentifier HeightProperty = new PropertyIdentifier(TypeId, "Height");
- public static readonly PropertyIdentifier WidthProperty = new PropertyIdentifier(TypeId, "Width");
- }
- }
-}
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.DataGrid.Design/Common/ToolboxCategoryPaths.cs b/Microsoft.Toolkit.Uwp.UI.Controls.DataGrid.Design/Common/ToolboxCategoryPaths.cs
deleted file mode 100644
index acdacdd4c55..00000000000
--- a/Microsoft.Toolkit.Uwp.UI.Controls.DataGrid.Design/Common/ToolboxCategoryPaths.cs
+++ /dev/null
@@ -1,23 +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 System.Diagnostics.CodeAnalysis;
-using System.Linq.Expressions;
-
-[assembly: SuppressMessage("General", "SWC1001:XmlDocumentationCommentShouldBeSpelledCorrectly", MessageId = "Theming", Justification = "Correct spelling")]
-
-namespace Microsoft.Toolkit.Uwp.UI.Controls.Design.Common
-{
- ///
- /// Names for ToolboxCategoryAttribute.
- ///
- internal static class ToolboxCategoryPaths
- {
- ///
- /// Basic Controls category.
- ///
- public const string Toolkit = "Windows Community Toolkit";
- }
-}
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.DataGrid.Design/Controls/DataGrid.Metadata.cs b/Microsoft.Toolkit.Uwp.UI.Controls.DataGrid.Design/Controls/DataGrid.Metadata.cs
new file mode 100644
index 00000000000..1ff9ad74304
--- /dev/null
+++ b/Microsoft.Toolkit.Uwp.UI.Controls.DataGrid.Design/Controls/DataGrid.Metadata.cs
@@ -0,0 +1,120 @@
+// 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.ComponentModel;
+using Microsoft.Toolkit.Uwp.UI.Controls.Design.Properties;
+
+using Microsoft.VisualStudio.DesignTools.Extensibility;
+using Microsoft.VisualStudio.DesignTools.Extensibility.Features;
+using Microsoft.VisualStudio.DesignTools.Extensibility.Metadata;
+using Microsoft.VisualStudio.DesignTools.Extensibility.Model;
+
+namespace Microsoft.Toolkit.Uwp.UI.Controls.Design
+{
+ internal class DataGridDefaults : DefaultInitializer
+ {
+ public override void InitializeDefaults(ModelItem item)
+ {
+ item.Properties[nameof(DataGrid.Height)].SetValue(50d);
+ item.Properties[nameof(DataGrid.Width)].SetValue(100d);
+ }
+ }
+
+ internal class DataGridMetadata : AttributeTableBuilder
+ {
+ public DataGridMetadata() : base()
+ {
+ AddCallback(ControlTypes.DataGrid,
+ b =>
+ {
+ b.AddCustomAttributes(new FeatureAttribute(typeof(DataGridDefaults)));
+ b.AddCustomAttributes(nameof(DataGrid.AlternatingRowBackground), new CategoryAttribute(Resources.CategoryRows));
+ b.AddCustomAttributes(nameof(DataGrid.AreRowDetailsFrozen), new CategoryAttribute(Resources.CategoryRows));
+ b.AddCustomAttributes(nameof(DataGrid.AreRowGroupHeadersFrozen), new CategoryAttribute(Resources.CategoryHeaders));
+ b.AddCustomAttributes(nameof(DataGrid.AutoGenerateColumns), new CategoryAttribute(Resources.CategoryColumns));
+ b.AddCustomAttributes(nameof(DataGrid.CanUserReorderColumns), new CategoryAttribute(Resources.CategoryColumns));
+ b.AddCustomAttributes(nameof(DataGrid.CanUserResizeColumns), new CategoryAttribute(Resources.CategoryColumns));
+ b.AddCustomAttributes(nameof(DataGrid.CanUserSortColumns), new CategoryAttribute(Resources.CategoryColumns));
+ b.AddCustomAttributes(nameof(DataGrid.CellStyle), new CategoryAttribute(Resources.CategoryColumns));
+ b.AddCustomAttributes(nameof(DataGrid.ClipboardCopyMode), new CategoryAttribute(Resources.CategoryText));
+ b.AddCustomAttributes(nameof(DataGrid.ColumnHeaderHeight), new CategoryAttribute(Resources.CategoryHeaders));
+ b.AddCustomAttributes(nameof(DataGrid.ColumnHeaderStyle), new CategoryAttribute(Resources.CategoryHeaders));
+ b.AddCustomAttributes(nameof(DataGrid.Columns), new CategoryAttribute(Resources.CategoryColumns));
+ b.AddCustomAttributes(nameof(DataGrid.ColumnWidth), new CategoryAttribute(Resources.CategoryColumns));
+ b.AddCustomAttributes(nameof(DataGrid.CurrentColumn), new CategoryAttribute(Resources.CategoryText));
+ b.AddCustomAttributes(nameof(DataGrid.DragIndicatorStyle), new CategoryAttribute(Resources.CategoryText));
+ b.AddCustomAttributes(nameof(DataGrid.DropLocationIndicatorStyle), new CategoryAttribute(Resources.CategoryText));
+ b.AddCustomAttributes(nameof(DataGrid.FrozenColumnCount), new CategoryAttribute(Resources.CategoryColumns));
+ b.AddCustomAttributes(nameof(DataGrid.GridLinesVisibility), new CategoryAttribute(Resources.CategoryGridLines));
+ b.AddCustomAttributes(nameof(DataGrid.HeadersVisibility), new CategoryAttribute(Resources.CategoryHeaders));
+ b.AddCustomAttributes(nameof(DataGrid.HorizontalGridLinesBrush), new CategoryAttribute(Resources.CategoryGridLines));
+ b.AddCustomAttributes(nameof(DataGrid.HorizontalScrollBarVisibility), new CategoryAttribute(Resources.CategoryLayout));
+ b.AddCustomAttributes(nameof(DataGrid.IsReadOnly), new CategoryAttribute(Resources.CategoryText));
+ b.AddCustomAttributes(nameof(DataGrid.IsValid), new CategoryAttribute(Resources.CategoryText));
+ b.AddCustomAttributes(nameof(DataGrid.ItemsSource), new CategoryAttribute(Resources.CategoryColumns));
+ b.AddCustomAttributes(nameof(DataGrid.MaxColumnWidth), new CategoryAttribute(Resources.CategoryColumns));
+ b.AddCustomAttributes(nameof(DataGrid.MinColumnWidth), new CategoryAttribute(Resources.CategoryColumns));
+ b.AddCustomAttributes(nameof(DataGrid.RowBackground), new CategoryAttribute(Resources.CategoryRows));
+ b.AddCustomAttributes(nameof(DataGrid.RowDetailsTemplate), new CategoryAttribute(Resources.CategoryRows));
+ b.AddCustomAttributes(nameof(DataGrid.RowDetailsVisibilityMode), new CategoryAttribute(Resources.CategoryRows));
+ b.AddCustomAttributes(nameof(DataGrid.RowGroupHeaderPropertyNameAlternative), new CategoryAttribute(Resources.CategoryHeaders));
+ b.AddCustomAttributes(nameof(DataGrid.RowGroupHeaderStyles), new CategoryAttribute(Resources.CategoryHeaders));
+ b.AddCustomAttributes(nameof(DataGrid.RowHeaderStyle), new CategoryAttribute(Resources.CategoryHeaders));
+ b.AddCustomAttributes(nameof(DataGrid.RowHeaderWidth), new CategoryAttribute(Resources.CategoryHeaders));
+ b.AddCustomAttributes(nameof(DataGrid.RowHeight), new CategoryAttribute(Resources.CategoryRows));
+ b.AddCustomAttributes(nameof(DataGrid.RowStyle), new CategoryAttribute(Resources.CategoryRows));
+ b.AddCustomAttributes(nameof(DataGrid.SelectedIndex), new CategoryAttribute(Resources.CategoryCommon));
+ b.AddCustomAttributes(nameof(DataGrid.SelectedItem), new CategoryAttribute(Resources.CategoryCommon));
+ b.AddCustomAttributes(nameof(DataGrid.SelectedItems), new CategoryAttribute(Resources.CategoryAppearance));
+ b.AddCustomAttributes(nameof(DataGrid.SelectionMode), new CategoryAttribute(Resources.CategoryRows));
+ b.AddCustomAttributes(nameof(DataGrid.VerticalGridLinesBrush), new CategoryAttribute(Resources.CategoryGridLines));
+ b.AddCustomAttributes(nameof(DataGrid.VerticalScrollBarVisibility), new CategoryAttribute(Resources.CategoryLayout));
+ b.AddCustomAttributes(new ToolboxCategoryAttribute(ToolboxCategoryPaths.Toolkit, false));
+ });
+
+ AddCallback(ControlTypes.DataGridColumn,
+ b =>
+ {
+ b.AddCustomAttributes(nameof(DataGridColumn.CanUserResize), new CategoryAttribute(Resources.CategoryLayout));
+ b.AddCustomAttributes(nameof(DataGridColumn.CanUserSort), new CategoryAttribute(Resources.CategorySort));
+ b.AddCustomAttributes(nameof(DataGridColumn.Header), new CategoryAttribute(Resources.CategoryHeader));
+ b.AddCustomAttributes(nameof(DataGridColumn.HeaderStyle), new CategoryAttribute(Resources.CategoryHeader));
+ b.AddCustomAttributes(nameof(DataGridColumn.MaxWidth), new CategoryAttribute(Resources.CategoryLayout));
+ b.AddCustomAttributes(nameof(DataGridColumn.MinWidth), new CategoryAttribute(Resources.CategoryLayout));
+ b.AddCustomAttributes(nameof(DataGridColumn.SortDirection), new CategoryAttribute(Resources.CategorySort));
+ b.AddCustomAttributes(nameof(DataGridColumn.Visibility), new CategoryAttribute(Resources.CategoryAppearance));
+ b.AddCustomAttributes(nameof(DataGridColumn.Width), new CategoryAttribute(Resources.CategoryLayout));
+ });
+
+ AddCallback(ControlTypes.DataGridBoundColumn,
+ b =>
+ {
+ b.AddCustomAttributes(nameof(DataGridBoundColumn.Binding), new CategoryAttribute(Resources.CategoryCellBinding));
+ });
+
+ AddCallback(ControlTypes.DataGridTextColumn,
+ b =>
+ {
+ b.AddCustomAttributes(nameof(DataGridTextColumn.FontFamily), new CategoryAttribute(Resources.CategoryText));
+ b.AddCustomAttributes(nameof(DataGridTextColumn.FontSize), new CategoryAttribute(Resources.CategoryText));
+ b.AddCustomAttributes(nameof(DataGridTextColumn.FontStyle), new CategoryAttribute(Resources.CategoryText));
+ b.AddCustomAttributes(nameof(DataGridTextColumn.FontWeight), new CategoryAttribute(Resources.CategoryText));
+ b.AddCustomAttributes(nameof(DataGridTextColumn.Foreground), new CategoryAttribute(Resources.CategoryText));
+ });
+
+ AddCallback(ControlTypes.DataGridCheckBoxColumn,
+ b =>
+ {
+ b.AddCustomAttributes(nameof(DataGridCheckBoxColumn.IsThreeState), new CategoryAttribute(Resources.CategoryCommon));
+ });
+
+ AddCallback(ControlTypes.DataGridTemplateColumn,
+ b =>
+ {
+ b.AddCustomAttributes(nameof(DataGridTemplateColumn.CellEditingTemplate), new CategoryAttribute(Resources.CategoryCellTemplate));
+ b.AddCustomAttributes(nameof(DataGridTemplateColumn.CellTemplate), new CategoryAttribute(Resources.CategoryCellTemplate));
+ });
+ }
+ }
+}
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.DataGrid.Design/Controls/DataGrid.Typedata.cs b/Microsoft.Toolkit.Uwp.UI.Controls.DataGrid.Design/Controls/DataGrid.Typedata.cs
new file mode 100644
index 00000000000..71a73c1d9f5
--- /dev/null
+++ b/Microsoft.Toolkit.Uwp.UI.Controls.DataGrid.Design/Controls/DataGrid.Typedata.cs
@@ -0,0 +1,103 @@
+// 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;
+
+namespace Microsoft.Toolkit.Uwp.UI.Controls.Design
+{
+ internal static partial class ControlTypes
+ {
+ internal const string DataGrid = RootNamespace + "." + nameof(DataGrid);
+ internal const string DataGridColumn = RootNamespace + "." + nameof(DataGridColumn);
+ internal const string DataGridBoundColumn = RootNamespace + "." + nameof(DataGridBoundColumn);
+ internal const string DataGridTextColumn = RootNamespace + "." + nameof(DataGridTextColumn);
+ internal const string DataGridCheckBoxColumn = RootNamespace + "." + nameof(DataGridCheckBoxColumn);
+ internal const string DataGridTemplateColumn = RootNamespace + "." + nameof(DataGridTemplateColumn);
+ }
+
+ internal static class DataGrid
+ {
+ internal const string AlternatingRowBackground = nameof(AlternatingRowBackground);
+ internal const string AreRowDetailsFrozen = nameof(AreRowDetailsFrozen);
+ internal const string AreRowGroupHeadersFrozen = nameof(AreRowGroupHeadersFrozen);
+ internal const string AutoGenerateColumns = nameof(AutoGenerateColumns);
+ internal const string CanUserReorderColumns = nameof(CanUserReorderColumns);
+ internal const string CanUserResizeColumns = nameof(CanUserResizeColumns);
+ internal const string CanUserSortColumns = nameof(CanUserSortColumns);
+ internal const string CellStyle = nameof(CellStyle);
+ internal const string ClipboardCopyMode = nameof(ClipboardCopyMode);
+ internal const string ColumnHeaderHeight = nameof(ColumnHeaderHeight);
+ internal const string ColumnHeaderStyle = nameof(ColumnHeaderStyle);
+ internal const string Columns = nameof(Columns);
+ internal const string ColumnWidth = nameof(ColumnWidth);
+ internal const string CurrentColumn = nameof(CurrentColumn);
+ internal const string DragIndicatorStyle = nameof(DragIndicatorStyle);
+ internal const string DropLocationIndicatorStyle = nameof(DropLocationIndicatorStyle);
+ internal const string FrozenColumnCount = nameof(FrozenColumnCount);
+ internal const string GridLinesVisibility = nameof(GridLinesVisibility);
+ internal const string HeadersVisibility = nameof(HeadersVisibility);
+ internal const string Height = nameof(Height);
+ internal const string HorizontalGridLinesBrush = nameof(HorizontalGridLinesBrush);
+ internal const string HorizontalScrollBarVisibility = nameof(HorizontalScrollBarVisibility);
+ internal const string IsReadOnly = nameof(IsReadOnly);
+ internal const string IsValid = nameof(IsValid);
+ internal const string ItemsSource = nameof(ItemsSource);
+ internal const string MaxColumnWidth = nameof(MaxColumnWidth);
+ internal const string MinColumnWidth = nameof(MinColumnWidth);
+ internal const string RowBackground = nameof(RowBackground);
+ internal const string RowDetailsTemplate = nameof(RowDetailsTemplate);
+ internal const string RowDetailsVisibilityMode = nameof(RowDetailsVisibilityMode);
+ internal const string RowGroupHeaderPropertyNameAlternative = nameof(RowGroupHeaderPropertyNameAlternative);
+ internal const string RowGroupHeaderStyles = nameof(RowGroupHeaderStyles);
+ internal const string RowHeaderStyle = nameof(RowHeaderStyle);
+ internal const string RowHeaderWidth = nameof(RowHeaderWidth);
+ internal const string RowHeight = nameof(RowHeight);
+ internal const string RowStyle = nameof(RowStyle);
+ internal const string SelectedIndex = nameof(SelectedIndex);
+ internal const string SelectedItem = nameof(SelectedItem);
+ internal const string SelectedItems = nameof(SelectedItems);
+ internal const string SelectionMode = nameof(SelectionMode);
+ internal const string VerticalGridLinesBrush = nameof(VerticalGridLinesBrush);
+ internal const string VerticalScrollBarVisibility = nameof(VerticalScrollBarVisibility);
+ internal const string Width = nameof(Width);
+ }
+
+ internal static class DataGridColumn
+ {
+ internal const string CanUserResize = nameof(CanUserResize);
+ internal const string CanUserSort = nameof(CanUserSort);
+ internal const string Header = nameof(Header);
+ internal const string HeaderStyle = nameof(HeaderStyle);
+ internal const string MaxWidth = nameof(MaxWidth);
+ internal const string MinWidth = nameof(MinWidth);
+ internal const string SortDirection = nameof(SortDirection);
+ internal const string Visibility = nameof(Visibility);
+ internal const string Width = nameof(Width);
+ }
+
+ internal static class DataGridBoundColumn
+ {
+ internal const string Binding = nameof(Binding);
+ }
+
+ internal static class DataGridTextColumn
+ {
+ internal const string FontFamily = nameof(FontFamily);
+ internal const string FontSize = nameof(FontSize);
+ internal const string FontStyle = nameof(FontStyle);
+ internal const string FontWeight = nameof(FontWeight);
+ internal const string Foreground = nameof(Foreground);
+ }
+
+ internal static class DataGridCheckBoxColumn
+ {
+ internal const string IsThreeState = nameof(IsThreeState);
+ }
+
+ internal static class DataGridTemplateColumn
+ {
+ internal const string CellEditingTemplate = nameof(CellEditingTemplate);
+ internal const string CellTemplate = nameof(CellTemplate);
+ }
+}
\ No newline at end of file
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.DataGrid.Design/DataGridMetadata.cs b/Microsoft.Toolkit.Uwp.UI.Controls.DataGrid.Design/DataGridMetadata.cs
deleted file mode 100644
index 3d485c6a133..00000000000
--- a/Microsoft.Toolkit.Uwp.UI.Controls.DataGrid.Design/DataGridMetadata.cs
+++ /dev/null
@@ -1,118 +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.UI.Controls.Design.Common;
-using Microsoft.Windows.Design;
-//using Microsoft.Windows.Design.Features;
-using Microsoft.Windows.Design.Metadata;
-//using Microsoft.Windows.Design.Model;
-using System.ComponentModel;
-
-namespace Microsoft.Toolkit.Uwp.UI.Controls.Design
-{
- //internal class DataGridDefaults : DefaultInitializer
- //{
- // public override void InitializeDefaults(ModelItem item)
- // {
- // item.Properties[nameof(DataGrid.MyProperty)].SetValue();
- // }
- //}
-
- internal class DataGridMetadata : AttributeTableBuilder
- {
- public DataGridMetadata() : base()
- {
- AddCallback(typeof(DataGrid),
- b =>
- {
- //b.AddCustomAttributes(new FeatureAttribute(typeof(DataGridDefaults)));
- b.AddCustomAttributes(nameof(DataGrid.AlternatingRowBackground), new CategoryAttribute(Properties.Resources.CategoryRows));
- b.AddCustomAttributes(nameof(DataGrid.AreRowDetailsFrozen), new CategoryAttribute(Properties.Resources.CategoryRows));
- b.AddCustomAttributes(nameof(DataGrid.AreRowGroupHeadersFrozen), new CategoryAttribute(Properties.Resources.CategoryHeaders));
- b.AddCustomAttributes(nameof(DataGrid.AutoGenerateColumns), new CategoryAttribute(Properties.Resources.CategoryColumns));
- b.AddCustomAttributes(nameof(DataGrid.CanUserReorderColumns), new CategoryAttribute(Properties.Resources.CategoryColumns));
- b.AddCustomAttributes(nameof(DataGrid.CanUserResizeColumns), new CategoryAttribute(Properties.Resources.CategoryColumns));
- b.AddCustomAttributes(nameof(DataGrid.CanUserSortColumns), new CategoryAttribute(Properties.Resources.CategoryColumns));
- b.AddCustomAttributes(nameof(DataGrid.CellStyle), new CategoryAttribute(Properties.Resources.CategoryColumns));
- b.AddCustomAttributes(nameof(DataGrid.ClipboardCopyMode), new CategoryAttribute(Properties.Resources.CategoryText));
- b.AddCustomAttributes(nameof(DataGrid.ColumnHeaderHeight), new CategoryAttribute(Properties.Resources.CategoryHeaders));
- b.AddCustomAttributes(nameof(DataGrid.ColumnHeaderStyle), new CategoryAttribute(Properties.Resources.CategoryHeaders));
- b.AddCustomAttributes(nameof(DataGrid.Columns), new CategoryAttribute(Properties.Resources.CategoryColumns));
- b.AddCustomAttributes(nameof(DataGrid.ColumnWidth), new CategoryAttribute(Properties.Resources.CategoryColumns));
- b.AddCustomAttributes(nameof(DataGrid.CurrentColumn), new CategoryAttribute(Properties.Resources.CategoryText));
- b.AddCustomAttributes(nameof(DataGrid.DragIndicatorStyle), new CategoryAttribute(Properties.Resources.CategoryText));
- b.AddCustomAttributes(nameof(DataGrid.DropLocationIndicatorStyle), new CategoryAttribute(Properties.Resources.CategoryText));
- b.AddCustomAttributes(nameof(DataGrid.FrozenColumnCount), new CategoryAttribute(Properties.Resources.CategoryColumns));
- b.AddCustomAttributes(nameof(DataGrid.GridLinesVisibility), new CategoryAttribute(Properties.Resources.CategoryGridLines));
- b.AddCustomAttributes(nameof(DataGrid.HeadersVisibility), new CategoryAttribute(Properties.Resources.CategoryHeaders));
- b.AddCustomAttributes(nameof(DataGrid.HorizontalGridLinesBrush), new CategoryAttribute(Properties.Resources.CategoryGridLines));
- b.AddCustomAttributes(nameof(DataGrid.HorizontalScrollBarVisibility), new CategoryAttribute(Properties.Resources.CategoryLayout));
- b.AddCustomAttributes(nameof(DataGrid.IsReadOnly), new CategoryAttribute(Properties.Resources.CategoryText));
- b.AddCustomAttributes(nameof(DataGrid.IsValid), new CategoryAttribute(Properties.Resources.CategoryText));
- b.AddCustomAttributes(nameof(DataGrid.ItemsSource), new CategoryAttribute(Properties.Resources.CategoryColumns));
- b.AddCustomAttributes(nameof(DataGrid.MaxColumnWidth), new CategoryAttribute(Properties.Resources.CategoryColumns));
- b.AddCustomAttributes(nameof(DataGrid.MinColumnWidth), new CategoryAttribute(Properties.Resources.CategoryColumns));
- b.AddCustomAttributes(nameof(DataGrid.RowBackground), new CategoryAttribute(Properties.Resources.CategoryRows));
- b.AddCustomAttributes(nameof(DataGrid.RowDetailsTemplate), new CategoryAttribute(Properties.Resources.CategoryRows));
- b.AddCustomAttributes(nameof(DataGrid.RowDetailsVisibilityMode), new CategoryAttribute(Properties.Resources.CategoryRows));
- b.AddCustomAttributes(nameof(DataGrid.RowGroupHeaderPropertyNameAlternative), new CategoryAttribute(Properties.Resources.CategoryHeaders));
- b.AddCustomAttributes(nameof(DataGrid.RowGroupHeaderStyles), new CategoryAttribute(Properties.Resources.CategoryHeaders));
- b.AddCustomAttributes(nameof(DataGrid.RowHeaderStyle), new CategoryAttribute(Properties.Resources.CategoryHeaders));
- b.AddCustomAttributes(nameof(DataGrid.RowHeaderWidth), new CategoryAttribute(Properties.Resources.CategoryHeaders));
- b.AddCustomAttributes(nameof(DataGrid.RowHeight), new CategoryAttribute(Properties.Resources.CategoryRows));
- b.AddCustomAttributes(nameof(DataGrid.RowStyle), new CategoryAttribute(Properties.Resources.CategoryRows));
- b.AddCustomAttributes(nameof(DataGrid.SelectedIndex), new CategoryAttribute(Properties.Resources.CategoryCommon));
- b.AddCustomAttributes(nameof(DataGrid.SelectedItem), new CategoryAttribute(Properties.Resources.CategoryCommon));
- b.AddCustomAttributes(nameof(DataGrid.SelectedItems), new CategoryAttribute(Properties.Resources.CategoryAppearance));
- b.AddCustomAttributes(nameof(DataGrid.SelectionMode), new CategoryAttribute(Properties.Resources.CategoryRows));
- b.AddCustomAttributes(nameof(DataGrid.VerticalGridLinesBrush), new CategoryAttribute(Properties.Resources.CategoryGridLines));
- b.AddCustomAttributes(nameof(DataGrid.VerticalScrollBarVisibility), new CategoryAttribute(Properties.Resources.CategoryLayout));
- b.AddCustomAttributes(new ToolboxCategoryAttribute(ToolboxCategoryPaths.Toolkit, false));
- });
-
- AddCallback(typeof(DataGridColumn),
- b =>
- {
- b.AddCustomAttributes(nameof(DataGridColumn.CanUserResize), new CategoryAttribute(Properties.Resources.CategoryLayout));
- b.AddCustomAttributes(nameof(DataGridColumn.CanUserSort), new CategoryAttribute(Properties.Resources.CategorySort));
- b.AddCustomAttributes(nameof(DataGridColumn.Header), new CategoryAttribute(Properties.Resources.CategoryHeader));
- b.AddCustomAttributes(nameof(DataGridColumn.HeaderStyle), new CategoryAttribute(Properties.Resources.CategoryHeader));
- b.AddCustomAttributes(nameof(DataGridColumn.MaxWidth), new CategoryAttribute(Properties.Resources.CategoryLayout));
- b.AddCustomAttributes(nameof(DataGridColumn.MinWidth), new CategoryAttribute(Properties.Resources.CategoryLayout));
- b.AddCustomAttributes(nameof(DataGridColumn.SortDirection), new CategoryAttribute(Properties.Resources.CategorySort));
- b.AddCustomAttributes(nameof(DataGridColumn.Visibility), new CategoryAttribute(Properties.Resources.CategoryAppearance));
- b.AddCustomAttributes(nameof(DataGridColumn.Width), new CategoryAttribute(Properties.Resources.CategoryLayout));
- });
-
- AddCallback(typeof(DataGridBoundColumn),
- b =>
- {
- b.AddCustomAttributes(nameof(DataGridBoundColumn.Binding), new CategoryAttribute(Properties.Resources.CategoryCellBinding));
- });
-
- AddCallback(typeof(DataGridTextColumn),
- b =>
- {
- b.AddCustomAttributes(nameof(DataGridTextColumn.FontFamily), new CategoryAttribute(Properties.Resources.CategoryText));
- b.AddCustomAttributes(nameof(DataGridTextColumn.FontSize), new CategoryAttribute(Properties.Resources.CategoryText));
- b.AddCustomAttributes(nameof(DataGridTextColumn.FontStyle), new CategoryAttribute(Properties.Resources.CategoryText));
- b.AddCustomAttributes(nameof(DataGridTextColumn.FontWeight), new CategoryAttribute(Properties.Resources.CategoryText));
- b.AddCustomAttributes(nameof(DataGridTextColumn.Foreground), new CategoryAttribute(Properties.Resources.CategoryText));
- });
-
- AddCallback(typeof(DataGridCheckBoxColumn),
- b =>
- {
- b.AddCustomAttributes(nameof(DataGridCheckBoxColumn.IsThreeState), new CategoryAttribute(Properties.Resources.CategoryCommon));
- });
-
- AddCallback(typeof(DataGridTemplateColumn),
- b =>
- {
- b.AddCustomAttributes(nameof(DataGridTemplateColumn.CellEditingTemplate), new CategoryAttribute(Properties.Resources.CategoryCellTemplate));
- b.AddCustomAttributes(nameof(DataGridTemplateColumn.CellTemplate), new CategoryAttribute(Properties.Resources.CategoryCellTemplate));
- });
- }
- }
-}
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.DataGrid.Design/MetadataRegistration.cs b/Microsoft.Toolkit.Uwp.UI.Controls.DataGrid.Design/MetadataRegistration.cs
deleted file mode 100644
index 7be8ff15da6..00000000000
--- a/Microsoft.Toolkit.Uwp.UI.Controls.DataGrid.Design/MetadataRegistration.cs
+++ /dev/null
@@ -1,46 +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 System.Reflection;
-using Microsoft.Windows.Design.Metadata;
-using Microsoft.Toolkit.Uwp.Design.Common;
-
-[assembly: ProvideMetadata(typeof(Microsoft.Toolkit.Uwp.UI.Controls.Design.MetadataRegistration))]
-
-namespace Microsoft.Toolkit.Uwp.UI.Controls.Design
-{
- public class MetadataRegistration : MetadataRegistrationBase, IProvideAttributeTable
- {
- public MetadataRegistration() : base()
- {
- // Note:
- // The default constructor sets value of AssemblyFullName and
- // XmlResourceName used by MetadataRegistrationBase.AddDescriptions().
- // The convention here is that the in .design.csproj
- // (or Default namespace in Project -> Properties -> Application tab)
- // must be the same as runtime assembly's main namespace (t.Namespace)
- // plus .Design.
- Type t = typeof(Microsoft.Toolkit.Uwp.UI.Controls.DataGrid);
- AssemblyName an = t.Assembly.GetName();
- AssemblyFullName = ", " + an.FullName;
- XmlResourceName = t.Namespace + ".Design." + an.Name + ".xml";
- }
-
- #region IProvideAttributeTable Members
-
- ///
- /// Gets the AttributeTable for design time metadata.
- ///
- public AttributeTable AttributeTable
- {
- get
- {
- return BuildAttributeTable();
- }
- }
-
- #endregion
- }
-}
\ No newline at end of file
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.DataGrid.Design/Microsoft.Toolkit.Uwp.UI.Controls.DataGrid.Design.csproj b/Microsoft.Toolkit.Uwp.UI.Controls.DataGrid.Design/Microsoft.Toolkit.Uwp.UI.Controls.DataGrid.DesignTools.csproj
similarity index 75%
rename from Microsoft.Toolkit.Uwp.UI.Controls.DataGrid.Design/Microsoft.Toolkit.Uwp.UI.Controls.DataGrid.Design.csproj
rename to Microsoft.Toolkit.Uwp.UI.Controls.DataGrid.Design/Microsoft.Toolkit.Uwp.UI.Controls.DataGrid.DesignTools.csproj
index 77f8ff582ca..379b99d06a8 100644
--- a/Microsoft.Toolkit.Uwp.UI.Controls.DataGrid.Design/Microsoft.Toolkit.Uwp.UI.Controls.DataGrid.Design.csproj
+++ b/Microsoft.Toolkit.Uwp.UI.Controls.DataGrid.Design/Microsoft.Toolkit.Uwp.UI.Controls.DataGrid.DesignTools.csproj
@@ -8,21 +8,18 @@
LibraryPropertiesMicrosoft.Toolkit.Uwp.UI.Controls.Design
- Microsoft.Toolkit.Uwp.UI.Controls.DataGrid.Design
- v4.7.2
+ Microsoft.Toolkit.Uwp.UI.Controls.DataGrid.DesignTools512
-
- $(AssetTargetFallback);uap10.0.17763
-
- 8.1
+ v4.7.2
+ falsetrue..\Microsoft.Toolkit.Uwp.UI.Controls.DataGrid\bin\Debug\uap10.0.17763\Design\fullfalse
- DEBUG;TRACE
+ TRACE;DEBUGx86
@@ -33,18 +30,18 @@
TRACE
- false
+ $(AssetTargetFallback);uap10.0.17763
-
+ FalseFalse
-
+ FalseFalse
@@ -62,12 +59,6 @@
-
- {daeb9cec-c817-33b2-74b2-bc379380db72}
- Microsoft.Toolkit.Uwp.UI.Controls.DataGrid
- False
- true
-
@@ -84,9 +75,12 @@
-
-
-
+
+
+
+
+
+ Code
@@ -95,31 +89,19 @@
TrueResources.resx
-
- True
- Settings.settings
- True
-
-
- ResXFileCodeGeneratorResources.Designer.cs
-
- SettingsSingleFileGenerator
- Settings.Designer.cs
-
Microsoft.Toolkit.Uwp.UI.Controls.DataGrid.xml
- Designer
+ False
-
-
-
+
+
\ No newline at end of file
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.DataGrid.Design/Properties/AssemblyInfo.cs b/Microsoft.Toolkit.Uwp.UI.Controls.DataGrid.Design/Properties/AssemblyInfo.cs
index 1a907af922c..a9b6d64a3bd 100644
--- a/Microsoft.Toolkit.Uwp.UI.Controls.DataGrid.Design/Properties/AssemblyInfo.cs
+++ b/Microsoft.Toolkit.Uwp.UI.Controls.DataGrid.Design/Properties/AssemblyInfo.cs
@@ -3,12 +3,9 @@
// See the LICENSE file in the project root for more information.
using System.Reflection;
-using System.Resources;
-using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
-using System.Windows;
-// General Information about an assembly is controlled through the following
+// 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: AssemblyTitle("Windows Community Toolkit Controls DataGrid (Design)")]
@@ -20,12 +17,12 @@
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
-//In order to begin building localizable applications, set
+//In order to begin building localizable applications, set
//CultureYouAreCodingWith in your .csproj file
//inside a . For example, if you are using US English
//in your source files, set the to en-US. Then uncomment
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.DataGrid.Design/Properties/Settings.Designer.cs b/Microsoft.Toolkit.Uwp.UI.Controls.DataGrid.Design/Properties/Settings.Designer.cs
deleted file mode 100644
index 662fe0ad430..00000000000
--- a/Microsoft.Toolkit.Uwp.UI.Controls.DataGrid.Design/Properties/Settings.Designer.cs
+++ /dev/null
@@ -1,26 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-// Runtime Version:4.0.30319.42000
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-namespace Microsoft.Toolkit.Uwp.UI.Controls.Design.Properties {
-
-
- [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.3.0.0")]
- internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
-
- private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
-
- public static Settings Default {
- get {
- return defaultInstance;
- }
- }
- }
-}
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.DataGrid.Design/Properties/Settings.settings b/Microsoft.Toolkit.Uwp.UI.Controls.DataGrid.Design/Properties/Settings.settings
deleted file mode 100644
index 033d7a5e9e2..00000000000
--- a/Microsoft.Toolkit.Uwp.UI.Controls.DataGrid.Design/Properties/Settings.settings
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.DataGrid/Microsoft.Toolkit.Uwp.UI.Controls.DataGrid.csproj b/Microsoft.Toolkit.Uwp.UI.Controls.DataGrid/Microsoft.Toolkit.Uwp.UI.Controls.DataGrid.csproj
index fb417ede285..6d63e41a3d6 100644
--- a/Microsoft.Toolkit.Uwp.UI.Controls.DataGrid/Microsoft.Toolkit.Uwp.UI.Controls.DataGrid.csproj
+++ b/Microsoft.Toolkit.Uwp.UI.Controls.DataGrid/Microsoft.Toolkit.Uwp.UI.Controls.DataGrid.csproj
@@ -4,7 +4,7 @@
Windows Community Toolkit Controls DataGrid
This library provides a XAML DataGrid control. It is part of the Windows Community Toolkit.
-
+
UWP Toolkit Windows Controls XAML DataGridMicrosoft.Toolkit.Uwp.UI.Controls
@@ -14,7 +14,7 @@
-
+
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.Markdown.Design/Common/ToolboxCategoryPaths.cs b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Common/Constants.cs
similarity index 73%
rename from Microsoft.Toolkit.Uwp.UI.Controls.Markdown.Design/Common/ToolboxCategoryPaths.cs
rename to Microsoft.Toolkit.Uwp.UI.Controls.Design/Common/Constants.cs
index acdacdd4c55..8236858858c 100644
--- a/Microsoft.Toolkit.Uwp.UI.Controls.Markdown.Design/Common/ToolboxCategoryPaths.cs
+++ b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Common/Constants.cs
@@ -4,12 +4,17 @@
using System;
using System.Diagnostics.CodeAnalysis;
-using System.Linq.Expressions;
[assembly: SuppressMessage("General", "SWC1001:XmlDocumentationCommentShouldBeSpelledCorrectly", MessageId = "Theming", Justification = "Correct spelling")]
-namespace Microsoft.Toolkit.Uwp.UI.Controls.Design.Common
+namespace Microsoft.Toolkit.Uwp.UI.Controls.Design
{
+ internal static partial class ControlTypes
+ {
+ // HACK: Don't forget to update, if the namespace changes.
+ public const string RootNamespace = "Microsoft.Toolkit.Uwp.UI.Controls";
+ }
+
///
/// Names for ToolboxCategoryAttribute.
///
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.Design/Common/MetadataRegistrationBase.cs b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Common/MetadataRegistrationBase.cs
index ffcec2e7184..024529d9fe9 100644
--- a/Microsoft.Toolkit.Uwp.UI.Controls.Design/Common/MetadataRegistrationBase.cs
+++ b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Common/MetadataRegistrationBase.cs
@@ -2,42 +2,55 @@
// 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.Windows.Design.Metadata;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
-using System.IO;
using System.Linq;
using System.Reflection;
using System.Xml.Linq;
+using Microsoft.Toolkit.Uwp.Design.Types;
+
+using Microsoft.VisualStudio.DesignTools.Extensibility;
+using Microsoft.VisualStudio.DesignTools.Extensibility.Metadata;
+
namespace Microsoft.Toolkit.Uwp.Design.Common
{
- public class MetadataRegistrationBase
+ public abstract class MetadataRegistrationBase : IProvideAttributeTable
{
private AttributeTable masterMetadataTable;
internal MetadataRegistrationBase() { }
///
- /// Build design time metadata attribute table.
- ///
- /// Custom attribute table.
- protected virtual AttributeTable BuildAttributeTable()
+ /// Build design time metadata attribute table.
+ ///
+ /// Custom attribute table.
+ protected virtual AttributeTable BuildAttributeTable()
{
- AttributeTableBuilder builder = new AttributeTableBuilder();
+ var builder = new AttributeTableBuilder();
AddDescriptions(builder);
AddAttributes(builder);
AddTables(builder, this);
+
masterMetadataTable = builder.CreateTable();
return masterMetadataTable;
}
+ #region IProvideAttributeTable Members
+
///
- /// Find all AttributeTableBuilder subclasses in the assembly
+ /// Gets the AttributeTable for design time metadata.
+ ///
+ public AttributeTable AttributeTable => BuildAttributeTable();
+
+ #endregion
+
+ ///
+ /// Find all AttributeTableBuilder subclasses in the assembly
/// and add their attributes to the assembly attribute table.
///
/// The assembly attribute table builder.
@@ -53,7 +66,7 @@ private void AddTables(AttributeTableBuilder builder, object parent)
{
try
{
- AttributeTableBuilder atb = (AttributeTableBuilder)Activator.CreateInstance(t);
+ var atb = (AttributeTableBuilder)Activator.CreateInstance(t);
builder.AddTable(atb.CreateTable());
}
catch (Exception)
@@ -75,7 +88,7 @@ private void AddTables(AttributeTableBuilder builder, object parent)
protected string AssemblyFullName { get; set; }
///
- /// Create description attribute from run time assembly xml file.
+ /// Create description attribute from run time assembly XML file.
///
/// The assembly attribute table builder.
[SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Design time dll should not fail.")]
@@ -83,36 +96,36 @@ private void AddDescriptions(AttributeTableBuilder builder)
{
Debug.Assert(builder != null, "AddDescriptions is called with null parameter!");
- if (string.IsNullOrEmpty(XmlResourceName) ||
- string.IsNullOrEmpty(AssemblyFullName))
- {
- return;
- }
- XDocument xdoc = null;
+ if (string.IsNullOrEmpty(XmlResourceName) || string.IsNullOrEmpty(AssemblyFullName)) return;
+
+ XDocument xDoc;
try
{
- xdoc = XDocument.Load(new StreamReader(
- Assembly.GetExecutingAssembly().GetManifestResourceStream(XmlResourceName)));
+ xDoc = XDocument.Load(Assembly.GetExecutingAssembly().GetManifestResourceStream(XmlResourceName));
}
- catch { return; }
- if (xdoc == null)
+ catch
{
return;
}
- foreach (XElement member in xdoc.Descendants("member"))
+ if (xDoc == null) return;
+
+ foreach (XElement member in xDoc.Descendants("member"))
{
try
{
string name = (string)member.Attribute("name");
- if (name == null)
- continue;
+
+ if (name == null) continue;
+
bool isType = name.StartsWith("T:", StringComparison.OrdinalIgnoreCase);
- if (isType ||
- name.StartsWith("P:", StringComparison.OrdinalIgnoreCase))
+ bool isProperty = name.StartsWith("P:", StringComparison.OrdinalIgnoreCase);
+
+ if (isType || isProperty)
{
int lastDot = name.Length;
string typeName;
+
if (isType)
{
typeName = name.Substring(2); // skip leading "T:"
@@ -122,86 +135,74 @@ private void AddDescriptions(AttributeTableBuilder builder)
lastDot = name.LastIndexOf('.');
typeName = name.Substring(2, lastDot - 2);
}
- typeName += AssemblyFullName;
- Type t = Type.GetType(typeName);
- if (t != null && t.IsPublic && t.IsClass &&
- t.IsSubclassOf(Types.PlatformTypes.DependencyObjectType))
+ var type = Type.GetType(typeName + ", " + AssemblyFullName);
+
+ if (type != null && type.IsPublic && type.IsClass && type.IsSubclassOf(PlatformTypes.DependencyObject))
{
string desc = ParseDescription(member);
- if (desc == null)
- continue;
- desc = desc.Trim();
- desc = string.Join(" ", desc.Split(new char[] { ' ', '\t', '\n', '\r' }, StringSplitOptions.RemoveEmptyEntries));
+ if (desc == null) continue;
+
+ desc = string.Join(" ", desc.Trim().Split(new char[] { ' ', '\t', '\n', '\r' }, StringSplitOptions.RemoveEmptyEntries));
+
if (isType)
{
- bool isBrowsable = true;
- try
+ if (IsBrowsable(type))
{
- isBrowsable = IsBrowsable(t);
+ builder.AddCustomAttributes(typeName, new DescriptionAttribute(desc));
}
- catch { isBrowsable = false; }
- if (isBrowsable)
- builder.AddCallback(t, b => b.AddCustomAttributes(new DescriptionAttribute(desc)));
else //Hide from intellisense
{
- builder.AddCallback(t, b => b.AddCustomAttributes(
+ builder.AddCustomAttributes(typeName,
new BrowsableAttribute(false),
- new Microsoft.Windows.Design.ToolboxBrowsableAttribute(false),
- new ToolboxItemAttribute(false)));
+ new ToolboxBrowsableAttribute(false),
+ new ToolboxItemAttribute(false));
}
}
else
{
- string propName = name.Substring(lastDot + 1);
- PropertyInfo pi = t.GetProperty(propName, BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly);
+ var propertyName = name.Substring(lastDot + 1);
+ PropertyInfo pi = type.GetProperty(propertyName, BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly);
if (pi != null)
{
- bool isBrowsable = true;
- try
+ if (IsBrowsable(type))
{
- isBrowsable = IsBrowsable(pi);
+ builder.AddCustomAttributes(typeName, propertyName, new DescriptionAttribute(desc));
}
- catch { isBrowsable = false; }
- if (isBrowsable)
- builder.AddCallback(t, b => b.AddCustomAttributes(propName, new DescriptionAttribute(desc)));
else //Hide from intellisense
- builder.AddCallback(t, b => b.AddCustomAttributes(new BrowsableAttribute(false)));
+ {
+ builder.AddCustomAttributes(typeName, new BrowsableAttribute(false));
+ }
}
}
}
}
}
- catch (Exception)
+ catch
{
}
}
}
- private static bool IsBrowsable(Type t)
+
+ private static bool IsBrowsable(MemberInfo typeOrMember)
{
- var attrs = t.GetCustomAttributes(Types.PlatformTypes.EditorBrowsableAttributeType, false);
- foreach (var attr in attrs)
+ EditorBrowsableAttribute attribute;
+ try
{
- return Types.PlatformTypes.IsBrowsable(attr);
+ attribute = typeOrMember.GetCustomAttribute(false);
}
- return true;
- }
-
- private static bool IsBrowsable(System.Reflection.PropertyInfo pi)
- {
- var attrs = pi.GetCustomAttributes(Types.PlatformTypes.EditorBrowsableAttributeType, false);
- foreach (var attr in attrs)
+ catch
{
- return Types.PlatformTypes.IsBrowsable(attr);
+ return true; // If there is no [EditorBrowsable] attribute present, we'll show it by default.
}
- return true;
+ return attribute.State != EditorBrowsableState.Never;
}
///
- /// Create description string from xml doc summary tag.
+ /// Create description string from XML doc summary tag.
///
- /// A single node of the xml doc.
+ /// A single node of the XML doc.
/// Description string.
private static string ParseDescription(XElement member)
{
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.Design/Common/PlatformTypes.cs b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Common/PlatformTypes.cs
index 30196482c4c..57ecf3ec226 100644
--- a/Microsoft.Toolkit.Uwp.UI.Controls.Design/Common/PlatformTypes.cs
+++ b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Common/PlatformTypes.cs
@@ -3,29 +3,31 @@
// See the LICENSE file in the project root for more information.
using System;
-using Microsoft.Windows.Design.Metadata;
using Windows.UI.Xaml;
+using Windows.UI.Xaml.Controls;
+using Microsoft.VisualStudio.DesignTools.Extensibility;
+using Microsoft.VisualStudio.DesignTools.Extensibility.Metadata;
namespace Microsoft.Toolkit.Uwp.Design.Types
{
internal class PlatformTypes
{
- public static readonly Type DependencyObjectType = typeof(DependencyObject);
- public static readonly Type UIElementType = typeof(UIElement);
- public static readonly Type FrameworkElementType = typeof(FrameworkElement);
- public static readonly Type EditorBrowsableAttributeType = typeof(System.ComponentModel.EditorBrowsableAttribute);
+ public static readonly Type DependencyObject = typeof(DependencyObject);
+ public static readonly Type UIElement = typeof(UIElement);
+ public static readonly Type FrameworkElement = typeof(FrameworkElement);
+ public static readonly Type Control = typeof(Control);
+ }
- ///
- /// Used by MetadataRegistrationBase to get the browsable state
- ///
- /// This parameter must be of type 'System.ComponentModel.EditorBrowsableAttribute'
- ///
- public static bool IsBrowsable(object editorBrowsableAttribute)
+ internal class XamlTypes
+ {
+ public static class FrameworkElement
{
- if (editorBrowsableAttribute is System.ComponentModel.EditorBrowsableAttribute)
- return (editorBrowsableAttribute as System.ComponentModel.EditorBrowsableAttribute).State !=
- System.ComponentModel.EditorBrowsableState.Never;
- return true;
+ public static readonly TypeIdentifier TypeId = new TypeIdentifier("http://schemas.microsoft.com/winfx/2006/xaml/presentation", "FrameworkElement");
+ public static readonly PropertyIdentifier MarginProperty = new PropertyIdentifier(TypeId, "Margin");
+ public static readonly PropertyIdentifier HorizontalAlignmentProperty = new PropertyIdentifier(TypeId, "HorizontalAlignment");
+ public static readonly PropertyIdentifier VerticalAlignmentProperty = new PropertyIdentifier(TypeId, "VerticalAlignment");
+ public static readonly PropertyIdentifier HeightProperty = new PropertyIdentifier(TypeId, "Height");
+ public static readonly PropertyIdentifier WidthProperty = new PropertyIdentifier(TypeId, "Width");
}
public static class Control
@@ -35,15 +37,5 @@ public static class Control
public static readonly PropertyIdentifier BorderBrushProperty = new PropertyIdentifier(TypeId, "BorderBrush");
public static readonly PropertyIdentifier BorderThicknessProperty = new PropertyIdentifier(TypeId, "BorderThickness");
}
-
- public static class FrameworkElement
- {
- public static readonly TypeIdentifier TypeId = new TypeIdentifier("http://schemas.microsoft.com/winfx/2006/xaml/presentation", "FrameworkElement");
- public static readonly PropertyIdentifier MarginProperty = new PropertyIdentifier(TypeId, "Margin");
- public static readonly PropertyIdentifier HorizontalAlignmentProperty = new PropertyIdentifier(TypeId, "HorizontalAlignment");
- public static readonly PropertyIdentifier VerticalAlignmentProperty = new PropertyIdentifier(TypeId, "VerticalAlignment");
- public static readonly PropertyIdentifier HeightProperty = new PropertyIdentifier(TypeId, "Height");
- public static readonly PropertyIdentifier WidthProperty = new PropertyIdentifier(TypeId, "Width");
- }
}
}
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.Design/Common/ToolboxCategoryPaths.cs b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Common/ToolboxCategoryPaths.cs
deleted file mode 100644
index acdacdd4c55..00000000000
--- a/Microsoft.Toolkit.Uwp.UI.Controls.Design/Common/ToolboxCategoryPaths.cs
+++ /dev/null
@@ -1,23 +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 System.Diagnostics.CodeAnalysis;
-using System.Linq.Expressions;
-
-[assembly: SuppressMessage("General", "SWC1001:XmlDocumentationCommentShouldBeSpelledCorrectly", MessageId = "Theming", Justification = "Correct spelling")]
-
-namespace Microsoft.Toolkit.Uwp.UI.Controls.Design.Common
-{
- ///
- /// Names for ToolboxCategoryAttribute.
- ///
- internal static class ToolboxCategoryPaths
- {
- ///
- /// Basic Controls category.
- ///
- public const string Toolkit = "Windows Community Toolkit";
- }
-}
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.Design/AdaptiveGridViewMetadata.cs b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/AdaptiveGridView.Metadata.cs
similarity index 57%
rename from Microsoft.Toolkit.Uwp.UI.Controls.Design/AdaptiveGridViewMetadata.cs
rename to Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/AdaptiveGridView.Metadata.cs
index 2332d8910f2..32662e780db 100644
--- a/Microsoft.Toolkit.Uwp.UI.Controls.Design/AdaptiveGridViewMetadata.cs
+++ b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/AdaptiveGridView.Metadata.cs
@@ -2,44 +2,43 @@
// 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.UI.Controls.Design.Common;
-using Microsoft.Windows.Design;
-using Microsoft.Windows.Design.Features;
-using Microsoft.Windows.Design.Metadata;
-using Microsoft.Windows.Design.Model;
-using Microsoft.Windows.Design.PropertyEditing;
using System.ComponentModel;
+using Microsoft.Toolkit.Uwp.UI.Controls.Design.Properties;
+
+using Microsoft.VisualStudio.DesignTools.Extensibility;
+using Microsoft.VisualStudio.DesignTools.Extensibility.Metadata;
+
namespace Microsoft.Toolkit.Uwp.UI.Controls.Design
{
- internal class CustomDialogMetadata : AttributeTableBuilder
- {
- public CustomDialogMetadata()
- : base()
- {
- AddCallback(typeof(AdaptiveGridView),
+ internal class CustomDialogMetadata : AttributeTableBuilder
+ {
+ public CustomDialogMetadata()
+ : base()
+ {
+ AddCallback(ControlTypes.AdaptiveGridView,
b =>
{
b.AddCustomAttributes(nameof(AdaptiveGridView.DesiredWidth),
- new CategoryAttribute(Properties.Resources.CategoryCommon)
+ new CategoryAttribute(Resources.CategoryCommon)
);
b.AddCustomAttributes(nameof(AdaptiveGridView.ItemHeight),
- new CategoryAttribute(Properties.Resources.CategoryCommon)
+ new CategoryAttribute(Resources.CategoryCommon)
);
b.AddCustomAttributes(nameof(AdaptiveGridView.OneRowModeEnabled),
- new CategoryAttribute(Properties.Resources.CategoryCommon)
+ new CategoryAttribute(Resources.CategoryCommon)
);
b.AddCustomAttributes(nameof(AdaptiveGridView.StretchContentForSingleRow),
- new CategoryAttribute(Properties.Resources.CategoryCommon)
+ new CategoryAttribute(Resources.CategoryCommon)
);
b.AddCustomAttributes(nameof(AdaptiveGridView.ItemClickCommand),
new EditorBrowsableAttribute(EditorBrowsableState.Advanced),
- new CategoryAttribute(Properties.Resources.CategoryCommon)
+ new CategoryAttribute(Resources.CategoryCommon)
);
b.AddCustomAttributes(new ToolboxCategoryAttribute(ToolboxCategoryPaths.Toolkit, false));
}
);
- }
- }
+ }
+ }
}
\ No newline at end of file
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/AdaptiveGridView.Typedata.cs b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/AdaptiveGridView.Typedata.cs
new file mode 100644
index 00000000000..695c9b99b17
--- /dev/null
+++ b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/AdaptiveGridView.Typedata.cs
@@ -0,0 +1,22 @@
+// 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;
+
+namespace Microsoft.Toolkit.Uwp.UI.Controls.Design
+{
+ internal static partial class ControlTypes
+ {
+ internal const string AdaptiveGridView = RootNamespace + "." + nameof(AdaptiveGridView);
+ }
+
+ internal static class AdaptiveGridView
+ {
+ internal const string DesiredWidth = nameof(DesiredWidth);
+ internal const string ItemClickCommand = nameof(ItemClickCommand);
+ internal const string ItemHeight = nameof(ItemHeight);
+ internal const string OneRowModeEnabled = nameof(OneRowModeEnabled);
+ internal const string StretchContentForSingleRow = nameof(StretchContentForSingleRow);
+ }
+}
\ No newline at end of file
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.Design/BladeItemMetadata.cs b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/BladeItem.Metadata.cs
similarity index 54%
rename from Microsoft.Toolkit.Uwp.UI.Controls.Design/BladeItemMetadata.cs
rename to Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/BladeItem.Metadata.cs
index f9a01a4be8c..e2a172bf8d6 100644
--- a/Microsoft.Toolkit.Uwp.UI.Controls.Design/BladeItemMetadata.cs
+++ b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/BladeItem.Metadata.cs
@@ -2,44 +2,43 @@
// 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.UI.Controls.Design.Common;
-using Microsoft.Windows.Design;
-using Microsoft.Windows.Design.Features;
-using Microsoft.Windows.Design.Metadata;
-using Microsoft.Windows.Design.Model;
-using Microsoft.Windows.Design.PropertyEditing;
using System.ComponentModel;
+using Microsoft.Toolkit.Uwp.UI.Controls.Design.Properties;
+
+using Microsoft.VisualStudio.DesignTools.Extensibility;
+using Microsoft.VisualStudio.DesignTools.Extensibility.Metadata;
+
namespace Microsoft.Toolkit.Uwp.UI.Controls.Design
{
- internal class BladeItemMetadata : AttributeTableBuilder
- {
- public BladeItemMetadata()
- : base()
- {
- AddCallback(typeof(BladeItem),
+ internal class BladeItemMetadata : AttributeTableBuilder
+ {
+ public BladeItemMetadata()
+ : base()
+ {
+ AddCallback(ControlTypes.BladeItem,
b =>
{
b.AddCustomAttributes(nameof(BladeItem.TitleBarVisibility),
- new CategoryAttribute(Properties.Resources.CategoryCommon)
+ new CategoryAttribute(Resources.CategoryCommon)
);
b.AddCustomAttributes(nameof(BladeItem.IsOpen),
- new CategoryAttribute(Properties.Resources.CategoryCommon)
+ new CategoryAttribute(Resources.CategoryCommon)
);
b.AddCustomAttributes(nameof(BladeItem.TitleBarBackground),
- new CategoryAttribute(Properties.Resources.CategoryBrush)
+ new CategoryAttribute(Resources.CategoryBrush)
);
b.AddCustomAttributes(nameof(BladeItem.CloseButtonBackground),
- new CategoryAttribute(Properties.Resources.CategoryBrush)
+ new CategoryAttribute(Resources.CategoryBrush)
);
b.AddCustomAttributes(nameof(BladeItem.CloseButtonForeground),
- new CategoryAttribute(Properties.Resources.CategoryBrush)
+ new CategoryAttribute(Resources.CategoryBrush)
);
b.AddCustomAttributes(new ToolboxCategoryAttribute(ToolboxCategoryPaths.Toolkit, false));
}
);
- }
- }
+ }
+ }
}
\ No newline at end of file
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/BladeItem.Typedata.cs b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/BladeItem.Typedata.cs
new file mode 100644
index 00000000000..6c4447afcba
--- /dev/null
+++ b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/BladeItem.Typedata.cs
@@ -0,0 +1,22 @@
+// 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;
+
+namespace Microsoft.Toolkit.Uwp.UI.Controls.Design
+{
+ internal static partial class ControlTypes
+ {
+ internal const string BladeItem = RootNamespace + "." + nameof(BladeItem);
+ }
+
+ internal static class BladeItem
+ {
+ internal const string CloseButtonBackground = nameof(CloseButtonBackground);
+ internal const string CloseButtonForeground = nameof(CloseButtonForeground);
+ internal const string IsOpen = nameof(IsOpen);
+ internal const string TitleBarBackground = nameof(TitleBarBackground);
+ internal const string TitleBarVisibility = nameof(TitleBarVisibility);
+ }
+}
\ No newline at end of file
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.Design/BladeViewMetadata.cs b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/BladeView.Metadata.cs
similarity index 58%
rename from Microsoft.Toolkit.Uwp.UI.Controls.Design/BladeViewMetadata.cs
rename to Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/BladeView.Metadata.cs
index 445b820876f..98bd4f11c78 100644
--- a/Microsoft.Toolkit.Uwp.UI.Controls.Design/BladeViewMetadata.cs
+++ b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/BladeView.Metadata.cs
@@ -2,47 +2,45 @@
// 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.UI.Controls.Design.Common;
-using Microsoft.Windows.Design;
-using Microsoft.Windows.Design.Features;
-using Microsoft.Windows.Design.Metadata;
-using Microsoft.Windows.Design.Model;
-using Microsoft.Windows.Design.PropertyEditing;
using System.ComponentModel;
+using Microsoft.Toolkit.Uwp.UI.Controls.Design.Properties;
+
+using Microsoft.VisualStudio.DesignTools.Extensibility;
+using Microsoft.VisualStudio.DesignTools.Extensibility.Metadata;
+using Microsoft.VisualStudio.DesignTools.Extensibility.PropertyEditing;
+
namespace Microsoft.Toolkit.Uwp.UI.Controls.Design
{
- internal class BladeViewMetadata : AttributeTableBuilder
- {
- public BladeViewMetadata()
- : base()
- {
- AddCallback(typeof(BladeView),
+ internal class BladeViewMetadata : AttributeTableBuilder
+ {
+ public BladeViewMetadata()
+ : base()
+ {
+ AddCallback(ControlTypes.BladeView,
b =>
{
b.AddCustomAttributes(nameof(BladeView.ActiveBlades),
- new CategoryAttribute(Properties.Resources.CategoryCommon)
+ new CategoryAttribute(Resources.CategoryCommon)
);
b.AddCustomAttributes(nameof(BladeView.BladeMode),
- new CategoryAttribute(Properties.Resources.CategoryCommon)
+ new CategoryAttribute(Resources.CategoryCommon)
);
b.AddCustomAttributes(nameof(BladeView.AutoCollapseCountThreshold),
- new CategoryAttribute(Properties.Resources.CategoryCommon)
+ new CategoryAttribute(Resources.CategoryCommon)
);
b.AddCustomAttributes(nameof(BladeView.Items),
new PropertyOrderAttribute(PropertyOrder.Early),
- new CategoryAttribute(Properties.Resources.CategoryCommon),
+ new CategoryAttribute(Resources.CategoryCommon),
//The following is necessary because this is a collection of an abstract type, so we help
//the designer with populating supported types that can be added to the collection
- new NewItemTypesAttribute(new System.Type[] {
- typeof(BladeItem),
- }),
+ new NewItemTypesAttribute(ControlTypes.BladeItem),
new AlternateContentPropertyAttribute()
);
b.AddCustomAttributes(new ToolboxCategoryAttribute(ToolboxCategoryPaths.Toolkit, false));
}
);
- }
- }
+ }
+ }
}
\ No newline at end of file
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/BladeView.Typedata.cs b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/BladeView.Typedata.cs
new file mode 100644
index 00000000000..81c16790594
--- /dev/null
+++ b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/BladeView.Typedata.cs
@@ -0,0 +1,21 @@
+// 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;
+
+namespace Microsoft.Toolkit.Uwp.UI.Controls.Design
+{
+ internal static partial class ControlTypes
+ {
+ internal const string BladeView = RootNamespace + "." + nameof(BladeView);
+ }
+
+ internal static class BladeView
+ {
+ internal const string ActiveBlades = nameof(ActiveBlades);
+ internal const string AutoCollapseCountThreshold = nameof(AutoCollapseCountThreshold);
+ internal const string BladeMode = nameof(BladeMode);
+ internal const string Items = nameof(Items);
+ }
+}
\ No newline at end of file
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.Design/CarouselMetadata.cs b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/Carousel.Metadata.cs
similarity index 50%
rename from Microsoft.Toolkit.Uwp.UI.Controls.Design/CarouselMetadata.cs
rename to Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/Carousel.Metadata.cs
index fbe843374d9..1575e9de83f 100644
--- a/Microsoft.Toolkit.Uwp.UI.Controls.Design/CarouselMetadata.cs
+++ b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/Carousel.Metadata.cs
@@ -2,36 +2,37 @@
// 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.UI.Controls.Design.Common;
-using Microsoft.Windows.Design;
-using Microsoft.Windows.Design.Metadata;
-using Microsoft.Windows.Design.PropertyEditing;
using System.ComponentModel;
+using Microsoft.Toolkit.Uwp.UI.Controls.Design.Properties;
+
+using Microsoft.VisualStudio.DesignTools.Extensibility;
+using Microsoft.VisualStudio.DesignTools.Extensibility.Metadata;
+
namespace Microsoft.Toolkit.Uwp.UI.Controls.Design
{
- internal class CarouselMetadata : AttributeTableBuilder
- {
+ internal class CarouselMetadata : AttributeTableBuilder
+ {
public CarouselMetadata()
- : base()
- {
- AddCallback(typeof(Microsoft.Toolkit.Uwp.UI.Controls.Carousel),
- b =>
- {
- b.AddCustomAttributes(nameof(Carousel.SelectedItem), new CategoryAttribute(Properties.Resources.CategoryCommon));
- b.AddCustomAttributes(nameof(Carousel.SelectedIndex), new CategoryAttribute(Properties.Resources.CategoryCommon));
- b.AddCustomAttributes(nameof(Carousel.TransitionDuration), new CategoryAttribute(Properties.Resources.CategoryCommon));
- b.AddCustomAttributes(nameof(Carousel.ItemDepth), new CategoryAttribute(Properties.Resources.CategoryCommon));
- b.AddCustomAttributes(nameof(Carousel.EasingFunction), new CategoryAttribute(Properties.Resources.CategoryCommon));
- b.AddCustomAttributes(nameof(Carousel.ItemMargin), new CategoryAttribute(Properties.Resources.CategoryCommon));
- b.AddCustomAttributes(nameof(Carousel.InvertPositive), new CategoryAttribute(Properties.Resources.CategoryCommon));
- b.AddCustomAttributes(nameof(Carousel.ItemRotationX), new CategoryAttribute(Properties.Resources.CategoryCommon));
- b.AddCustomAttributes(nameof(Carousel.ItemRotationY), new CategoryAttribute(Properties.Resources.CategoryCommon));
- b.AddCustomAttributes(nameof(Carousel.ItemRotationZ), new CategoryAttribute(Properties.Resources.CategoryCommon));
- b.AddCustomAttributes(nameof(Carousel.Orientation), new CategoryAttribute(Properties.Resources.CategoryCommon));
+ : base()
+ {
+ AddCallback(ControlTypes.Carousel,
+ b =>
+ {
+ b.AddCustomAttributes(nameof(Carousel.SelectedItem), new CategoryAttribute(Resources.CategoryCommon));
+ b.AddCustomAttributes(nameof(Carousel.SelectedIndex), new CategoryAttribute(Resources.CategoryCommon));
+ b.AddCustomAttributes(nameof(Carousel.TransitionDuration), new CategoryAttribute(Resources.CategoryCommon));
+ b.AddCustomAttributes(nameof(Carousel.ItemDepth), new CategoryAttribute(Resources.CategoryCommon));
+ b.AddCustomAttributes(nameof(Carousel.EasingFunction), new CategoryAttribute(Resources.CategoryCommon));
+ b.AddCustomAttributes(nameof(Carousel.ItemMargin), new CategoryAttribute(Resources.CategoryCommon));
+ b.AddCustomAttributes(nameof(Carousel.InvertPositive), new CategoryAttribute(Resources.CategoryCommon));
+ b.AddCustomAttributes(nameof(Carousel.ItemRotationX), new CategoryAttribute(Resources.CategoryCommon));
+ b.AddCustomAttributes(nameof(Carousel.ItemRotationY), new CategoryAttribute(Resources.CategoryCommon));
+ b.AddCustomAttributes(nameof(Carousel.ItemRotationZ), new CategoryAttribute(Resources.CategoryCommon));
+ b.AddCustomAttributes(nameof(Carousel.Orientation), new CategoryAttribute(Resources.CategoryCommon));
b.AddCustomAttributes(new ToolboxCategoryAttribute(ToolboxCategoryPaths.Toolkit, false));
- }
- );
- }
- }
+ }
+ );
+ }
+ }
}
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/Carousel.Typedata.cs b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/Carousel.Typedata.cs
new file mode 100644
index 00000000000..ab82471baf0
--- /dev/null
+++ b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/Carousel.Typedata.cs
@@ -0,0 +1,28 @@
+// 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;
+
+namespace Microsoft.Toolkit.Uwp.UI.Controls.Design
+{
+ internal static partial class ControlTypes
+ {
+ internal const string Carousel = RootNamespace + "." + nameof(Carousel);
+ }
+
+ internal static class Carousel
+ {
+ internal const string EasingFunction = nameof(EasingFunction);
+ internal const string InvertPositive = nameof(InvertPositive);
+ internal const string ItemDepth = nameof(ItemDepth);
+ internal const string ItemMargin = nameof(ItemMargin);
+ internal const string ItemRotationX = nameof(ItemRotationX);
+ internal const string ItemRotationY = nameof(ItemRotationY);
+ internal const string ItemRotationZ = nameof(ItemRotationZ);
+ internal const string Orientation = nameof(Orientation);
+ internal const string SelectedIndex = nameof(SelectedIndex);
+ internal const string SelectedItem = nameof(SelectedItem);
+ internal const string TransitionDuration = nameof(TransitionDuration);
+ }
+}
\ No newline at end of file
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.Design/DropShadowPanelMetadata.cs b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/DropShadowPanel.Metadata.cs
similarity index 62%
rename from Microsoft.Toolkit.Uwp.UI.Controls.Design/DropShadowPanelMetadata.cs
rename to Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/DropShadowPanel.Metadata.cs
index f8f88e8bc05..465f4ee8568 100644
--- a/Microsoft.Toolkit.Uwp.UI.Controls.Design/DropShadowPanelMetadata.cs
+++ b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/DropShadowPanel.Metadata.cs
@@ -2,14 +2,16 @@
// 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.UI.Controls.Design.Common;
-using Microsoft.Windows.Design;
-using Microsoft.Windows.Design.Features;
-using Microsoft.Windows.Design.Metadata;
-using Microsoft.Windows.Design.Model;
-using Microsoft.Windows.Design.PropertyEditing;
using System.ComponentModel;
+using Microsoft.Toolkit.Uwp.UI.Controls.Design.Properties;
+
+using Microsoft.VisualStudio.DesignTools.Extensibility;
+using Microsoft.VisualStudio.DesignTools.Extensibility.Features;
+using Microsoft.VisualStudio.DesignTools.Extensibility.Metadata;
+using Microsoft.VisualStudio.DesignTools.Extensibility.Model;
+using Microsoft.VisualStudio.DesignTools.Extensibility.PropertyEditing;
+
namespace Microsoft.Toolkit.Uwp.UI.Controls.Design
{
@@ -21,43 +23,43 @@ public override void InitializeDefaults(ModelItem item)
}
}
- internal class DropShadowPanelMetadata : AttributeTableBuilder
- {
- public DropShadowPanelMetadata()
- : base()
- {
- AddCallback(typeof(DropShadowPanel),
+ internal class DropShadowPanelMetadata : AttributeTableBuilder
+ {
+ public DropShadowPanelMetadata()
+ : base()
+ {
+ AddCallback(ControlTypes.DropShadowPanel,
b =>
{
b.AddCustomAttributes(new FeatureAttribute(typeof(DropShadowPanelDefaults)));
b.AddCustomAttributes(nameof(DropShadowPanel.BlurRadius),
new PropertyOrderAttribute(PropertyOrder.Early),
- new CategoryAttribute(Properties.Resources.CategoryDropShadow)
+ new CategoryAttribute(Resources.CategoryDropShadow)
);
b.AddCustomAttributes(nameof(DropShadowPanel.ShadowOpacity),
new PropertyOrderAttribute(PropertyOrder.Early),
- new CategoryAttribute(Properties.Resources.CategoryDropShadow)
+ new CategoryAttribute(Resources.CategoryDropShadow)
);
b.AddCustomAttributes(nameof(DropShadowPanel.Color),
- new CategoryAttribute(Properties.Resources.CategoryDropShadow)
+ new CategoryAttribute(Resources.CategoryDropShadow)
);
b.AddCustomAttributes(nameof(DropShadowPanel.OffsetX),
new PropertyOrderAttribute(PropertyOrder.Late),
- new CategoryAttribute(Properties.Resources.CategoryDropShadow)
+ new CategoryAttribute(Resources.CategoryDropShadow)
);
b.AddCustomAttributes(nameof(DropShadowPanel.OffsetY),
new PropertyOrderAttribute(PropertyOrder.Late),
- new CategoryAttribute(Properties.Resources.CategoryDropShadow)
+ new CategoryAttribute(Resources.CategoryDropShadow)
);
b.AddCustomAttributes(nameof(DropShadowPanel.OffsetZ),
new PropertyOrderAttribute(PropertyOrder.Late),
- new CategoryAttribute(Properties.Resources.CategoryDropShadow)
+ new CategoryAttribute(Resources.CategoryDropShadow)
);
b.AddCustomAttributes(new ToolboxCategoryAttribute(ToolboxCategoryPaths.Toolkit, false));
}
);
- }
- }
+ }
+ }
}
\ No newline at end of file
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/DropShadowPanel.Typedata.cs b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/DropShadowPanel.Typedata.cs
new file mode 100644
index 00000000000..ba79c8e6ac4
--- /dev/null
+++ b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/DropShadowPanel.Typedata.cs
@@ -0,0 +1,23 @@
+// 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;
+
+namespace Microsoft.Toolkit.Uwp.UI.Controls.Design
+{
+ internal static partial class ControlTypes
+ {
+ internal const string DropShadowPanel = RootNamespace + "." + nameof(DropShadowPanel);
+ }
+
+ internal static class DropShadowPanel
+ {
+ internal const string BlurRadius = nameof(BlurRadius);
+ internal const string Color = nameof(Color);
+ internal const string OffsetX = nameof(OffsetX);
+ internal const string OffsetY = nameof(OffsetY);
+ internal const string OffsetZ = nameof(OffsetZ);
+ internal const string ShadowOpacity = nameof(ShadowOpacity);
+ }
+}
\ No newline at end of file
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.Design/ExpanderMetadata.cs b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/Expander.Metadata.cs
similarity index 54%
rename from Microsoft.Toolkit.Uwp.UI.Controls.Design/ExpanderMetadata.cs
rename to Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/Expander.Metadata.cs
index 5ad82311ba5..eedfe6a9efd 100644
--- a/Microsoft.Toolkit.Uwp.UI.Controls.Design/ExpanderMetadata.cs
+++ b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/Expander.Metadata.cs
@@ -2,32 +2,33 @@
// 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.UI.Controls.Design.Common;
-using Microsoft.Windows.Design;
-using Microsoft.Windows.Design.Metadata;
-using Microsoft.Windows.Design.PropertyEditing;
using System.ComponentModel;
+using Microsoft.Toolkit.Uwp.UI.Controls.Design.Properties;
+
+using Microsoft.VisualStudio.DesignTools.Extensibility;
+using Microsoft.VisualStudio.DesignTools.Extensibility.Metadata;
+
namespace Microsoft.Toolkit.Uwp.UI.Controls.Design
{
- internal class ExpanderMetadata : AttributeTableBuilder
- {
+ internal class ExpanderMetadata : AttributeTableBuilder
+ {
public ExpanderMetadata()
- : base()
- {
- AddCallback(typeof(Microsoft.Toolkit.Uwp.UI.Controls.Expander),
- b =>
- {
- b.AddCustomAttributes(nameof(Expander.Header), new CategoryAttribute(Properties.Resources.CategoryCommon));
- b.AddCustomAttributes(nameof(Expander.HeaderTemplate),
- new CategoryAttribute(Properties.Resources.CategoryCommon),
+ : base()
+ {
+ AddCallback(ControlTypes.Expander,
+ b =>
+ {
+ b.AddCustomAttributes(nameof(Expander.Header), new CategoryAttribute(Resources.CategoryCommon));
+ b.AddCustomAttributes(nameof(Expander.HeaderTemplate),
+ new CategoryAttribute(Resources.CategoryCommon),
new EditorBrowsableAttribute(EditorBrowsableState.Advanced)
);
- b.AddCustomAttributes(nameof(Expander.IsExpanded), new CategoryAttribute(Properties.Resources.CategoryCommon));
- b.AddCustomAttributes(nameof(Expander.ExpandDirection), new CategoryAttribute(Properties.Resources.CategoryCommon));
+ b.AddCustomAttributes(nameof(Expander.IsExpanded), new CategoryAttribute(Resources.CategoryCommon));
+ b.AddCustomAttributes(nameof(Expander.ExpandDirection), new CategoryAttribute(Resources.CategoryCommon));
b.AddCustomAttributes(new ToolboxCategoryAttribute(ToolboxCategoryPaths.Toolkit, false));
- }
- );
- }
- }
+ }
+ );
+ }
+ }
}
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/Expander.Typedata.cs b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/Expander.Typedata.cs
new file mode 100644
index 00000000000..becf381ce8d
--- /dev/null
+++ b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/Expander.Typedata.cs
@@ -0,0 +1,21 @@
+// 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;
+
+namespace Microsoft.Toolkit.Uwp.UI.Controls.Design
+{
+ internal static partial class ControlTypes
+ {
+ internal const string Expander = RootNamespace + "." + nameof(Expander);
+ }
+
+ internal static class Expander
+ {
+ internal const string ExpandDirection = nameof(ExpandDirection);
+ internal const string Header = nameof(Header);
+ internal const string HeaderTemplate = nameof(HeaderTemplate);
+ internal const string IsExpanded = nameof(IsExpanded);
+ }
+}
\ No newline at end of file
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.Design/GridSplitterMetadata.cs b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/GridSplitter.Metadata.cs
similarity index 51%
rename from Microsoft.Toolkit.Uwp.UI.Controls.Design/GridSplitterMetadata.cs
rename to Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/GridSplitter.Metadata.cs
index b1ed1c253d0..1de36b2c75c 100644
--- a/Microsoft.Toolkit.Uwp.UI.Controls.Design/GridSplitterMetadata.cs
+++ b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/GridSplitter.Metadata.cs
@@ -2,36 +2,37 @@
// 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.UI.Controls.Design.Common;
-using Microsoft.Windows.Design;
-using Microsoft.Windows.Design.Metadata;
-using Microsoft.Windows.Design.PropertyEditing;
using System.ComponentModel;
+using Microsoft.Toolkit.Uwp.UI.Controls.Design.Properties;
+
+using Microsoft.VisualStudio.DesignTools.Extensibility;
+using Microsoft.VisualStudio.DesignTools.Extensibility.Metadata;
+
namespace Microsoft.Toolkit.Uwp.UI.Controls.Design
{
- internal class GridSplitterMetadata : AttributeTableBuilder
- {
+ internal class GridSplitterMetadata : AttributeTableBuilder
+ {
public GridSplitterMetadata()
- : base()
- {
- AddCallback(typeof(Microsoft.Toolkit.Uwp.UI.Controls.GridSplitter),
- b =>
- {
- b.AddCustomAttributes(nameof(GridSplitter.Element), new CategoryAttribute(Properties.Resources.CategoryCommon));
- b.AddCustomAttributes(nameof(GridSplitter.ResizeDirection), new CategoryAttribute(Properties.Resources.CategoryCommon));
- b.AddCustomAttributes(nameof(GridSplitter.ResizeBehavior), new CategoryAttribute(Properties.Resources.CategoryCommon));
- b.AddCustomAttributes(nameof(GridSplitter.GripperForeground), new CategoryAttribute(Properties.Resources.CategoryBrush));
- b.AddCustomAttributes(nameof(GridSplitter.ParentLevel), new CategoryAttribute(Properties.Resources.CategoryCommon));
- b.AddCustomAttributes(nameof(GridSplitter.GripperCursor), new CategoryAttribute(Properties.Resources.CategoryAppearance));
- b.AddCustomAttributes(nameof(GridSplitter.GripperCustomCursorResource),
- new CategoryAttribute(Properties.Resources.CategoryAppearance),
+ : base()
+ {
+ AddCallback(ControlTypes.GridSplitter,
+ b =>
+ {
+ b.AddCustomAttributes(nameof(GridSplitter.Element), new CategoryAttribute(Resources.CategoryCommon));
+ b.AddCustomAttributes(nameof(GridSplitter.ResizeDirection), new CategoryAttribute(Resources.CategoryCommon));
+ b.AddCustomAttributes(nameof(GridSplitter.ResizeBehavior), new CategoryAttribute(Resources.CategoryCommon));
+ b.AddCustomAttributes(nameof(GridSplitter.GripperForeground), new CategoryAttribute(Resources.CategoryBrush));
+ b.AddCustomAttributes(nameof(GridSplitter.ParentLevel), new CategoryAttribute(Resources.CategoryCommon));
+ b.AddCustomAttributes(nameof(GridSplitter.GripperCursor), new CategoryAttribute(Resources.CategoryAppearance));
+ b.AddCustomAttributes(nameof(GridSplitter.GripperCustomCursorResource),
+ new CategoryAttribute(Resources.CategoryAppearance),
new EditorBrowsableAttribute(EditorBrowsableState.Advanced)
);
- b.AddCustomAttributes(nameof(GridSplitter.CursorBehavior), new CategoryAttribute(Properties.Resources.CategoryCommon));
+ b.AddCustomAttributes(nameof(GridSplitter.CursorBehavior), new CategoryAttribute(Resources.CategoryCommon));
b.AddCustomAttributes(new ToolboxCategoryAttribute(ToolboxCategoryPaths.Toolkit, false));
- }
- );
- }
- }
+ }
+ );
+ }
+ }
}
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/GridSplitter.Typedata.cs b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/GridSplitter.Typedata.cs
new file mode 100644
index 00000000000..13c64c02a0e
--- /dev/null
+++ b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/GridSplitter.Typedata.cs
@@ -0,0 +1,25 @@
+// 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;
+
+namespace Microsoft.Toolkit.Uwp.UI.Controls.Design
+{
+ internal static partial class ControlTypes
+ {
+ internal const string GridSplitter = RootNamespace + "." + nameof(GridSplitter);
+ }
+
+ internal static class GridSplitter
+ {
+ internal const string CursorBehavior = nameof(CursorBehavior);
+ internal const string Element = nameof(Element);
+ internal const string GripperCursor = nameof(GripperCursor);
+ internal const string GripperCustomCursorResource = nameof(GripperCustomCursorResource);
+ internal const string GripperForeground = nameof(GripperForeground);
+ internal const string ParentLevel = nameof(ParentLevel);
+ internal const string ResizeBehavior = nameof(ResizeBehavior);
+ internal const string ResizeDirection = nameof(ResizeDirection);
+ }
+}
\ No newline at end of file
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.Design/ImageExMetadata.cs b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/ImageEx.Metadata.cs
similarity index 51%
rename from Microsoft.Toolkit.Uwp.UI.Controls.Design/ImageExMetadata.cs
rename to Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/ImageEx.Metadata.cs
index a5c0a5dabed..2a9b9ad82fa 100644
--- a/Microsoft.Toolkit.Uwp.UI.Controls.Design/ImageExMetadata.cs
+++ b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/ImageEx.Metadata.cs
@@ -2,26 +2,26 @@
// 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.UI.Controls.Design.Common;
-using Microsoft.Windows.Design;
-using Microsoft.Windows.Design.Metadata;
-using Microsoft.Windows.Design.PropertyEditing;
using System.ComponentModel;
+using Microsoft.Toolkit.Uwp.UI.Controls.Design.Properties;
+using Microsoft.VisualStudio.DesignTools.Extensibility;
+using Microsoft.VisualStudio.DesignTools.Extensibility.Metadata;
+
namespace Microsoft.Toolkit.Uwp.UI.Controls.Design
{
- internal class ImageExMetadata : AttributeTableBuilder
- {
+ internal class ImageExMetadata : AttributeTableBuilder
+ {
public ImageExMetadata()
- : base()
- {
- AddCallback(typeof(Microsoft.Toolkit.Uwp.UI.Controls.ImageEx),
- b =>
- {
- b.AddCustomAttributes(nameof(ImageEx.NineGrid), new CategoryAttribute(Properties.Resources.CategoryAppearance));
+ : base()
+ {
+ AddCallback(ControlTypes.ImageEx,
+ b =>
+ {
+ b.AddCustomAttributes(nameof(ImageEx.NineGrid), new CategoryAttribute(Resources.CategoryAppearance));
b.AddCustomAttributes(new ToolboxCategoryAttribute(ToolboxCategoryPaths.Toolkit, false));
- }
- );
- }
- }
+ }
+ );
+ }
+ }
}
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/ImageEx.Typedata.cs b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/ImageEx.Typedata.cs
new file mode 100644
index 00000000000..e3029c78475
--- /dev/null
+++ b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/ImageEx.Typedata.cs
@@ -0,0 +1,18 @@
+// 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;
+
+namespace Microsoft.Toolkit.Uwp.UI.Controls.Design
+{
+ internal static partial class ControlTypes
+ {
+ internal const string ImageEx = RootNamespace + "." + nameof(ImageEx);
+ }
+
+ internal static class ImageEx
+ {
+ internal const string NineGrid = nameof(NineGrid);
+ }
+}
\ No newline at end of file
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/InAppNotification.Metadata.cs b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/InAppNotification.Metadata.cs
new file mode 100644
index 00000000000..724db19ee14
--- /dev/null
+++ b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/InAppNotification.Metadata.cs
@@ -0,0 +1,28 @@
+// 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.ComponentModel;
+
+using Microsoft.Toolkit.Uwp.UI.Controls.Design.Properties;
+
+using Microsoft.VisualStudio.DesignTools.Extensibility;
+using Microsoft.VisualStudio.DesignTools.Extensibility.Metadata;
+
+namespace Microsoft.Toolkit.Uwp.UI.Controls.Design
+{
+ internal class InAppNotificationMetadata : AttributeTableBuilder
+ {
+ public InAppNotificationMetadata()
+ : base()
+ {
+ AddCallback(ControlTypes.InAppNotification,
+ b =>
+ {
+ b.AddCustomAttributes(nameof(InAppNotification.ShowDismissButton), new CategoryAttribute(Resources.CategoryAppearance));
+ b.AddCustomAttributes(new ToolboxCategoryAttribute(ToolboxCategoryPaths.Toolkit, false));
+ }
+ );
+ }
+ }
+}
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/InAppNotification.Typedata.cs b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/InAppNotification.Typedata.cs
new file mode 100644
index 00000000000..dbe727bae8a
--- /dev/null
+++ b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/InAppNotification.Typedata.cs
@@ -0,0 +1,18 @@
+// 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;
+
+namespace Microsoft.Toolkit.Uwp.UI.Controls.Design
+{
+ internal static partial class ControlTypes
+ {
+ internal const string InAppNotification = RootNamespace + "." + nameof(InAppNotification);
+ }
+
+ internal static class InAppNotification
+ {
+ internal const string ShowDismissButton = nameof(ShowDismissButton);
+ }
+}
\ No newline at end of file
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/LayoutTransitionControl.Metadata.cs b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/LayoutTransitionControl.Metadata.cs
new file mode 100644
index 00000000000..8bda1cbc9bd
--- /dev/null
+++ b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/LayoutTransitionControl.Metadata.cs
@@ -0,0 +1,29 @@
+// 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.ComponentModel;
+
+using Microsoft.Toolkit.Uwp.UI.Controls.Design.Properties;
+
+using Microsoft.VisualStudio.DesignTools.Extensibility;
+using Microsoft.VisualStudio.DesignTools.Extensibility.Metadata;
+
+namespace Microsoft.Toolkit.Uwp.UI.Controls.Design
+{
+ internal class LayoutTransformControlMetadata : AttributeTableBuilder
+ {
+ public LayoutTransformControlMetadata()
+ : base()
+ {
+ AddCallback(ControlTypes.LayoutTransformControl,
+ b =>
+ {
+ b.AddCustomAttributes(nameof(LayoutTransformControl.Child), new CategoryAttribute(Resources.CategoryCommon));
+ b.AddCustomAttributes(nameof(LayoutTransformControl.Transform), new CategoryAttribute(Resources.CategoryCommon));
+ b.AddCustomAttributes(new ToolboxCategoryAttribute(ToolboxCategoryPaths.Toolkit, false));
+ }
+ );
+ }
+ }
+}
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/LayoutTransitionControl.Typedata.cs b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/LayoutTransitionControl.Typedata.cs
new file mode 100644
index 00000000000..06464181c80
--- /dev/null
+++ b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/LayoutTransitionControl.Typedata.cs
@@ -0,0 +1,19 @@
+// 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;
+
+namespace Microsoft.Toolkit.Uwp.UI.Controls.Design
+{
+ internal static partial class ControlTypes
+ {
+ internal const string LayoutTransformControl = RootNamespace + "." + nameof(LayoutTransformControl);
+ }
+
+ internal static class LayoutTransformControl
+ {
+ internal const string Child = nameof(Child);
+ internal const string Transform = nameof(Transform);
+ }
+}
\ No newline at end of file
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.Design/LoadingMetadata.cs b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/Loading.Metadata.cs
similarity index 51%
rename from Microsoft.Toolkit.Uwp.UI.Controls.Design/LoadingMetadata.cs
rename to Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/Loading.Metadata.cs
index a80ac27ef39..93dae34d60d 100644
--- a/Microsoft.Toolkit.Uwp.UI.Controls.Design/LoadingMetadata.cs
+++ b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/Loading.Metadata.cs
@@ -2,26 +2,27 @@
// 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.UI.Controls.Design.Common;
-using Microsoft.Windows.Design;
-using Microsoft.Windows.Design.Metadata;
-using Microsoft.Windows.Design.PropertyEditing;
using System.ComponentModel;
+using Microsoft.Toolkit.Uwp.UI.Controls.Design.Properties;
+
+using Microsoft.VisualStudio.DesignTools.Extensibility;
+using Microsoft.VisualStudio.DesignTools.Extensibility.Metadata;
+
namespace Microsoft.Toolkit.Uwp.UI.Controls.Design
{
- internal class LoadingMetadata : AttributeTableBuilder
- {
+ internal class LoadingMetadata : AttributeTableBuilder
+ {
public LoadingMetadata()
- : base()
- {
- AddCallback(typeof(Microsoft.Toolkit.Uwp.UI.Controls.Loading),
- b =>
- {
- b.AddCustomAttributes(nameof(Loading.IsLoading), new CategoryAttribute(Properties.Resources.CategoryCommon));
+ : base()
+ {
+ AddCallback(ControlTypes.Loading,
+ b =>
+ {
+ b.AddCustomAttributes(nameof(Loading.IsLoading), new CategoryAttribute(Resources.CategoryCommon));
b.AddCustomAttributes(new ToolboxCategoryAttribute(ToolboxCategoryPaths.Toolkit, false));
- }
- );
- }
- }
+ }
+ );
+ }
+ }
}
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/Loading.Typedata.cs b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/Loading.Typedata.cs
new file mode 100644
index 00000000000..2f5bbc2468b
--- /dev/null
+++ b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/Loading.Typedata.cs
@@ -0,0 +1,18 @@
+// 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;
+
+namespace Microsoft.Toolkit.Uwp.UI.Controls.Design
+{
+ internal static partial class ControlTypes
+ {
+ internal const string Loading = RootNamespace + "." + nameof(Loading);
+ }
+
+ internal static class Loading
+ {
+ internal const string IsLoading = nameof(IsLoading);
+ }
+}
\ No newline at end of file
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.Design/MasterDetailsViewMetadata.cs b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/MasterDetailsView.Metadata.cs
similarity index 53%
rename from Microsoft.Toolkit.Uwp.UI.Controls.Design/MasterDetailsViewMetadata.cs
rename to Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/MasterDetailsView.Metadata.cs
index 3cd1219b76d..65c755e9fba 100644
--- a/Microsoft.Toolkit.Uwp.UI.Controls.Design/MasterDetailsViewMetadata.cs
+++ b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/MasterDetailsView.Metadata.cs
@@ -2,45 +2,46 @@
// 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.UI.Controls.Design.Common;
-using Microsoft.Windows.Design;
-using Microsoft.Windows.Design.Metadata;
-using Microsoft.Windows.Design.PropertyEditing;
using System.ComponentModel;
+using Microsoft.Toolkit.Uwp.UI.Controls.Design.Properties;
+
+using Microsoft.VisualStudio.DesignTools.Extensibility;
+using Microsoft.VisualStudio.DesignTools.Extensibility.Metadata;
+
namespace Microsoft.Toolkit.Uwp.UI.Controls.Design
{
- internal class MasterDetailsViewMetadata : AttributeTableBuilder
- {
+ internal class MasterDetailsViewMetadata : AttributeTableBuilder
+ {
public MasterDetailsViewMetadata()
- : base()
- {
- AddCallback(typeof(Microsoft.Toolkit.Uwp.UI.Controls.MasterDetailsView),
- b =>
+ : base()
+ {
+ AddCallback(ControlTypes.MasterDetailsView,
+ b =>
{
- b.AddCustomAttributes(nameof(MasterDetailsView.SelectedItem), new CategoryAttribute(Properties.Resources.CategoryCommon));
- b.AddCustomAttributes(nameof(MasterDetailsView.DetailsTemplate),
- new CategoryAttribute(Properties.Resources.CategoryAppearance),
+ b.AddCustomAttributes(nameof(MasterDetailsView.SelectedItem), new CategoryAttribute(Resources.CategoryCommon));
+ b.AddCustomAttributes(nameof(MasterDetailsView.DetailsTemplate),
+ new CategoryAttribute(Resources.CategoryAppearance),
new EditorBrowsableAttribute(EditorBrowsableState.Advanced)
);
- b.AddCustomAttributes(nameof(MasterDetailsView.MasterPaneBackground), new CategoryAttribute(Properties.Resources.CategoryBrush));
- b.AddCustomAttributes(nameof(MasterDetailsView.MasterHeader), new CategoryAttribute(Properties.Resources.CategoryCommon));
+ b.AddCustomAttributes(nameof(MasterDetailsView.MasterPaneBackground), new CategoryAttribute(Resources.CategoryBrush));
+ b.AddCustomAttributes(nameof(MasterDetailsView.MasterHeader), new CategoryAttribute(Resources.CategoryCommon));
b.AddCustomAttributes(nameof(MasterDetailsView.MasterHeaderTemplate),
- new CategoryAttribute(Properties.Resources.CategoryAppearance),
+ new CategoryAttribute(Resources.CategoryAppearance),
new EditorBrowsableAttribute(EditorBrowsableState.Advanced)
);
- b.AddCustomAttributes(nameof(MasterDetailsView.MasterPaneWidth), new CategoryAttribute(Properties.Resources.CategoryAppearance));
- b.AddCustomAttributes(nameof(MasterDetailsView.NoSelectionContent), new CategoryAttribute(Properties.Resources.CategoryCommon));
- b.AddCustomAttributes(nameof(MasterDetailsView.NoSelectionContentTemplate),
- new CategoryAttribute(Properties.Resources.CategoryCommon),
+ b.AddCustomAttributes(nameof(MasterDetailsView.MasterPaneWidth), new CategoryAttribute(Resources.CategoryAppearance));
+ b.AddCustomAttributes(nameof(MasterDetailsView.NoSelectionContent), new CategoryAttribute(Resources.CategoryCommon));
+ b.AddCustomAttributes(nameof(MasterDetailsView.NoSelectionContentTemplate),
+ new CategoryAttribute(Resources.CategoryCommon),
new EditorBrowsableAttribute(EditorBrowsableState.Advanced)
);
- b.AddCustomAttributes(nameof(MasterDetailsView.ViewState), new CategoryAttribute(Properties.Resources.CategoryCommon));
- b.AddCustomAttributes(nameof(MasterDetailsView.MasterCommandBar), new CategoryAttribute(Properties.Resources.CategoryCommon));
- b.AddCustomAttributes(nameof(MasterDetailsView.DetailsCommandBar), new CategoryAttribute(Properties.Resources.CategoryCommon));
+ b.AddCustomAttributes(nameof(MasterDetailsView.ViewState), new CategoryAttribute(Resources.CategoryCommon));
+ b.AddCustomAttributes(nameof(MasterDetailsView.MasterCommandBar), new CategoryAttribute(Resources.CategoryCommon));
+ b.AddCustomAttributes(nameof(MasterDetailsView.DetailsCommandBar), new CategoryAttribute(Resources.CategoryCommon));
b.AddCustomAttributes(new ToolboxCategoryAttribute(ToolboxCategoryPaths.Toolkit, false));
- }
- );
- }
- }
+ }
+ );
+ }
+ }
}
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/MasterDetailsView.Typedata.cs b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/MasterDetailsView.Typedata.cs
new file mode 100644
index 00000000000..cc68d0b2f71
--- /dev/null
+++ b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/MasterDetailsView.Typedata.cs
@@ -0,0 +1,28 @@
+// 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;
+
+namespace Microsoft.Toolkit.Uwp.UI.Controls.Design
+{
+ internal static partial class ControlTypes
+ {
+ internal const string MasterDetailsView = RootNamespace + "." + nameof(MasterDetailsView);
+ }
+
+ internal static class MasterDetailsView
+ {
+ internal const string DetailsCommandBar = nameof(DetailsCommandBar);
+ internal const string DetailsTemplate = nameof(DetailsTemplate);
+ internal const string MasterCommandBar = nameof(MasterCommandBar);
+ internal const string MasterHeader = nameof(MasterHeader);
+ internal const string MasterHeaderTemplate = nameof(MasterHeaderTemplate);
+ internal const string MasterPaneBackground = nameof(MasterPaneBackground);
+ internal const string MasterPaneWidth = nameof(MasterPaneWidth);
+ internal const string NoSelectionContent = nameof(NoSelectionContent);
+ internal const string NoSelectionContentTemplate = nameof(NoSelectionContentTemplate);
+ internal const string SelectedItem = nameof(SelectedItem);
+ internal const string ViewState = nameof(ViewState);
+ }
+}
\ No newline at end of file
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/Menu.Metadata.cs b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/Menu.Metadata.cs
new file mode 100644
index 00000000000..120a51f40eb
--- /dev/null
+++ b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/Menu.Metadata.cs
@@ -0,0 +1,36 @@
+// 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.ComponentModel;
+
+using Microsoft.Toolkit.Uwp.UI.Controls.Design.Properties;
+
+using Microsoft.VisualStudio.DesignTools.Extensibility;
+using Microsoft.VisualStudio.DesignTools.Extensibility.Metadata;
+using Microsoft.VisualStudio.DesignTools.Extensibility.PropertyEditing;
+
+namespace Microsoft.Toolkit.Uwp.UI.Controls.Design
+{
+ internal class MenuMetadata : AttributeTableBuilder
+ {
+ public MenuMetadata()
+ : base()
+ {
+ AddCallback(ControlTypes.Menu,
+ b =>
+ {
+ b.AddCustomAttributes(nameof(Menu.Items),
+ new PropertyOrderAttribute(PropertyOrder.Early),
+ new CategoryAttribute(Resources.CategoryCommon),
+ //The following is necessary because this is a collection of an abstract type, so we help
+ //the designer with populating supported types that can be added to the collection
+ new NewItemTypesAttribute(ControlTypes.MenuItem),
+ new AlternateContentPropertyAttribute()
+ );
+ b.AddCustomAttributes(new ToolboxCategoryAttribute(ToolboxCategoryPaths.Toolkit, false));
+ }
+ );
+ }
+ }
+}
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/Menu.Typedata.cs b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/Menu.Typedata.cs
new file mode 100644
index 00000000000..a6fe22ee778
--- /dev/null
+++ b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/Menu.Typedata.cs
@@ -0,0 +1,18 @@
+// 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;
+
+namespace Microsoft.Toolkit.Uwp.UI.Controls.Design
+{
+ internal static partial class ControlTypes
+ {
+ internal const string Menu = RootNamespace + "." + nameof(Menu);
+ }
+
+ internal static class Menu
+ {
+ internal const string Items = nameof(Items);
+ }
+}
\ No newline at end of file
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.Design/MenuItemMetadata.cs b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/MenuItem.Metadata.cs
similarity index 55%
rename from Microsoft.Toolkit.Uwp.UI.Controls.Design/MenuItemMetadata.cs
rename to Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/MenuItem.Metadata.cs
index 8a63b3992c1..a7ea2464f09 100644
--- a/Microsoft.Toolkit.Uwp.UI.Controls.Design/MenuItemMetadata.cs
+++ b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/MenuItem.Metadata.cs
@@ -2,48 +2,47 @@
// 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.UI.Controls.Design.Common;
-using Microsoft.Windows.Design;
-using Microsoft.Windows.Design.Metadata;
-using Microsoft.Windows.Design.PropertyEditing;
using System.ComponentModel;
+using Microsoft.Toolkit.Uwp.UI.Controls.Design.Properties;
+using Microsoft.VisualStudio.DesignTools.Extensibility;
+using Microsoft.VisualStudio.DesignTools.Extensibility.Metadata;
+using Microsoft.VisualStudio.DesignTools.Extensibility.PropertyEditing;
+
namespace Microsoft.Toolkit.Uwp.UI.Controls.Design
{
- internal class MenuItemMetadata : AttributeTableBuilder
- {
+ internal class MenuItemMetadata : AttributeTableBuilder
+ {
public MenuItemMetadata()
- : base()
- {
- AddCallback(typeof(MenuItem),
- b =>
- {
- b.AddCustomAttributes(nameof(MenuItem.Header),
- new PropertyOrderAttribute(PropertyOrder.Early),
- new CategoryAttribute(Properties.Resources.CategoryCommon)
- );
+ : base()
+ {
+ AddCallback(ControlTypes.MenuItem,
+ b =>
+ {
+ b.AddCustomAttributes(nameof(MenuItem.Header),
+ new PropertyOrderAttribute(PropertyOrder.Early),
+ new CategoryAttribute(Resources.CategoryCommon)
+ );
b.AddCustomAttributes(nameof(MenuItem.IsOpened),
- new CategoryAttribute(Properties.Resources.CategoryCommon)
+ new CategoryAttribute(Resources.CategoryCommon)
);
b.AddCustomAttributes(nameof(MenuItem.HeaderTemplate),
new EditorBrowsableAttribute(EditorBrowsableState.Advanced),
- new CategoryAttribute(Properties.Resources.CategoryCommon)
+ new CategoryAttribute(Resources.CategoryCommon)
);
b.AddCustomAttributes(nameof(MenuItem.Items),
new PropertyOrderAttribute(PropertyOrder.Early),
- new CategoryAttribute(Properties.Resources.CategoryCommon),
+ new CategoryAttribute(Resources.CategoryCommon),
//The following is necessary because this is a collection of an abstract type, so we help
//the designer with populating supported types that can be added to the collection
- new NewItemTypesAttribute(new System.Type[] {
- typeof(MenuItem),
- }),
+ new NewItemTypesAttribute(ControlTypes.MenuItem),
new AlternateContentPropertyAttribute()
);
b.AddCustomAttributes(new ToolboxCategoryAttribute(ToolboxCategoryPaths.Toolkit, false));
b.AddCustomAttributes(new ToolboxBrowsableAttribute(false));
- }
- );
- }
- }
+ }
+ );
+ }
+ }
}
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/MenuItem.Typedata.cs b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/MenuItem.Typedata.cs
new file mode 100644
index 00000000000..9d7ebfeb37e
--- /dev/null
+++ b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/MenuItem.Typedata.cs
@@ -0,0 +1,21 @@
+// 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;
+
+namespace Microsoft.Toolkit.Uwp.UI.Controls.Design
+{
+ internal static partial class ControlTypes
+ {
+ internal const string MenuItem = RootNamespace + "." + nameof(MenuItem);
+ }
+
+ internal static class MenuItem
+ {
+ internal const string Header = nameof(Header);
+ internal const string HeaderTemplate = nameof(HeaderTemplate);
+ internal const string IsOpened = nameof(IsOpened);
+ internal const string Items = nameof(Items);
+ }
+}
\ No newline at end of file
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.Design/OrbitViewMetadata.cs b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/OrbitView.Metadata.cs
similarity index 50%
rename from Microsoft.Toolkit.Uwp.UI.Controls.Design/OrbitViewMetadata.cs
rename to Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/OrbitView.Metadata.cs
index 5a6737e8612..d3168d21442 100644
--- a/Microsoft.Toolkit.Uwp.UI.Controls.Design/OrbitViewMetadata.cs
+++ b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/OrbitView.Metadata.cs
@@ -2,36 +2,37 @@
// 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.UI.Controls.Design.Common;
-using Microsoft.Windows.Design;
-using Microsoft.Windows.Design.Metadata;
-using Microsoft.Windows.Design.PropertyEditing;
using System.ComponentModel;
+using Microsoft.Toolkit.Uwp.UI.Controls.Design.Properties;
+
+using Microsoft.VisualStudio.DesignTools.Extensibility;
+using Microsoft.VisualStudio.DesignTools.Extensibility.Metadata;
+
namespace Microsoft.Toolkit.Uwp.UI.Controls.Design
{
- internal class OrbitViewMetadata : AttributeTableBuilder
- {
+ internal class OrbitViewMetadata : AttributeTableBuilder
+ {
public OrbitViewMetadata()
- : base()
- {
- AddCallback(typeof(Microsoft.Toolkit.Uwp.UI.Controls.OrbitView),
- b =>
+ : base()
+ {
+ AddCallback(ControlTypes.OrbitView,
+ b =>
{
- b.AddCustomAttributes(nameof(OrbitView.OrbitsEnabled), new CategoryAttribute(Properties.Resources.CategoryCommon));
- b.AddCustomAttributes(nameof(OrbitView.IsItemClickEnabled), new CategoryAttribute(Properties.Resources.CategoryCommon));
- b.AddCustomAttributes(nameof(OrbitView.AnchorsEnabled), new CategoryAttribute(Properties.Resources.CategoryCommon));
- b.AddCustomAttributes(nameof(OrbitView.MinItemSize), new CategoryAttribute(Properties.Resources.CategoryAppearance));
- b.AddCustomAttributes(nameof(OrbitView.MaxItemSize), new CategoryAttribute(Properties.Resources.CategoryAppearance));
- b.AddCustomAttributes(nameof(OrbitView.AnchorColor), new CategoryAttribute(Properties.Resources.CategoryBrush));
- b.AddCustomAttributes(nameof(OrbitView.OrbitColor), new CategoryAttribute(Properties.Resources.CategoryBrush));
- b.AddCustomAttributes(nameof(OrbitView.OrbitDashArray), new CategoryAttribute(Properties.Resources.CategoryCommon));
- b.AddCustomAttributes(nameof(OrbitView.AnchorThickness), new CategoryAttribute(Properties.Resources.CategoryAppearance));
- b.AddCustomAttributes(nameof(OrbitView.OrbitThickness), new CategoryAttribute(Properties.Resources.CategoryAppearance));
- b.AddCustomAttributes(nameof(OrbitView.CenterContent), new CategoryAttribute(Properties.Resources.CategoryCommon));
+ b.AddCustomAttributes(nameof(OrbitView.OrbitsEnabled), new CategoryAttribute(Resources.CategoryCommon));
+ b.AddCustomAttributes(nameof(OrbitView.IsItemClickEnabled), new CategoryAttribute(Resources.CategoryCommon));
+ b.AddCustomAttributes(nameof(OrbitView.AnchorsEnabled), new CategoryAttribute(Resources.CategoryCommon));
+ b.AddCustomAttributes(nameof(OrbitView.MinItemSize), new CategoryAttribute(Resources.CategoryAppearance));
+ b.AddCustomAttributes(nameof(OrbitView.MaxItemSize), new CategoryAttribute(Resources.CategoryAppearance));
+ b.AddCustomAttributes(nameof(OrbitView.AnchorColor), new CategoryAttribute(Resources.CategoryBrush));
+ b.AddCustomAttributes(nameof(OrbitView.OrbitColor), new CategoryAttribute(Resources.CategoryBrush));
+ b.AddCustomAttributes(nameof(OrbitView.OrbitDashArray), new CategoryAttribute(Resources.CategoryCommon));
+ b.AddCustomAttributes(nameof(OrbitView.AnchorThickness), new CategoryAttribute(Resources.CategoryAppearance));
+ b.AddCustomAttributes(nameof(OrbitView.OrbitThickness), new CategoryAttribute(Resources.CategoryAppearance));
+ b.AddCustomAttributes(nameof(OrbitView.CenterContent), new CategoryAttribute(Resources.CategoryCommon));
b.AddCustomAttributes(new ToolboxCategoryAttribute(ToolboxCategoryPaths.Toolkit, false));
- }
- );
- }
- }
+ }
+ );
+ }
+ }
}
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/OrbitView.Typedata.cs b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/OrbitView.Typedata.cs
new file mode 100644
index 00000000000..0e10f66fe5c
--- /dev/null
+++ b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/OrbitView.Typedata.cs
@@ -0,0 +1,28 @@
+// 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;
+
+namespace Microsoft.Toolkit.Uwp.UI.Controls.Design
+{
+ internal static partial class ControlTypes
+ {
+ internal const string OrbitView = RootNamespace + "." + nameof(OrbitView);
+ }
+
+ internal static class OrbitView
+ {
+ internal const string AnchorColor = nameof(AnchorColor);
+ internal const string AnchorsEnabled = nameof(AnchorsEnabled);
+ internal const string AnchorThickness = nameof(AnchorThickness);
+ internal const string CenterContent = nameof(CenterContent);
+ internal const string IsItemClickEnabled = nameof(IsItemClickEnabled);
+ internal const string MaxItemSize = nameof(MaxItemSize);
+ internal const string MinItemSize = nameof(MinItemSize);
+ internal const string OrbitColor = nameof(OrbitColor);
+ internal const string OrbitDashArray = nameof(OrbitDashArray);
+ internal const string OrbitsEnabled = nameof(OrbitsEnabled);
+ internal const string OrbitThickness = nameof(OrbitThickness);
+ }
+}
\ No newline at end of file
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.Design/RadialGaugeMetadata.cs b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/RadialGauge.Metadata.cs
similarity index 90%
rename from Microsoft.Toolkit.Uwp.UI.Controls.Design/RadialGaugeMetadata.cs
rename to Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/RadialGauge.Metadata.cs
index 2c351d6ad09..6fc555705ab 100644
--- a/Microsoft.Toolkit.Uwp.UI.Controls.Design/RadialGaugeMetadata.cs
+++ b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/RadialGauge.Metadata.cs
@@ -2,14 +2,13 @@
// 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.UI.Controls.Design.Common;
-using Microsoft.Windows.Design;
-using Microsoft.Windows.Design.Features;
-using Microsoft.Windows.Design.Metadata;
-using Microsoft.Windows.Design.Model;
-using Microsoft.Windows.Design.PropertyEditing;
using System.ComponentModel;
+using Microsoft.VisualStudio.DesignTools.Extensibility;
+using Microsoft.VisualStudio.DesignTools.Extensibility.Features;
+using Microsoft.VisualStudio.DesignTools.Extensibility.Metadata;
+using Microsoft.VisualStudio.DesignTools.Extensibility.Model;
+
namespace Microsoft.Toolkit.Uwp.UI.Controls.Design
{
internal class RadialGaugeDefaults : DefaultInitializer
@@ -21,12 +20,12 @@ public override void InitializeDefaults(ModelItem item)
}
internal class RadialGaugeMetadata : AttributeTableBuilder
- {
+ {
public RadialGaugeMetadata()
- : base()
- {
- AddCallback(typeof(Microsoft.Toolkit.Uwp.UI.Controls.RadialGauge),
- b =>
+ : base()
+ {
+ AddCallback(ControlTypes.RadialGauge,
+ b =>
{
b.AddCustomAttributes(new FeatureAttribute(typeof(RadialGaugeDefaults)));
b.AddCustomAttributes(nameof(RadialGauge.Minimum), new CategoryAttribute(Properties.Resources.CategoryCommon));
@@ -51,8 +50,8 @@ public RadialGaugeMetadata()
b.AddCustomAttributes(nameof(RadialGauge.MinAngle), new CategoryAttribute(Properties.Resources.CategoryAppearance));
b.AddCustomAttributes(nameof(RadialGauge.MaxAngle), new CategoryAttribute(Properties.Resources.CategoryAppearance));
b.AddCustomAttributes(new ToolboxCategoryAttribute(ToolboxCategoryPaths.Toolkit, false));
- }
- );
- }
- }
+ }
+ );
+ }
+ }
}
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/RadialGauge.Typedata.cs b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/RadialGauge.Typedata.cs
new file mode 100644
index 00000000000..61c73328e21
--- /dev/null
+++ b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/RadialGauge.Typedata.cs
@@ -0,0 +1,38 @@
+// 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;
+
+namespace Microsoft.Toolkit.Uwp.UI.Controls.Design
+{
+ internal static partial class ControlTypes
+ {
+ internal const string RadialGauge = RootNamespace + "." + nameof(RadialGauge);
+ }
+
+ internal static class RadialGauge
+ {
+ internal const string IsInteractive = nameof(IsInteractive);
+ internal const string MaxAngle = nameof(MaxAngle);
+ internal const string Maximum = nameof(Maximum);
+ internal const string MinAngle = nameof(MinAngle);
+ internal const string Minimum = nameof(Minimum);
+ internal const string NeedleBrush = nameof(NeedleBrush);
+ internal const string NeedleLength = nameof(NeedleLength);
+ internal const string NeedleWidth = nameof(NeedleWidth);
+ internal const string ScaleBrush = nameof(ScaleBrush);
+ internal const string ScalePadding = nameof(ScalePadding);
+ internal const string ScaleTickWidth = nameof(ScaleTickWidth);
+ internal const string ScaleWidth = nameof(ScaleWidth);
+ internal const string StepSize = nameof(StepSize);
+ internal const string TickBrush = nameof(TickBrush);
+ internal const string TickLength = nameof(TickLength);
+ internal const string TickSpacing = nameof(TickSpacing);
+ internal const string TickWidth = nameof(TickWidth);
+ internal const string TrailBrush = nameof(TrailBrush);
+ internal const string Unit = nameof(Unit);
+ internal const string Value = nameof(Value);
+ internal const string ValueStringFormat = nameof(ValueStringFormat);
+ }
+}
\ No newline at end of file
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.Design/RadialProgressBarMetadata.cs b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/RadialProgressBar.Metadata.cs
similarity index 72%
rename from Microsoft.Toolkit.Uwp.UI.Controls.Design/RadialProgressBarMetadata.cs
rename to Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/RadialProgressBar.Metadata.cs
index 304de2dee12..42200fd225a 100644
--- a/Microsoft.Toolkit.Uwp.UI.Controls.Design/RadialProgressBarMetadata.cs
+++ b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/RadialProgressBar.Metadata.cs
@@ -2,13 +2,11 @@
// 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.UI.Controls.Design.Common;
-using Microsoft.Windows.Design;
-using Microsoft.Windows.Design.Features;
-using Microsoft.Windows.Design.Metadata;
-using Microsoft.Windows.Design.Model;
-using Microsoft.Windows.Design.PropertyEditing;
using System.ComponentModel;
+using Microsoft.VisualStudio.DesignTools.Extensibility;
+using Microsoft.VisualStudio.DesignTools.Extensibility.Features;
+using Microsoft.VisualStudio.DesignTools.Extensibility.Metadata;
+using Microsoft.VisualStudio.DesignTools.Extensibility.Model;
namespace Microsoft.Toolkit.Uwp.UI.Controls.Design
{
@@ -21,19 +19,19 @@ public override void InitializeDefaults(ModelItem item)
}
internal class RadialProgressBarMetadata : AttributeTableBuilder
- {
+ {
public RadialProgressBarMetadata()
- : base()
- {
- AddCallback(typeof(Microsoft.Toolkit.Uwp.UI.Controls.RadialProgressBar),
- b =>
- {
+ : base()
+ {
+ AddCallback(ControlTypes.RadialProgressBar,
+ b =>
+ {
b.AddCustomAttributes(new FeatureAttribute(typeof(RadialProgressBarDefaults)));
b.AddCustomAttributes(nameof(RadialProgressBar.Thickness), new CategoryAttribute(Properties.Resources.CategoryAppearance));
b.AddCustomAttributes(nameof(RadialProgressBar.Outline), new CategoryAttribute(Properties.Resources.CategoryBrush));
b.AddCustomAttributes(new ToolboxCategoryAttribute(ToolboxCategoryPaths.Toolkit, false));
- }
- );
- }
- }
+ }
+ );
+ }
+ }
}
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/RadialProgressBar.Typedata.cs b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/RadialProgressBar.Typedata.cs
new file mode 100644
index 00000000000..2976c3d19cf
--- /dev/null
+++ b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/RadialProgressBar.Typedata.cs
@@ -0,0 +1,20 @@
+// 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;
+
+namespace Microsoft.Toolkit.Uwp.UI.Controls.Design
+{
+ internal static partial class ControlTypes
+ {
+ internal const string RadialProgressBar = RootNamespace + "." + nameof(RadialProgressBar);
+ }
+
+ internal static class RadialProgressBar
+ {
+ internal const string Outline = nameof(Outline);
+ internal const string Thickness = nameof(Thickness);
+ internal const string Value = nameof(Value);
+ }
+}
\ No newline at end of file
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.Design/RangeSelectorMetadata.cs b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/RangeSelector.Metadata.cs
similarity index 51%
rename from Microsoft.Toolkit.Uwp.UI.Controls.Design/RangeSelectorMetadata.cs
rename to Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/RangeSelector.Metadata.cs
index a5075081e7e..2958a9db89d 100644
--- a/Microsoft.Toolkit.Uwp.UI.Controls.Design/RangeSelectorMetadata.cs
+++ b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/RangeSelector.Metadata.cs
@@ -2,29 +2,30 @@
// 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.UI.Controls.Design.Common;
-using Microsoft.Windows.Design;
-using Microsoft.Windows.Design.Metadata;
-using Microsoft.Windows.Design.PropertyEditing;
using System.ComponentModel;
+using Microsoft.Toolkit.Uwp.UI.Controls.Design.Properties;
+
+using Microsoft.VisualStudio.DesignTools.Extensibility;
+using Microsoft.VisualStudio.DesignTools.Extensibility.Metadata;
+
namespace Microsoft.Toolkit.Uwp.UI.Controls.Design
{
- internal class RangeSelectorMetadata : AttributeTableBuilder
- {
+ internal class RangeSelectorMetadata : AttributeTableBuilder
+ {
public RangeSelectorMetadata()
- : base()
- {
- AddCallback(typeof(Microsoft.Toolkit.Uwp.UI.Controls.RangeSelector),
- b =>
- {
- b.AddCustomAttributes(nameof(RangeSelector.Minimum), new CategoryAttribute(Properties.Resources.CategoryCommon));
- b.AddCustomAttributes(nameof(RangeSelector.Maximum), new CategoryAttribute(Properties.Resources.CategoryCommon));
- b.AddCustomAttributes(nameof(RangeSelector.RangeMin), new CategoryAttribute(Properties.Resources.CategoryCommon));
- b.AddCustomAttributes(nameof(RangeSelector.RangeMax), new CategoryAttribute(Properties.Resources.CategoryCommon));
+ : base()
+ {
+ AddCallback(ControlTypes.RangeSelector,
+ b =>
+ {
+ b.AddCustomAttributes(nameof(RangeSelector.Minimum), new CategoryAttribute(Resources.CategoryCommon));
+ b.AddCustomAttributes(nameof(RangeSelector.Maximum), new CategoryAttribute(Resources.CategoryCommon));
+ b.AddCustomAttributes(nameof(RangeSelector.RangeMin), new CategoryAttribute(Resources.CategoryCommon));
+ b.AddCustomAttributes(nameof(RangeSelector.RangeMax), new CategoryAttribute(Resources.CategoryCommon));
b.AddCustomAttributes(new ToolboxCategoryAttribute(ToolboxCategoryPaths.Toolkit, false));
- }
- );
- }
- }
+ }
+ );
+ }
+ }
}
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/RangeSelector.Typedata.cs b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/RangeSelector.Typedata.cs
new file mode 100644
index 00000000000..5e20f55ae81
--- /dev/null
+++ b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/RangeSelector.Typedata.cs
@@ -0,0 +1,21 @@
+// 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;
+
+namespace Microsoft.Toolkit.Uwp.UI.Controls.Design
+{
+ internal static partial class ControlTypes
+ {
+ internal const string RangeSelector = RootNamespace + "." + nameof(RangeSelector);
+ }
+
+ internal static class RangeSelector
+ {
+ internal const string Maximum = nameof(Maximum);
+ internal const string Minimum = nameof(Minimum);
+ internal const string RangeMax = nameof(RangeMax);
+ internal const string RangeMin = nameof(RangeMin);
+ }
+}
\ No newline at end of file
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.Design/RotatorTileMetadata.cs b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/RotatorTile.Metadata.cs
similarity index 52%
rename from Microsoft.Toolkit.Uwp.UI.Controls.Design/RotatorTileMetadata.cs
rename to Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/RotatorTile.Metadata.cs
index e2541054e6d..6fd727eb5f0 100644
--- a/Microsoft.Toolkit.Uwp.UI.Controls.Design/RotatorTileMetadata.cs
+++ b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/RotatorTile.Metadata.cs
@@ -2,34 +2,35 @@
// 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.UI.Controls.Design.Common;
-using Microsoft.Windows.Design;
-using Microsoft.Windows.Design.Metadata;
-using Microsoft.Windows.Design.PropertyEditing;
using System.ComponentModel;
+using Microsoft.Toolkit.Uwp.UI.Controls.Design.Properties;
+
+using Microsoft.VisualStudio.DesignTools.Extensibility;
+using Microsoft.VisualStudio.DesignTools.Extensibility.Metadata;
+
namespace Microsoft.Toolkit.Uwp.UI.Controls.Design
{
- internal class RotatorTileMetadata : AttributeTableBuilder
- {
+ internal class RotatorTileMetadata : AttributeTableBuilder
+ {
public RotatorTileMetadata()
- : base()
- {
- AddCallback(typeof(Microsoft.Toolkit.Uwp.UI.Controls.RotatorTile),
- b =>
- {
- b.AddCustomAttributes(nameof(RotatorTile.ExtraRandomDuration), new CategoryAttribute(Properties.Resources.CategoryCommon));
- b.AddCustomAttributes(nameof(RotatorTile.RotationDelay), new CategoryAttribute(Properties.Resources.CategoryCommon));
- b.AddCustomAttributes(nameof(RotatorTile.ItemsSource), new CategoryAttribute(Properties.Resources.CategoryCommon));
- b.AddCustomAttributes(nameof(RotatorTile.ItemTemplate),
- new CategoryAttribute(Properties.Resources.CategoryAppearance),
+ : base()
+ {
+ AddCallback(ControlTypes.RotatorTile,
+ b =>
+ {
+ b.AddCustomAttributes(nameof(RotatorTile.ExtraRandomDuration), new CategoryAttribute(Resources.CategoryCommon));
+ b.AddCustomAttributes(nameof(RotatorTile.RotationDelay), new CategoryAttribute(Resources.CategoryCommon));
+ b.AddCustomAttributes(nameof(RotatorTile.ItemsSource), new CategoryAttribute(Resources.CategoryCommon));
+ b.AddCustomAttributes(nameof(RotatorTile.ItemTemplate),
+ new CategoryAttribute(Resources.CategoryAppearance),
new EditorBrowsableAttribute(EditorBrowsableState.Advanced)
);
- b.AddCustomAttributes(nameof(RotatorTile.RotateDirection), new CategoryAttribute(Properties.Resources.CategoryCommon));
- b.AddCustomAttributes(nameof(RotatorTile.CurrentItem), new CategoryAttribute(Properties.Resources.CategoryCommon));
+ b.AddCustomAttributes(nameof(RotatorTile.RotateDirection), new CategoryAttribute(Resources.CategoryCommon));
+ b.AddCustomAttributes(nameof(RotatorTile.CurrentItem), new CategoryAttribute(Resources.CategoryCommon));
b.AddCustomAttributes(new ToolboxCategoryAttribute(ToolboxCategoryPaths.Toolkit, false));
- }
- );
- }
- }
+ }
+ );
+ }
+ }
}
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/RotatorTile.Typedata.cs b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/RotatorTile.Typedata.cs
new file mode 100644
index 00000000000..a24a1e76f1c
--- /dev/null
+++ b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/RotatorTile.Typedata.cs
@@ -0,0 +1,23 @@
+// 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;
+
+namespace Microsoft.Toolkit.Uwp.UI.Controls.Design
+{
+ internal static partial class ControlTypes
+ {
+ internal const string RotatorTile = RootNamespace + "." + nameof(RotatorTile);
+ }
+
+ internal static class RotatorTile
+ {
+ internal const string CurrentItem = nameof(CurrentItem);
+ internal const string ExtraRandomDuration = nameof(ExtraRandomDuration);
+ internal const string ItemsSource = nameof(ItemsSource);
+ internal const string ItemTemplate = nameof(ItemTemplate);
+ internal const string RotateDirection = nameof(RotateDirection);
+ internal const string RotationDelay = nameof(RotationDelay);
+ }
+}
\ No newline at end of file
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.Design/ScrollHeaderMetadata.cs b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/ScrollHeader.Metadata.cs
similarity index 51%
rename from Microsoft.Toolkit.Uwp.UI.Controls.Design/ScrollHeaderMetadata.cs
rename to Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/ScrollHeader.Metadata.cs
index dae0fdf1892..db36b23c826 100644
--- a/Microsoft.Toolkit.Uwp.UI.Controls.Design/ScrollHeaderMetadata.cs
+++ b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/ScrollHeader.Metadata.cs
@@ -2,26 +2,27 @@
// 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.UI.Controls.Design.Common;
-using Microsoft.Windows.Design;
-using Microsoft.Windows.Design.Metadata;
-using Microsoft.Windows.Design.PropertyEditing;
using System.ComponentModel;
+using Microsoft.Toolkit.Uwp.UI.Controls.Design.Properties;
+
+using Microsoft.VisualStudio.DesignTools.Extensibility;
+using Microsoft.VisualStudio.DesignTools.Extensibility.Metadata;
+
namespace Microsoft.Toolkit.Uwp.UI.Controls.Design
{
- internal class ScrollHeaderMetadata : AttributeTableBuilder
- {
+ internal class ScrollHeaderMetadata : AttributeTableBuilder
+ {
public ScrollHeaderMetadata()
- : base()
- {
- AddCallback(typeof(Microsoft.Toolkit.Uwp.UI.Controls.ScrollHeader),
- b =>
- {
- b.AddCustomAttributes(nameof(ScrollHeader.Mode), new CategoryAttribute(Properties.Resources.CategoryCommon));
+ : base()
+ {
+ AddCallback(ControlTypes.ScrollHeader,
+ b =>
+ {
+ b.AddCustomAttributes(nameof(ScrollHeader.Mode), new CategoryAttribute(Resources.CategoryCommon));
b.AddCustomAttributes(new ToolboxCategoryAttribute(ToolboxCategoryPaths.Toolkit, false));
- }
- );
- }
- }
+ }
+ );
+ }
+ }
}
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/ScrollHeader.Typedata.cs b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/ScrollHeader.Typedata.cs
new file mode 100644
index 00000000000..2bca70f75b2
--- /dev/null
+++ b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/ScrollHeader.Typedata.cs
@@ -0,0 +1,18 @@
+// 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;
+
+namespace Microsoft.Toolkit.Uwp.UI.Controls.Design
+{
+ internal static partial class ControlTypes
+ {
+ internal const string ScrollHeader = RootNamespace + "." + nameof(ScrollHeader);
+ }
+
+ internal static class ScrollHeader
+ {
+ internal const string Mode = nameof(Mode);
+ }
+}
\ No newline at end of file
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.Design/TextToolbarMetadata.cs b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/TextToolbar.Metadata.cs
similarity index 55%
rename from Microsoft.Toolkit.Uwp.UI.Controls.Design/TextToolbarMetadata.cs
rename to Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/TextToolbar.Metadata.cs
index 47b52f1dd14..1dfc57bc7c4 100644
--- a/Microsoft.Toolkit.Uwp.UI.Controls.Design/TextToolbarMetadata.cs
+++ b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/TextToolbar.Metadata.cs
@@ -2,30 +2,31 @@
// 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.UI.Controls.Design.Common;
-using Microsoft.Windows.Design;
-using Microsoft.Windows.Design.Metadata;
-using Microsoft.Windows.Design.PropertyEditing;
using System.ComponentModel;
+using Microsoft.Toolkit.Uwp.UI.Controls.Design.Properties;
+
+using Microsoft.VisualStudio.DesignTools.Extensibility;
+using Microsoft.VisualStudio.DesignTools.Extensibility.Metadata;
+
namespace Microsoft.Toolkit.Uwp.UI.Controls.Design
{
internal class TextToolbarMetadata : AttributeTableBuilder
- {
+ {
public TextToolbarMetadata()
- : base()
- {
- AddCallback(typeof(Microsoft.Toolkit.Uwp.UI.Controls.TextToolbar),
- b =>
- {
- b.AddCustomAttributes(nameof(TextToolbar.Editor), new CategoryAttribute(Properties.Resources.CategoryCommon));
- b.AddCustomAttributes(nameof(TextToolbar.Formatter), new CategoryAttribute(Properties.Resources.CategoryCommon));
- b.AddCustomAttributes(nameof(TextToolbar.DefaultButtons), new CategoryAttribute(Properties.Resources.CategoryCommon));
- b.AddCustomAttributes(nameof(TextToolbar.CustomButtons), new CategoryAttribute(Properties.Resources.CategoryCommon));
- b.AddCustomAttributes(nameof(TextToolbar.ButtonModifications), new CategoryAttribute(Properties.Resources.CategoryCommon));
+ : base()
+ {
+ AddCallback(ControlTypes.TextToolbar,
+ b =>
+ {
+ b.AddCustomAttributes(nameof(TextToolbar.Editor), new CategoryAttribute(Resources.CategoryCommon));
+ b.AddCustomAttributes(nameof(TextToolbar.Formatter), new CategoryAttribute(Resources.CategoryCommon));
+ b.AddCustomAttributes(nameof(TextToolbar.DefaultButtons), new CategoryAttribute(Resources.CategoryCommon));
+ b.AddCustomAttributes(nameof(TextToolbar.CustomButtons), new CategoryAttribute(Resources.CategoryCommon));
+ b.AddCustomAttributes(nameof(TextToolbar.ButtonModifications), new CategoryAttribute(Resources.CategoryCommon));
b.AddCustomAttributes(new ToolboxCategoryAttribute(ToolboxCategoryPaths.Toolkit, false));
- }
- );
- }
- }
+ }
+ );
+ }
+ }
}
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/TextToolbar.Typedata.cs b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/TextToolbar.Typedata.cs
new file mode 100644
index 00000000000..26b36cba29f
--- /dev/null
+++ b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/TextToolbar.Typedata.cs
@@ -0,0 +1,23 @@
+// 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;
+
+namespace Microsoft.Toolkit.Uwp.UI.Controls.Design
+{
+ internal static partial class ControlTypes
+ {
+ internal const string TextToolbar = RootNamespace + "." + nameof(TextToolbar);
+ }
+
+ internal static class TextToolbar
+ {
+ internal const string ButtonModifications = nameof(ButtonModifications);
+ internal const string CustomButtons = nameof(CustomButtons);
+ internal const string DefaultButtons = nameof(DefaultButtons);
+ internal const string Editor = nameof(Editor);
+ internal const string Format = nameof(Format);
+ internal const string Formatter = nameof(Formatter);
+ }
+}
\ No newline at end of file
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/TileControl.Metadata.cs b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/TileControl.Metadata.cs
new file mode 100644
index 00000000000..3b971eba6c6
--- /dev/null
+++ b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/TileControl.Metadata.cs
@@ -0,0 +1,38 @@
+// 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.ComponentModel;
+
+using Microsoft.Toolkit.Uwp.UI.Controls.Design.Properties;
+
+using Microsoft.VisualStudio.DesignTools.Extensibility;
+using Microsoft.VisualStudio.DesignTools.Extensibility.Metadata;
+
+namespace Microsoft.Toolkit.Uwp.UI.Controls.Design
+{
+ internal class TileControlMetadata : AttributeTableBuilder
+ {
+ public TileControlMetadata()
+ : base()
+ {
+ AddCallback(ControlTypes.TileControl,
+ b =>
+ {
+ b.AddCustomAttributes(nameof(TileControl.ScrollViewerContainer), new CategoryAttribute(Resources.CategoryCommon));
+ b.AddCustomAttributes(nameof(TileControl.ImageAlignment), new CategoryAttribute(Resources.CategoryCommon));
+ b.AddCustomAttributes(nameof(TileControl.ImageSource), new CategoryAttribute(Resources.CategoryCommon));
+ b.AddCustomAttributes(nameof(TileControl.ScrollOrientation), new CategoryAttribute(Resources.CategoryCommon));
+ b.AddCustomAttributes(nameof(TileControl.OffsetX), new CategoryAttribute(Resources.CategoryCommon));
+ b.AddCustomAttributes(nameof(TileControl.OffsetY), new CategoryAttribute(Resources.CategoryCommon));
+ b.AddCustomAttributes(nameof(TileControl.ParallaxSpeedRatio), new CategoryAttribute(Resources.CategoryCommon));
+ b.AddCustomAttributes(nameof(TileControl.IsAnimated), new CategoryAttribute(Resources.CategoryCommon));
+ b.AddCustomAttributes(nameof(TileControl.AnimationStepX), new CategoryAttribute(Resources.CategoryCommon));
+ b.AddCustomAttributes(nameof(TileControl.AnimationStepY), new CategoryAttribute(Resources.CategoryCommon));
+ b.AddCustomAttributes(nameof(TileControl.AnimationDuration), new CategoryAttribute(Resources.CategoryCommon));
+ b.AddCustomAttributes(new ToolboxCategoryAttribute(ToolboxCategoryPaths.Toolkit, false));
+ }
+ );
+ }
+ }
+}
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/TileControl.Typedata.cs b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/TileControl.Typedata.cs
new file mode 100644
index 00000000000..cbb97da25e5
--- /dev/null
+++ b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/TileControl.Typedata.cs
@@ -0,0 +1,28 @@
+// 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;
+
+namespace Microsoft.Toolkit.Uwp.UI.Controls.Design
+{
+ internal static partial class ControlTypes
+ {
+ internal const string TileControl = RootNamespace + "." + nameof(TileControl);
+ }
+
+ internal static class TileControl
+ {
+ internal const string AnimationDuration = nameof(AnimationDuration);
+ internal const string AnimationStepX = nameof(AnimationStepX);
+ internal const string AnimationStepY = nameof(AnimationStepY);
+ internal const string ImageAlignment = nameof(ImageAlignment);
+ internal const string ImageSource = nameof(ImageSource);
+ internal const string IsAnimated = nameof(IsAnimated);
+ internal const string OffsetX = nameof(OffsetX);
+ internal const string OffsetY = nameof(OffsetY);
+ internal const string ParallaxSpeedRatio = nameof(ParallaxSpeedRatio);
+ internal const string ScrollOrientation = nameof(ScrollOrientation);
+ internal const string ScrollViewerContainer = nameof(ScrollViewerContainer);
+ }
+}
\ No newline at end of file
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/WrapPanel.Metadata.cs b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/WrapPanel.Metadata.cs
new file mode 100644
index 00000000000..3d45d889c7b
--- /dev/null
+++ b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/WrapPanel.Metadata.cs
@@ -0,0 +1,36 @@
+// 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.ComponentModel;
+
+using Microsoft.Toolkit.Uwp.UI.Controls.Design.Properties;
+
+using Microsoft.VisualStudio.DesignTools.Extensibility;
+using Microsoft.VisualStudio.DesignTools.Extensibility.Metadata;
+
+namespace Microsoft.Toolkit.Uwp.UI.Controls.Design
+{
+ internal class WrapPanelMetadata : AttributeTableBuilder
+ {
+ public WrapPanelMetadata()
+ : base()
+ {
+ AddCallback(ControlTypes.WrapPanel,
+ b =>
+ {
+ b.AddCustomAttributes(nameof(WrapPanel.Orientation),
+ new CategoryAttribute(Resources.CategoryLayout)
+ );
+ b.AddCustomAttributes(nameof(WrapPanel.HorizontalSpacing),
+ new CategoryAttribute(Resources.CategoryLayout)
+ );
+ b.AddCustomAttributes(nameof(WrapPanel.VerticalSpacing),
+ new CategoryAttribute(Resources.CategoryLayout)
+ );
+ b.AddCustomAttributes(new ToolboxCategoryAttribute(ToolboxCategoryPaths.Toolkit, false));
+ }
+ );
+ }
+ }
+}
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/WrapPanel.Typedata.cs b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/WrapPanel.Typedata.cs
new file mode 100644
index 00000000000..a0c4c11647d
--- /dev/null
+++ b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Controls/WrapPanel.Typedata.cs
@@ -0,0 +1,20 @@
+// 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;
+
+namespace Microsoft.Toolkit.Uwp.UI.Controls.Design
+{
+ internal static partial class ControlTypes
+ {
+ internal const string WrapPanel = RootNamespace + "." + nameof(WrapPanel);
+ }
+
+ internal static class WrapPanel
+ {
+ internal const string HorizontalSpacing = nameof(HorizontalSpacing);
+ internal const string Orientation = nameof(Orientation);
+ internal const string VerticalSpacing = nameof(VerticalSpacing);
+ }
+}
\ No newline at end of file
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.Design/InAppNotificationMetadata.cs b/Microsoft.Toolkit.Uwp.UI.Controls.Design/InAppNotificationMetadata.cs
deleted file mode 100644
index ef9ac4f00c4..00000000000
--- a/Microsoft.Toolkit.Uwp.UI.Controls.Design/InAppNotificationMetadata.cs
+++ /dev/null
@@ -1,27 +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.UI.Controls.Design.Common;
-using Microsoft.Windows.Design;
-using Microsoft.Windows.Design.Metadata;
-using Microsoft.Windows.Design.PropertyEditing;
-using System.ComponentModel;
-
-namespace Microsoft.Toolkit.Uwp.UI.Controls.Design
-{
- internal class InAppNotificationMetadata : AttributeTableBuilder
- {
- public InAppNotificationMetadata()
- : base()
- {
- AddCallback(typeof(Microsoft.Toolkit.Uwp.UI.Controls.InAppNotification),
- b =>
- {
- b.AddCustomAttributes(nameof(InAppNotification.ShowDismissButton), new CategoryAttribute(Properties.Resources.CategoryAppearance));
- b.AddCustomAttributes(new ToolboxCategoryAttribute(ToolboxCategoryPaths.Toolkit, false));
- }
- );
- }
- }
-}
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.Design/LayoutTransitionControlMetadata.cs b/Microsoft.Toolkit.Uwp.UI.Controls.Design/LayoutTransitionControlMetadata.cs
deleted file mode 100644
index c0a095ea8c3..00000000000
--- a/Microsoft.Toolkit.Uwp.UI.Controls.Design/LayoutTransitionControlMetadata.cs
+++ /dev/null
@@ -1,28 +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.UI.Controls.Design.Common;
-using Microsoft.Windows.Design;
-using Microsoft.Windows.Design.Metadata;
-using Microsoft.Windows.Design.PropertyEditing;
-using System.ComponentModel;
-
-namespace Microsoft.Toolkit.Uwp.UI.Controls.Design
-{
- internal class LayoutTransformControlMetadata : AttributeTableBuilder
- {
- public LayoutTransformControlMetadata()
- : base()
- {
- AddCallback(typeof(Microsoft.Toolkit.Uwp.UI.Controls.LayoutTransformControl),
- b =>
- {
- b.AddCustomAttributes(nameof(LayoutTransformControl.Child), new CategoryAttribute(Properties.Resources.CategoryCommon));
- b.AddCustomAttributes(nameof(LayoutTransformControl.Transform), new CategoryAttribute(Properties.Resources.CategoryCommon));
- b.AddCustomAttributes(new ToolboxCategoryAttribute(ToolboxCategoryPaths.Toolkit, false));
- }
- );
- }
- }
-}
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.Design/MenuMetadata.cs b/Microsoft.Toolkit.Uwp.UI.Controls.Design/MenuMetadata.cs
deleted file mode 100644
index 164c4fa7b70..00000000000
--- a/Microsoft.Toolkit.Uwp.UI.Controls.Design/MenuMetadata.cs
+++ /dev/null
@@ -1,36 +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.UI.Controls.Design.Common;
-using Microsoft.Windows.Design;
-using Microsoft.Windows.Design.Metadata;
-using Microsoft.Windows.Design.PropertyEditing;
-using System.ComponentModel;
-
-namespace Microsoft.Toolkit.Uwp.UI.Controls.Design
-{
- internal class MenuMetadata : AttributeTableBuilder
- {
- public MenuMetadata()
- : base()
- {
- AddCallback(typeof(Microsoft.Toolkit.Uwp.UI.Controls.Menu),
- b =>
- {
- b.AddCustomAttributes(nameof(Menu.Items),
- new PropertyOrderAttribute(PropertyOrder.Early),
- new CategoryAttribute(Properties.Resources.CategoryCommon),
- //The following is necessary because this is a collection of an abstract type, so we help
- //the designer with populating supported types that can be added to the collection
- new NewItemTypesAttribute(new System.Type[] {
- typeof(MenuItem),
- }),
- new AlternateContentPropertyAttribute()
- );
- b.AddCustomAttributes(new ToolboxCategoryAttribute(ToolboxCategoryPaths.Toolkit, false));
- }
- );
- }
- }
-}
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.Design/MetadataRegistration.cs b/Microsoft.Toolkit.Uwp.UI.Controls.Design/MetadataRegistration.cs
index d7834cc6843..2b755e8893f 100644
--- a/Microsoft.Toolkit.Uwp.UI.Controls.Design/MetadataRegistration.cs
+++ b/Microsoft.Toolkit.Uwp.UI.Controls.Design/MetadataRegistration.cs
@@ -4,43 +4,34 @@
using System;
using System.Reflection;
-using Microsoft.Windows.Design.Metadata;
using Microsoft.Toolkit.Uwp.Design.Common;
+using Microsoft.Toolkit.Uwp.UI.Controls.Design;
-[assembly: ProvideMetadata(typeof(Microsoft.Toolkit.Uwp.UI.Controls.Design.MetadataRegistration))]
+using Microsoft.VisualStudio.DesignTools.Extensibility.Metadata;
+
+[assembly: ProvideMetadata(typeof(MetadataRegistration))]
namespace Microsoft.Toolkit.Uwp.UI.Controls.Design
{
- public class MetadataRegistration : MetadataRegistrationBase, IProvideAttributeTable
- {
- public MetadataRegistration() : base()
- {
- // Note:
- // The default constructor sets value of AssemblyFullName and
- // XmlResourceName used by MetadataRegistrationBase.AddDescriptions().
- // The convention here is that the in .design.csproj
- // (or Default namespace in Project -> Properties -> Application tab)
- // must be the same as runtime assembly's main namespace (t.Namespace)
- // plus .Design.
- Type t = typeof(Microsoft.Toolkit.Uwp.UI.Controls.GridSplitter);
- AssemblyName an = t.Assembly.GetName();
- AssemblyFullName = ", " + an.FullName;
- XmlResourceName = t.Namespace + ".Design." + an.Name + ".xml";
- }
-
- #region IProvideAttributeTable Members
+ public class MetadataRegistration : MetadataRegistrationBase
+ {
+ public MetadataRegistration() : base()
+ {
+ // Note:
+ // The default constructor sets value of 'AssemblyFullName' and
+ // 'XmlResourceName' used by 'MetadataRegistrationBase.AddDescriptions()'.
+ // The convention here is that the in '.DesignTools.csproj'
+ // (or Default namespace in Project -> Properties -> Application tab)
+ // must be the same as runtime assembly's main namespace plus ".Design".
+ Type thisType = this.GetType();
+ AssemblyName designLib = thisType.Assembly.GetName();
- ///
- /// Gets the AttributeTable for design time metadata.
- ///
- public AttributeTable AttributeTable
- {
- get
- {
- return BuildAttributeTable();
- }
- }
+ string annexString = ".DesignTools";
+ int annexStart = designLib.Name.LastIndexOf(annexString);
+ string controlLibName = designLib.Name.Remove(annexStart, annexString.Length);
- #endregion
- }
+ AssemblyFullName = designLib.FullName;
+ XmlResourceName = $"{thisType.Namespace}{controlLibName}.xml";
+ }
+ }
}
\ No newline at end of file
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.Design/Microsoft.Toolkit.Uwp.UI.Controls.Design.csproj b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Microsoft.Toolkit.Uwp.UI.Controls.DesignTools.csproj
similarity index 61%
rename from Microsoft.Toolkit.Uwp.UI.Controls.Design/Microsoft.Toolkit.Uwp.UI.Controls.Design.csproj
rename to Microsoft.Toolkit.Uwp.UI.Controls.Design/Microsoft.Toolkit.Uwp.UI.Controls.DesignTools.csproj
index 1201d323388..cb7387f0f66 100644
--- a/Microsoft.Toolkit.Uwp.UI.Controls.Design/Microsoft.Toolkit.Uwp.UI.Controls.Design.csproj
+++ b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Microsoft.Toolkit.Uwp.UI.Controls.DesignTools.csproj
@@ -8,22 +8,18 @@
LibraryPropertiesMicrosoft.Toolkit.Uwp.UI.Controls.Design
- Microsoft.Toolkit.Uwp.UI.Controls.Design
- v4.7.2
+ Microsoft.Toolkit.Uwp.UI.Controls.DesignTools512
-
- $(NoWarn);0618
- $(AssetTargetFallback);uap10.0.17763
-
- 8.1
+ v4.7.2
+ falsetrue..\Microsoft.Toolkit.Uwp.UI.Controls\bin\Debug\uap10.0.17763\Design\fullfalse
- DEBUG;TRACE
+ TRACE;DEBUGx86
@@ -34,18 +30,19 @@
TRACE
- false
+ $(NoWarn);0618
+ $(AssetTargetFallback);uap10.0.17763
-
+ FalseFalse
-
+ FalseFalse
@@ -63,12 +60,6 @@
-
- {e9faabfb-d726-42c1-83c1-cb46a29fea81}
- Microsoft.Toolkit.Uwp.UI.Controls
- False
- true
-
@@ -85,24 +76,56 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Code
@@ -111,34 +134,16 @@
TrueResources.resx
-
- True
- Settings.settings
- True
-
-
-
-
-
-
-
-
-
- ResXFileCodeGeneratorResources.Designer.cs
-
- SettingsSingleFileGenerator
- Settings.Designer.cs
-
Microsoft.Toolkit.Uwp.UI.Controls.xml
- Designer
+ False
@@ -146,7 +151,6 @@
-
-
-
+
+
\ No newline at end of file
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.Design/Properties/AssemblyInfo.cs b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Properties/AssemblyInfo.cs
index c4763b5af16..bfa162fde30 100644
--- a/Microsoft.Toolkit.Uwp.UI.Controls.Design/Properties/AssemblyInfo.cs
+++ b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Properties/AssemblyInfo.cs
@@ -3,12 +3,9 @@
// See the LICENSE file in the project root for more information.
using System.Reflection;
-using System.Resources;
-using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
-using System.Windows;
-// General Information about an assembly is controlled through the following
+// 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: AssemblyTitle("Windows Community Toolkit Controls (Design)")]
@@ -20,12 +17,12 @@
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
-//In order to begin building localizable applications, set
+//In order to begin building localizable applications, set
//CultureYouAreCodingWith in your .csproj file
//inside a . For example, if you are using US English
//in your source files, set the to en-US. Then uncomment
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.Design/Properties/Settings.Designer.cs b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Properties/Settings.Designer.cs
deleted file mode 100644
index 662fe0ad430..00000000000
--- a/Microsoft.Toolkit.Uwp.UI.Controls.Design/Properties/Settings.Designer.cs
+++ /dev/null
@@ -1,26 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-// Runtime Version:4.0.30319.42000
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-namespace Microsoft.Toolkit.Uwp.UI.Controls.Design.Properties {
-
-
- [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.3.0.0")]
- internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
-
- private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
-
- public static Settings Default {
- get {
- return defaultInstance;
- }
- }
- }
-}
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.Design/Properties/Settings.settings b/Microsoft.Toolkit.Uwp.UI.Controls.Design/Properties/Settings.settings
deleted file mode 100644
index 033d7a5e9e2..00000000000
--- a/Microsoft.Toolkit.Uwp.UI.Controls.Design/Properties/Settings.settings
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.Design/TileControlMetadata.cs b/Microsoft.Toolkit.Uwp.UI.Controls.Design/TileControlMetadata.cs
deleted file mode 100644
index f62d889a9b9..00000000000
--- a/Microsoft.Toolkit.Uwp.UI.Controls.Design/TileControlMetadata.cs
+++ /dev/null
@@ -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.UI.Controls.Design.Common;
-using Microsoft.Windows.Design;
-using Microsoft.Windows.Design.Metadata;
-using Microsoft.Windows.Design.PropertyEditing;
-using System.ComponentModel;
-
-namespace Microsoft.Toolkit.Uwp.UI.Controls.Design
-{
- internal class TileControlMetadata : AttributeTableBuilder
- {
- public TileControlMetadata()
- : base()
- {
- AddCallback(typeof(Microsoft.Toolkit.Uwp.UI.Controls.TileControl),
- b =>
- {
- b.AddCustomAttributes(nameof(TileControl.ScrollViewerContainer), new CategoryAttribute(Properties.Resources.CategoryCommon));
- b.AddCustomAttributes(nameof(TileControl.ImageAlignment), new CategoryAttribute(Properties.Resources.CategoryCommon));
- b.AddCustomAttributes(nameof(TileControl.ImageSource), new CategoryAttribute(Properties.Resources.CategoryCommon));
- b.AddCustomAttributes(nameof(TileControl.ScrollOrientation), new CategoryAttribute(Properties.Resources.CategoryCommon));
- b.AddCustomAttributes(nameof(TileControl.OffsetX), new CategoryAttribute(Properties.Resources.CategoryCommon));
- b.AddCustomAttributes(nameof(TileControl.OffsetY), new CategoryAttribute(Properties.Resources.CategoryCommon));
- b.AddCustomAttributes(nameof(TileControl.ParallaxSpeedRatio), new CategoryAttribute(Properties.Resources.CategoryCommon));
- b.AddCustomAttributes(nameof(TileControl.IsAnimated), new CategoryAttribute(Properties.Resources.CategoryCommon));
- b.AddCustomAttributes(nameof(TileControl.AnimationStepX), new CategoryAttribute(Properties.Resources.CategoryCommon));
- b.AddCustomAttributes(nameof(TileControl.AnimationStepY), new CategoryAttribute(Properties.Resources.CategoryCommon));
- b.AddCustomAttributes(nameof(TileControl.AnimationDuration), new CategoryAttribute(Properties.Resources.CategoryCommon));
- b.AddCustomAttributes(new ToolboxCategoryAttribute(ToolboxCategoryPaths.Toolkit, false));
- }
- );
- }
- }
-}
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.Design/WrapPanelMetadata.cs b/Microsoft.Toolkit.Uwp.UI.Controls.Design/WrapPanelMetadata.cs
deleted file mode 100644
index b7906773178..00000000000
--- a/Microsoft.Toolkit.Uwp.UI.Controls.Design/WrapPanelMetadata.cs
+++ /dev/null
@@ -1,35 +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.UI.Controls.Design.Common;
-using Microsoft.Windows.Design;
-using Microsoft.Windows.Design.Metadata;
-using Microsoft.Windows.Design.PropertyEditing;
-using System.ComponentModel;
-
-namespace Microsoft.Toolkit.Uwp.UI.Controls.Design
-{
- internal class WrapPanelMetadata : AttributeTableBuilder
- {
- public WrapPanelMetadata()
- : base()
- {
- AddCallback(typeof(Microsoft.Toolkit.Uwp.UI.Controls.WrapPanel),
- b =>
- {
- b.AddCustomAttributes(nameof(WrapPanel.Orientation),
- new CategoryAttribute(Properties.Resources.CategoryLayout)
- );
- b.AddCustomAttributes(nameof(WrapPanel.HorizontalSpacing),
- new CategoryAttribute(Properties.Resources.CategoryLayout)
- );
- b.AddCustomAttributes(nameof(WrapPanel.VerticalSpacing),
- new CategoryAttribute(Properties.Resources.CategoryLayout)
- );
- b.AddCustomAttributes(new ToolboxCategoryAttribute(ToolboxCategoryPaths.Toolkit, false));
- }
- );
- }
- }
-}
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.Markdown.Design/Common/MetadataRegistrationBase.cs b/Microsoft.Toolkit.Uwp.UI.Controls.Markdown.Design/Common/MetadataRegistrationBase.cs
deleted file mode 100644
index ffcec2e7184..00000000000
--- a/Microsoft.Toolkit.Uwp.UI.Controls.Markdown.Design/Common/MetadataRegistrationBase.cs
+++ /dev/null
@@ -1,252 +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.Windows.Design.Metadata;
-using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Diagnostics;
-using System.Diagnostics.CodeAnalysis;
-using System.IO;
-using System.Linq;
-using System.Reflection;
-using System.Xml.Linq;
-
-namespace Microsoft.Toolkit.Uwp.Design.Common
-{
- public class MetadataRegistrationBase
- {
- private AttributeTable masterMetadataTable;
-
- internal MetadataRegistrationBase() { }
-
- ///
- /// Build design time metadata attribute table.
- ///
- /// Custom attribute table.
- protected virtual AttributeTable BuildAttributeTable()
- {
- AttributeTableBuilder builder = new AttributeTableBuilder();
-
- AddDescriptions(builder);
- AddAttributes(builder);
- AddTables(builder, this);
- masterMetadataTable = builder.CreateTable();
- return masterMetadataTable;
- }
-
- ///
- /// Find all AttributeTableBuilder subclasses in the assembly
- /// and add their attributes to the assembly attribute table.
- ///
- /// The assembly attribute table builder.
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Design time dll should not fail!")]
- private void AddTables(AttributeTableBuilder builder, object parent)
- {
- Debug.Assert(builder != null, "AddTables is called with null parameter!");
-
- Assembly asm = parent.GetType().Assembly;
- foreach (Type t in asm.GetTypes())
- {
- if (t.IsSubclassOf(typeof(AttributeTableBuilder)))
- {
- try
- {
- AttributeTableBuilder atb = (AttributeTableBuilder)Activator.CreateInstance(t);
- builder.AddTable(atb.CreateTable());
- }
- catch (Exception)
- {
- //error loading design assembly
- }
- }
- }
- }
-
- ///
- /// Gets or sets the case sensitive resource name of the embedded XML file.
- ///
- protected string XmlResourceName { get; set; }
-
- ///
- /// Gets or sets the FullName of the corresponding run time assembly.
- ///
- protected string AssemblyFullName { get; set; }
-
- ///
- /// Create description attribute from run time assembly xml file.
- ///
- /// The assembly attribute table builder.
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "Design time dll should not fail.")]
- private void AddDescriptions(AttributeTableBuilder builder)
- {
- Debug.Assert(builder != null, "AddDescriptions is called with null parameter!");
-
- if (string.IsNullOrEmpty(XmlResourceName) ||
- string.IsNullOrEmpty(AssemblyFullName))
- {
- return;
- }
- XDocument xdoc = null;
- try
- {
- xdoc = XDocument.Load(new StreamReader(
- Assembly.GetExecutingAssembly().GetManifestResourceStream(XmlResourceName)));
- }
- catch { return; }
- if (xdoc == null)
- {
- return;
- }
-
- foreach (XElement member in xdoc.Descendants("member"))
- {
- try
- {
- string name = (string)member.Attribute("name");
- if (name == null)
- continue;
- bool isType = name.StartsWith("T:", StringComparison.OrdinalIgnoreCase);
- if (isType ||
- name.StartsWith("P:", StringComparison.OrdinalIgnoreCase))
- {
- int lastDot = name.Length;
- string typeName;
- if (isType)
- {
- typeName = name.Substring(2); // skip leading "T:"
- }
- else
- {
- lastDot = name.LastIndexOf('.');
- typeName = name.Substring(2, lastDot - 2);
- }
- typeName += AssemblyFullName;
-
- Type t = Type.GetType(typeName);
- if (t != null && t.IsPublic && t.IsClass &&
- t.IsSubclassOf(Types.PlatformTypes.DependencyObjectType))
- {
- string desc = ParseDescription(member);
- if (desc == null)
- continue;
-
- desc = desc.Trim();
- desc = string.Join(" ", desc.Split(new char[] { ' ', '\t', '\n', '\r' }, StringSplitOptions.RemoveEmptyEntries));
- if (isType)
- {
- bool isBrowsable = true;
- try
- {
- isBrowsable = IsBrowsable(t);
- }
- catch { isBrowsable = false; }
- if (isBrowsable)
- builder.AddCallback(t, b => b.AddCustomAttributes(new DescriptionAttribute(desc)));
- else //Hide from intellisense
- {
- builder.AddCallback(t, b => b.AddCustomAttributes(
- new BrowsableAttribute(false),
- new Microsoft.Windows.Design.ToolboxBrowsableAttribute(false),
- new ToolboxItemAttribute(false)));
- }
- }
- else
- {
- string propName = name.Substring(lastDot + 1);
- PropertyInfo pi = t.GetProperty(propName, BindingFlags.Public | BindingFlags.Instance | BindingFlags.DeclaredOnly);
- if (pi != null)
- {
- bool isBrowsable = true;
- try
- {
- isBrowsable = IsBrowsable(pi);
- }
- catch { isBrowsable = false; }
- if (isBrowsable)
- builder.AddCallback(t, b => b.AddCustomAttributes(propName, new DescriptionAttribute(desc)));
- else //Hide from intellisense
- builder.AddCallback(t, b => b.AddCustomAttributes(new BrowsableAttribute(false)));
- }
- }
- }
- }
- }
- catch (Exception)
- {
- }
- }
- }
- private static bool IsBrowsable(Type t)
- {
- var attrs = t.GetCustomAttributes(Types.PlatformTypes.EditorBrowsableAttributeType, false);
- foreach (var attr in attrs)
- {
- return Types.PlatformTypes.IsBrowsable(attr);
- }
- return true;
- }
-
- private static bool IsBrowsable(System.Reflection.PropertyInfo pi)
- {
- var attrs = pi.GetCustomAttributes(Types.PlatformTypes.EditorBrowsableAttributeType, false);
- foreach (var attr in attrs)
- {
- return Types.PlatformTypes.IsBrowsable(attr);
- }
- return true;
- }
-
- ///
- /// Create description string from xml doc summary tag.
- ///
- /// A single node of the xml doc.
- /// Description string.
- private static string ParseDescription(XElement member)
- {
- string desc = null;
- XElement memberDesc = member.Descendants("summary").FirstOrDefault();
-
- if (memberDesc != null)
- {
- IEnumerable nodes = memberDesc.DescendantNodes();
-
- if (nodes != null)
- {
- foreach (XNode node in nodes)
- {
- if (node.NodeType == System.Xml.XmlNodeType.Text)
- {
- desc += node.ToString();
- }
- else
- {
- string s = node.ToString();
- int i = s.LastIndexOf('.');
- int j = s.LastIndexOf('"');
-
- if ((i != -1 || j != -1) && j - i - 1 > 0)
- {
- try
- {
- desc += s.Substring(i + 1, j - i - 1);
- }
- catch { }
- }
- }
- }
- }
- }
- return desc;
- }
-
- ///
- /// Provide a place to add custom attributes without creating a AttributeTableBuilder subclass.
- ///
- /// The assembly attribute table builder.
- protected virtual void AddAttributes(AttributeTableBuilder builder)
- {
- }
- }
-}
\ No newline at end of file
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.Markdown.Design/Common/PlatformTypes.cs b/Microsoft.Toolkit.Uwp.UI.Controls.Markdown.Design/Common/PlatformTypes.cs
deleted file mode 100644
index 30196482c4c..00000000000
--- a/Microsoft.Toolkit.Uwp.UI.Controls.Markdown.Design/Common/PlatformTypes.cs
+++ /dev/null
@@ -1,49 +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.Windows.Design.Metadata;
-using Windows.UI.Xaml;
-
-namespace Microsoft.Toolkit.Uwp.Design.Types
-{
- internal class PlatformTypes
- {
- public static readonly Type DependencyObjectType = typeof(DependencyObject);
- public static readonly Type UIElementType = typeof(UIElement);
- public static readonly Type FrameworkElementType = typeof(FrameworkElement);
- public static readonly Type EditorBrowsableAttributeType = typeof(System.ComponentModel.EditorBrowsableAttribute);
-
- ///
- /// Used by MetadataRegistrationBase to get the browsable state
- ///
- /// This parameter must be of type 'System.ComponentModel.EditorBrowsableAttribute'
- ///
- public static bool IsBrowsable(object editorBrowsableAttribute)
- {
- if (editorBrowsableAttribute is System.ComponentModel.EditorBrowsableAttribute)
- return (editorBrowsableAttribute as System.ComponentModel.EditorBrowsableAttribute).State !=
- System.ComponentModel.EditorBrowsableState.Never;
- return true;
- }
-
- public static class Control
- {
- public static readonly TypeIdentifier TypeId = new TypeIdentifier("http://schemas.microsoft.com/winfx/2006/xaml/presentation", "Control");
- public static readonly PropertyIdentifier BackgroundProperty = new PropertyIdentifier(TypeId, "Background");
- public static readonly PropertyIdentifier BorderBrushProperty = new PropertyIdentifier(TypeId, "BorderBrush");
- public static readonly PropertyIdentifier BorderThicknessProperty = new PropertyIdentifier(TypeId, "BorderThickness");
- }
-
- public static class FrameworkElement
- {
- public static readonly TypeIdentifier TypeId = new TypeIdentifier("http://schemas.microsoft.com/winfx/2006/xaml/presentation", "FrameworkElement");
- public static readonly PropertyIdentifier MarginProperty = new PropertyIdentifier(TypeId, "Margin");
- public static readonly PropertyIdentifier HorizontalAlignmentProperty = new PropertyIdentifier(TypeId, "HorizontalAlignment");
- public static readonly PropertyIdentifier VerticalAlignmentProperty = new PropertyIdentifier(TypeId, "VerticalAlignment");
- public static readonly PropertyIdentifier HeightProperty = new PropertyIdentifier(TypeId, "Height");
- public static readonly PropertyIdentifier WidthProperty = new PropertyIdentifier(TypeId, "Width");
- }
- }
-}
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.Markdown.Design/Controls/MarkdownTextBlock.Metadata.cs b/Microsoft.Toolkit.Uwp.UI.Controls.Markdown.Design/Controls/MarkdownTextBlock.Metadata.cs
new file mode 100644
index 00000000000..7551d3e602f
--- /dev/null
+++ b/Microsoft.Toolkit.Uwp.UI.Controls.Markdown.Design/Controls/MarkdownTextBlock.Metadata.cs
@@ -0,0 +1,69 @@
+// 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.ComponentModel;
+
+using Microsoft.Toolkit.Uwp.UI.Controls.Design.Properties;
+using Microsoft.VisualStudio.DesignTools.Extensibility;
+using Microsoft.VisualStudio.DesignTools.Extensibility.Metadata;
+
+namespace Microsoft.Toolkit.Uwp.UI.Controls.Design
+{
+ internal class MarkdownTextBlockMetadata : AttributeTableBuilder
+ {
+ public MarkdownTextBlockMetadata()
+ : base()
+ {
+ AddCallback(ControlTypes.MarkdownTextBlock,
+ b =>
+ {
+ b.AddCustomAttributes(nameof(MarkdownTextBlock.ImageStretch), new CategoryAttribute(Resources.CategoryMarkdownStyle));
+ b.AddCustomAttributes(nameof(MarkdownTextBlock.Text), new CategoryAttribute(Resources.CategoryMarkdownStyle));
+ b.AddCustomAttributes(nameof(MarkdownTextBlock.IsTextSelectionEnabled), new CategoryAttribute(Resources.CategoryMarkdownStyle));
+ b.AddCustomAttributes(nameof(MarkdownTextBlock.LinkForeground), new CategoryAttribute(Resources.CategoryMarkdownStyle));
+ b.AddCustomAttributes(nameof(MarkdownTextBlock.TextWrapping), new CategoryAttribute(Resources.CategoryMarkdownStyle));
+ b.AddCustomAttributes(nameof(MarkdownTextBlock.ParagraphMargin), new CategoryAttribute(Resources.CategoryMarkdownStyle));
+ b.AddCustomAttributes(nameof(MarkdownTextBlock.HorizontalRuleBrush), new CategoryAttribute(Resources.CategoryMarkdownStyle));
+ b.AddCustomAttributes(nameof(MarkdownTextBlock.HorizontalRuleMargin), new CategoryAttribute(Resources.CategoryMarkdownStyle));
+ b.AddCustomAttributes(nameof(MarkdownTextBlock.HorizontalRuleThickness), new CategoryAttribute(Resources.CategoryMarkdownStyle));
+
+ b.AddCustomAttributes(nameof(MarkdownTextBlock.CodeBackground), new CategoryAttribute(Resources.CategoryMarkdownCodeStyle));
+ b.AddCustomAttributes(nameof(MarkdownTextBlock.CodeBorderBrush), new CategoryAttribute(Resources.CategoryMarkdownCodeStyle));
+ b.AddCustomAttributes(nameof(MarkdownTextBlock.CodeBorderThickness), new CategoryAttribute(Resources.CategoryMarkdownCodeStyle));
+ b.AddCustomAttributes(nameof(MarkdownTextBlock.CodeForeground), new CategoryAttribute(Resources.CategoryMarkdownCodeStyle));
+ b.AddCustomAttributes(nameof(MarkdownTextBlock.CodeBackground), new CategoryAttribute(Resources.CategoryMarkdownCodeStyle));
+ b.AddCustomAttributes(nameof(MarkdownTextBlock.CodeFontFamily), new CategoryAttribute(Resources.CategoryMarkdownCodeStyle));
+ b.AddCustomAttributes(nameof(MarkdownTextBlock.CodeMargin), new CategoryAttribute(Resources.CategoryMarkdownCodeStyle));
+ b.AddCustomAttributes(nameof(MarkdownTextBlock.CodePadding), new CategoryAttribute(Resources.CategoryMarkdownCodeStyle));
+
+ for (int i = 1; i <= 6; i++)
+ {
+ b.AddCustomAttributes($"Header{i}FontWeight", new CategoryAttribute(string.Format(Resources.CategoryMarkdownHeaderStyle, i)));
+ b.AddCustomAttributes($"Header{i}FontSize", new CategoryAttribute(string.Format(Resources.CategoryMarkdownHeaderStyle, i)));
+ b.AddCustomAttributes($"Header{i}Margin", new CategoryAttribute(string.Format(Resources.CategoryMarkdownHeaderStyle, i)));
+ b.AddCustomAttributes($"Header{i}Foreground", new CategoryAttribute(string.Format(Resources.CategoryMarkdownHeaderStyle, i)));
+ }
+
+ b.AddCustomAttributes(nameof(MarkdownTextBlock.ListMargin), new CategoryAttribute(Resources.CategoryMarkdownListStyle));
+ b.AddCustomAttributes(nameof(MarkdownTextBlock.ListGutterWidth), new CategoryAttribute(Resources.CategoryMarkdownListStyle));
+ b.AddCustomAttributes(nameof(MarkdownTextBlock.ListBulletSpacing), new CategoryAttribute(Resources.CategoryMarkdownListStyle));
+
+ b.AddCustomAttributes(nameof(MarkdownTextBlock.QuoteBackground), new CategoryAttribute(Resources.CategoryMarkdownQuoteStyle));
+ b.AddCustomAttributes(nameof(MarkdownTextBlock.QuoteBorderBrush), new CategoryAttribute(Resources.CategoryMarkdownQuoteStyle));
+ b.AddCustomAttributes(nameof(MarkdownTextBlock.QuoteBorderThickness), new CategoryAttribute(Resources.CategoryMarkdownQuoteStyle));
+ b.AddCustomAttributes(nameof(MarkdownTextBlock.QuoteForeground), new CategoryAttribute(Resources.CategoryMarkdownQuoteStyle));
+ b.AddCustomAttributes(nameof(MarkdownTextBlock.QuoteMargin), new CategoryAttribute(Resources.CategoryMarkdownQuoteStyle));
+ b.AddCustomAttributes(nameof(MarkdownTextBlock.QuotePadding), new CategoryAttribute(Resources.CategoryMarkdownQuoteStyle));
+
+ b.AddCustomAttributes(nameof(MarkdownTextBlock.TableBorderBrush), new CategoryAttribute(Resources.CategoryMarkdownTableStyle));
+ b.AddCustomAttributes(nameof(MarkdownTextBlock.TableBorderThickness), new CategoryAttribute(Resources.CategoryMarkdownTableStyle));
+ b.AddCustomAttributes(nameof(MarkdownTextBlock.TableCellPadding), new CategoryAttribute(Resources.CategoryMarkdownTableStyle));
+ b.AddCustomAttributes(nameof(MarkdownTextBlock.TableMargin), new CategoryAttribute(Resources.CategoryMarkdownTableStyle));
+
+ b.AddCustomAttributes(new ToolboxCategoryAttribute(ToolboxCategoryPaths.Toolkit, false));
+ }
+ );
+ }
+ }
+}
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.Markdown.Design/Controls/MarkdownTextBlock.Typedata.cs b/Microsoft.Toolkit.Uwp.UI.Controls.Markdown.Design/Controls/MarkdownTextBlock.Typedata.cs
new file mode 100644
index 00000000000..09d4115107b
--- /dev/null
+++ b/Microsoft.Toolkit.Uwp.UI.Controls.Markdown.Design/Controls/MarkdownTextBlock.Typedata.cs
@@ -0,0 +1,46 @@
+// 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;
+
+namespace Microsoft.Toolkit.Uwp.UI.Controls.Design
+{
+ internal static partial class ControlTypes
+ {
+ internal const string MarkdownTextBlock = RootNamespace + "." + nameof(MarkdownTextBlock);
+ }
+
+ internal static class MarkdownTextBlock
+ {
+ internal const string CodeBackground = nameof(CodeBackground);
+ internal const string CodeBorderBrush = nameof(CodeBorderBrush);
+ internal const string CodeBorderThickness = nameof(CodeBorderThickness);
+ internal const string CodeFontFamily = nameof(CodeFontFamily);
+ internal const string CodeForeground = nameof(CodeForeground);
+ internal const string CodeMargin = nameof(CodeMargin);
+ internal const string CodePadding = nameof(CodePadding);
+ internal const string HorizontalRuleBrush = nameof(HorizontalRuleBrush);
+ internal const string HorizontalRuleMargin = nameof(HorizontalRuleMargin);
+ internal const string HorizontalRuleThickness = nameof(HorizontalRuleThickness);
+ internal const string ImageStretch = nameof(ImageStretch);
+ internal const string IsTextSelectionEnabled = nameof(IsTextSelectionEnabled);
+ internal const string LinkForeground = nameof(LinkForeground);
+ internal const string ListBulletSpacing = nameof(ListBulletSpacing);
+ internal const string ListGutterWidth = nameof(ListGutterWidth);
+ internal const string ListMargin = nameof(ListMargin);
+ internal const string ParagraphMargin = nameof(ParagraphMargin);
+ internal const string QuoteBackground = nameof(QuoteBackground);
+ internal const string QuoteBorderBrush = nameof(QuoteBorderBrush);
+ internal const string QuoteBorderThickness = nameof(QuoteBorderThickness);
+ internal const string QuoteForeground = nameof(QuoteForeground);
+ internal const string QuoteMargin = nameof(QuoteMargin);
+ internal const string QuotePadding = nameof(QuotePadding);
+ internal const string TableBorderBrush = nameof(TableBorderBrush);
+ internal const string TableBorderThickness = nameof(TableBorderThickness);
+ internal const string TableCellPadding = nameof(TableCellPadding);
+ internal const string TableMargin = nameof(TableMargin);
+ internal const string Text = nameof(Text);
+ internal const string TextWrapping = nameof(TextWrapping);
+ }
+}
\ No newline at end of file
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.Markdown.Design/MarkdownTextBlockMetadata.cs b/Microsoft.Toolkit.Uwp.UI.Controls.Markdown.Design/MarkdownTextBlockMetadata.cs
deleted file mode 100644
index 6a6a3513b00..00000000000
--- a/Microsoft.Toolkit.Uwp.UI.Controls.Markdown.Design/MarkdownTextBlockMetadata.cs
+++ /dev/null
@@ -1,69 +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.UI.Controls.Design.Common;
-using Microsoft.Windows.Design;
-using Microsoft.Windows.Design.Metadata;
-using Microsoft.Windows.Design.PropertyEditing;
-using System.ComponentModel;
-
-namespace Microsoft.Toolkit.Uwp.UI.Controls.Design
-{
- internal class MarkdownTextBlockMetadata : AttributeTableBuilder
- {
- public MarkdownTextBlockMetadata()
- : base()
- {
- AddCallback(typeof(Microsoft.Toolkit.Uwp.UI.Controls.MarkdownTextBlock),
- b =>
- {
- b.AddCustomAttributes(nameof(MarkdownTextBlock.ImageStretch), new CategoryAttribute(Properties.Resources.CategoryMarkdownStyle));
- b.AddCustomAttributes(nameof(MarkdownTextBlock.Text), new CategoryAttribute(Properties.Resources.CategoryMarkdownStyle));
- b.AddCustomAttributes(nameof(MarkdownTextBlock.IsTextSelectionEnabled), new CategoryAttribute(Properties.Resources.CategoryMarkdownStyle));
- b.AddCustomAttributes(nameof(MarkdownTextBlock.LinkForeground), new CategoryAttribute(Properties.Resources.CategoryMarkdownStyle));
- b.AddCustomAttributes(nameof(MarkdownTextBlock.TextWrapping), new CategoryAttribute(Properties.Resources.CategoryMarkdownStyle));
- b.AddCustomAttributes(nameof(MarkdownTextBlock.ParagraphMargin), new CategoryAttribute(Properties.Resources.CategoryMarkdownStyle));
- b.AddCustomAttributes(nameof(MarkdownTextBlock.HorizontalRuleBrush), new CategoryAttribute(Properties.Resources.CategoryMarkdownStyle));
- b.AddCustomAttributes(nameof(MarkdownTextBlock.HorizontalRuleMargin), new CategoryAttribute(Properties.Resources.CategoryMarkdownStyle));
- b.AddCustomAttributes(nameof(MarkdownTextBlock.HorizontalRuleThickness), new CategoryAttribute(Properties.Resources.CategoryMarkdownStyle));
-
- b.AddCustomAttributes(nameof(MarkdownTextBlock.CodeBackground), new CategoryAttribute(Properties.Resources.CategoryMarkdownCodeStyle));
- b.AddCustomAttributes(nameof(MarkdownTextBlock.CodeBorderBrush), new CategoryAttribute(Properties.Resources.CategoryMarkdownCodeStyle));
- b.AddCustomAttributes(nameof(MarkdownTextBlock.CodeBorderThickness), new CategoryAttribute(Properties.Resources.CategoryMarkdownCodeStyle));
- b.AddCustomAttributes(nameof(MarkdownTextBlock.CodeForeground), new CategoryAttribute(Properties.Resources.CategoryMarkdownCodeStyle));
- b.AddCustomAttributes(nameof(MarkdownTextBlock.CodeBackground), new CategoryAttribute(Properties.Resources.CategoryMarkdownCodeStyle));
- b.AddCustomAttributes(nameof(MarkdownTextBlock.CodeFontFamily), new CategoryAttribute(Properties.Resources.CategoryMarkdownCodeStyle));
- b.AddCustomAttributes(nameof(MarkdownTextBlock.CodeMargin), new CategoryAttribute(Properties.Resources.CategoryMarkdownCodeStyle));
- b.AddCustomAttributes(nameof(MarkdownTextBlock.CodePadding), new CategoryAttribute(Properties.Resources.CategoryMarkdownCodeStyle));
-
- for (int i = 1; i <= 6; i++)
- {
- b.AddCustomAttributes($"Header{i}FontWeight", new CategoryAttribute(string.Format(Properties.Resources.CategoryMarkdownHeaderStyle, i)));
- b.AddCustomAttributes($"Header{i}FontSize", new CategoryAttribute(string.Format(Properties.Resources.CategoryMarkdownHeaderStyle, i)));
- b.AddCustomAttributes($"Header{i}Margin", new CategoryAttribute(string.Format(Properties.Resources.CategoryMarkdownHeaderStyle, i)));
- b.AddCustomAttributes($"Header{i}Foreground", new CategoryAttribute(string.Format(Properties.Resources.CategoryMarkdownHeaderStyle, i)));
- }
-
- b.AddCustomAttributes(nameof(MarkdownTextBlock.ListMargin), new CategoryAttribute(Properties.Resources.CategoryMarkdownListStyle));
- b.AddCustomAttributes(nameof(MarkdownTextBlock.ListGutterWidth), new CategoryAttribute(Properties.Resources.CategoryMarkdownListStyle));
- b.AddCustomAttributes(nameof(MarkdownTextBlock.ListBulletSpacing), new CategoryAttribute(Properties.Resources.CategoryMarkdownListStyle));
-
- b.AddCustomAttributes(nameof(MarkdownTextBlock.QuoteBackground), new CategoryAttribute(Properties.Resources.CategoryMarkdownQuoteStyle));
- b.AddCustomAttributes(nameof(MarkdownTextBlock.QuoteBorderBrush), new CategoryAttribute(Properties.Resources.CategoryMarkdownQuoteStyle));
- b.AddCustomAttributes(nameof(MarkdownTextBlock.QuoteBorderThickness), new CategoryAttribute(Properties.Resources.CategoryMarkdownQuoteStyle));
- b.AddCustomAttributes(nameof(MarkdownTextBlock.QuoteForeground), new CategoryAttribute(Properties.Resources.CategoryMarkdownQuoteStyle));
- b.AddCustomAttributes(nameof(MarkdownTextBlock.QuoteMargin), new CategoryAttribute(Properties.Resources.CategoryMarkdownQuoteStyle));
- b.AddCustomAttributes(nameof(MarkdownTextBlock.QuotePadding), new CategoryAttribute(Properties.Resources.CategoryMarkdownQuoteStyle));
-
- b.AddCustomAttributes(nameof(MarkdownTextBlock.TableBorderBrush), new CategoryAttribute(Properties.Resources.CategoryMarkdownTableStyle));
- b.AddCustomAttributes(nameof(MarkdownTextBlock.TableBorderThickness), new CategoryAttribute(Properties.Resources.CategoryMarkdownTableStyle));
- b.AddCustomAttributes(nameof(MarkdownTextBlock.TableCellPadding), new CategoryAttribute(Properties.Resources.CategoryMarkdownTableStyle));
- b.AddCustomAttributes(nameof(MarkdownTextBlock.TableMargin), new CategoryAttribute(Properties.Resources.CategoryMarkdownTableStyle));
-
- b.AddCustomAttributes(new ToolboxCategoryAttribute(ToolboxCategoryPaths.Toolkit, false));
- }
- );
- }
- }
-}
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.Markdown.Design/MetadataRegistration.cs b/Microsoft.Toolkit.Uwp.UI.Controls.Markdown.Design/MetadataRegistration.cs
deleted file mode 100644
index 5c0b0b2df70..00000000000
--- a/Microsoft.Toolkit.Uwp.UI.Controls.Markdown.Design/MetadataRegistration.cs
+++ /dev/null
@@ -1,46 +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 System.Reflection;
-using Microsoft.Windows.Design.Metadata;
-using Microsoft.Toolkit.Uwp.Design.Common;
-
-[assembly: ProvideMetadata(typeof(Microsoft.Toolkit.Uwp.UI.Controls.Design.MetadataRegistration))]
-
-namespace Microsoft.Toolkit.Uwp.UI.Controls.Design
-{
- public class MetadataRegistration : MetadataRegistrationBase, IProvideAttributeTable
- {
- public MetadataRegistration() : base()
- {
- // Note:
- // The default constructor sets value of AssemblyFullName and
- // XmlResourceName used by MetadataRegistrationBase.AddDescriptions().
- // The convention here is that the in .design.csproj
- // (or Default namespace in Project -> Properties -> Application tab)
- // must be the same as runtime assembly's main namespace (t.Namespace)
- // plus .Design.
- Type t = typeof(Microsoft.Toolkit.Uwp.UI.Controls.MarkdownTextBlock);
- AssemblyName an = t.Assembly.GetName();
- AssemblyFullName = ", " + an.FullName;
- XmlResourceName = t.Namespace + ".Design." + an.Name + ".xml";
- }
-
- #region IProvideAttributeTable Members
-
- ///
- /// Gets the AttributeTable for design time metadata.
- ///
- public AttributeTable AttributeTable
- {
- get
- {
- return BuildAttributeTable();
- }
- }
-
- #endregion
- }
-}
\ No newline at end of file
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.Markdown.Design/Microsoft.Toolkit.Uwp.UI.Controls.Markdown.Design.csproj b/Microsoft.Toolkit.Uwp.UI.Controls.Markdown.Design/Microsoft.Toolkit.Uwp.UI.Controls.Markdown.DesignTools.csproj
similarity index 73%
rename from Microsoft.Toolkit.Uwp.UI.Controls.Markdown.Design/Microsoft.Toolkit.Uwp.UI.Controls.Markdown.Design.csproj
rename to Microsoft.Toolkit.Uwp.UI.Controls.Markdown.Design/Microsoft.Toolkit.Uwp.UI.Controls.Markdown.DesignTools.csproj
index a03aff9ca16..2c32a4774c2 100644
--- a/Microsoft.Toolkit.Uwp.UI.Controls.Markdown.Design/Microsoft.Toolkit.Uwp.UI.Controls.Markdown.Design.csproj
+++ b/Microsoft.Toolkit.Uwp.UI.Controls.Markdown.Design/Microsoft.Toolkit.Uwp.UI.Controls.Markdown.DesignTools.csproj
@@ -7,23 +7,19 @@
{67FE47A0-CA93-4680-B770-A0A48C1DBC40}LibraryProperties
- Microsoft.Toolkit.Uwp.UI.Controls.Markdown.Design
- Microsoft.Toolkit.Uwp.UI.Controls.Markdown.Design
- v4.7.2
+ Microsoft.Toolkit.Uwp.UI.Controls.Design
+ Microsoft.Toolkit.Uwp.UI.Controls.Markdown.DesignTools512
-
- $(NoWarn);0618
- $(AssetTargetFallback);uap10.0.17763
-
- 8.1
+ v4.7.2
+ falsetrue..\Microsoft.Toolkit.Uwp.UI.Controls.Markdown\bin\Debug\uap10.0.17763\Design\fullfalse
- DEBUG;TRACE
+ TRACE;DEBUGx86
@@ -34,18 +30,18 @@
TRACE
- false
+ $(AssetTargetFallback);uap10.0.17763
-
+ FalseFalse
-
+ FalseFalse
@@ -63,12 +59,6 @@
-
- {e9faabfb-d726-42c1-83c1-cb46a29fea81}
- Microsoft.Toolkit.Uwp.UI.Controls.Markdown
- False
- true
-
@@ -85,10 +75,12 @@
-
-
-
-
+
+
+
+
+
+ Code
@@ -97,30 +89,19 @@
TrueResources.resx
-
- True
- Settings.settings
- True
-
- ResXFileCodeGeneratorResources.Designer.cs
-
- SettingsSingleFileGenerator
- Settings.Designer.cs
-
Microsoft.Toolkit.Uwp.UI.Controls.Markdown.xml
- Designer
+ False
-
-
-
+
+
\ No newline at end of file
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.Markdown.Design/Properties/AssemblyInfo.cs b/Microsoft.Toolkit.Uwp.UI.Controls.Markdown.Design/Properties/AssemblyInfo.cs
index 06b96fdf78d..7adc149cd6d 100644
--- a/Microsoft.Toolkit.Uwp.UI.Controls.Markdown.Design/Properties/AssemblyInfo.cs
+++ b/Microsoft.Toolkit.Uwp.UI.Controls.Markdown.Design/Properties/AssemblyInfo.cs
@@ -3,16 +3,13 @@
// See the LICENSE file in the project root for more information.
using System.Reflection;
-using System.Resources;
-using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
-using System.Windows;
-// General Information about an assembly is controlled through the following
+// 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: AssemblyTitle("Windows Community Toolkit Controls (Design)")]
-[assembly: AssemblyDescription("Design time support for Windows Community Toolkit Controls")]
+[assembly: AssemblyTitle("Windows Community Toolkit Controls Markdown (Design)")]
+[assembly: AssemblyDescription("Design time support for Windows Community Toolkit Markdown Controls")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Microsoft")]
[assembly: AssemblyProduct("Windows Community Toolkit")]
@@ -20,14 +17,14 @@
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
-//In order to begin building localizable applications, set
+//In order to begin building localizable applications, set
//CultureYouAreCodingWith in your .csproj file
-//inside a . For example, if you are using US english
+//inside a . For example, if you are using US English
//in your source files, set the to en-US. Then uncomment
//the NeutralResourceLanguage attribute below. Update the "en-US" in
//the line below to match the UICulture setting in the project file.
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.Markdown.Design/Properties/Settings.Designer.cs b/Microsoft.Toolkit.Uwp.UI.Controls.Markdown.Design/Properties/Settings.Designer.cs
deleted file mode 100644
index 662fe0ad430..00000000000
--- a/Microsoft.Toolkit.Uwp.UI.Controls.Markdown.Design/Properties/Settings.Designer.cs
+++ /dev/null
@@ -1,26 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-// Runtime Version:4.0.30319.42000
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-namespace Microsoft.Toolkit.Uwp.UI.Controls.Design.Properties {
-
-
- [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.3.0.0")]
- internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
-
- private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
-
- public static Settings Default {
- get {
- return defaultInstance;
- }
- }
- }
-}
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.Markdown.Design/Properties/Settings.settings b/Microsoft.Toolkit.Uwp.UI.Controls.Markdown.Design/Properties/Settings.settings
deleted file mode 100644
index 033d7a5e9e2..00000000000
--- a/Microsoft.Toolkit.Uwp.UI.Controls.Markdown.Design/Properties/Settings.settings
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.Markdown/Microsoft.Toolkit.Uwp.UI.Controls.Markdown.csproj b/Microsoft.Toolkit.Uwp.UI.Controls.Markdown/Microsoft.Toolkit.Uwp.UI.Controls.Markdown.csproj
index ede2fce9ac4..da2194150b7 100644
--- a/Microsoft.Toolkit.Uwp.UI.Controls.Markdown/Microsoft.Toolkit.Uwp.UI.Controls.Markdown.csproj
+++ b/Microsoft.Toolkit.Uwp.UI.Controls.Markdown/Microsoft.Toolkit.Uwp.UI.Controls.Markdown.csproj
@@ -4,6 +4,7 @@
Windows Community Toolkit Controls Markdown
This library provides a XAML MarkdownTextBlock control, an efficient and extensible control that can parse and render markdown. It is part of the Windows Community Toolkit.
+
UWP Toolkit Windows Controls XAML Markdown MarkdownTextBlockMicrosoft.Toolkit.Uwp.UI.Controls
@@ -12,15 +13,8 @@
-
-
-
-
-
-
-
-
-
+
+
@@ -38,6 +32,13 @@
+
+
+
+
+
+
+
diff --git a/Microsoft.Toolkit.Uwp.UI.Controls/Microsoft.Toolkit.Uwp.UI.Controls.csproj b/Microsoft.Toolkit.Uwp.UI.Controls/Microsoft.Toolkit.Uwp.UI.Controls.csproj
index 294ac153355..bf18c15c898 100644
--- a/Microsoft.Toolkit.Uwp.UI.Controls/Microsoft.Toolkit.Uwp.UI.Controls.csproj
+++ b/Microsoft.Toolkit.Uwp.UI.Controls/Microsoft.Toolkit.Uwp.UI.Controls.csproj
@@ -5,7 +5,7 @@
Windows Community Toolkit Controls
This library provides XAML templated controls. It is part of the Windows Community Toolkit.
-
+
Controls:
- AdaptiveGridView: Presents items in an evenly-spaced set of columns to fill the total available space.
- BladeView: Provides a horizontal collection of blades for master-detail scenarios.
@@ -48,23 +48,21 @@
-
+
-
+
-
+
-
-
diff --git a/SmokeTests/SmokeTest.csproj b/SmokeTests/SmokeTest.csproj
index bbcfbdd57ab..1f4c5855eed 100644
--- a/SmokeTests/SmokeTest.csproj
+++ b/SmokeTests/SmokeTest.csproj
@@ -17,8 +17,8 @@
SmokeTest.$(CurrentProject)en-USUAP
- 10.0.$(DefaultTargetPlatformVersion).0
- 10.0.$(DefaultTargetPlatformMinVersion).0
+ 10.0.$(TargetPlatformRevision).0
+ 10.0.$(TargetPlatformMinRevision).014512{A5A43C5B-DE2A-4C0C-9213-0A381AF9435A};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
diff --git a/Windows Community Toolkit.sln b/Windows Community Toolkit.sln
index 0c75200e754..8cd426fa1da 100644
--- a/Windows Community Toolkit.sln
+++ b/Windows Community Toolkit.sln
@@ -55,12 +55,12 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
settings.xamlstyler = settings.xamlstyler
EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Toolkit.Uwp.UI.Controls.Design", "Microsoft.Toolkit.Uwp.UI.Controls.Design\Microsoft.Toolkit.Uwp.UI.Controls.Design.csproj", "{7AEFC959-ED7C-4D96-9E92-72609B40FBE0}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Toolkit.Uwp.UI.Controls.DesignTools", "Microsoft.Toolkit.Uwp.UI.Controls.Design\Microsoft.Toolkit.Uwp.UI.Controls.DesignTools.csproj", "{7AEFC959-ED7C-4D96-9E92-72609B40FBE0}"
ProjectSection(ProjectDependencies) = postProject
{E9FAABFB-D726-42C1-83C1-CB46A29FEA81} = {E9FAABFB-D726-42C1-83C1-CB46A29FEA81}
EndProjectSection
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Toolkit.Uwp.UI.Controls.DataGrid.Design", "Microsoft.Toolkit.Uwp.UI.Controls.DataGrid.Design\Microsoft.Toolkit.Uwp.UI.Controls.DataGrid.Design.csproj", "{6BD0BA4A-DE6D-3E87-8F83-63518C31ECD1}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Toolkit.Uwp.UI.Controls.DataGrid.DesignTools", "Microsoft.Toolkit.Uwp.UI.Controls.DataGrid.Design\Microsoft.Toolkit.Uwp.UI.Controls.DataGrid.DesignTools.csproj", "{6BD0BA4A-DE6D-3E87-8F83-63518C31ECD1}"
ProjectSection(ProjectDependencies) = postProject
{DAEB9CEC-C817-33B2-74B2-BC379380DB72} = {DAEB9CEC-C817-33B2-74B2-BC379380DB72}
EndProjectSection
@@ -110,7 +110,10 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Docs", "Docs", "{88C6FFBE-3
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Toolkit.Uwp.UI.Controls.Markdown", "Microsoft.Toolkit.Uwp.UI.Controls.Markdown\Microsoft.Toolkit.Uwp.UI.Controls.Markdown.csproj", "{6FEDF199-B052-49DD-8F3E-2A9224998E0F}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Toolkit.Uwp.UI.Controls.Markdown.Design", "Microsoft.Toolkit.Uwp.UI.Controls.Markdown.Design\Microsoft.Toolkit.Uwp.UI.Controls.Markdown.Design.csproj", "{67FE47A0-CA93-4680-B770-A0A48C1DBC40}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Toolkit.Uwp.UI.Controls.Markdown.DesignTools", "Microsoft.Toolkit.Uwp.UI.Controls.Markdown.Design\Microsoft.Toolkit.Uwp.UI.Controls.Markdown.DesignTools.csproj", "{67FE47A0-CA93-4680-B770-A0A48C1DBC40}"
+ ProjectSection(ProjectDependencies) = postProject
+ {6FEDF199-B052-49DD-8F3E-2A9224998E0F} = {6FEDF199-B052-49DD-8F3E-2A9224998E0F}
+ EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Toolkit.Win32.WpfCore.SampleApp", "Microsoft.Toolkit.Win32.WpfCore.SampleApp\Microsoft.Toolkit.Win32.WpfCore.SampleApp.csproj", "{0037E4C9-7AF3-4ADD-8156-5AEFA6C36405}"
EndProject
diff --git a/build/Find-WindowsSDKVersions.ps1 b/build/Find-WindowsSDKVersions.ps1
index b743dac342c..ebb8ab5eeb1 100644
--- a/build/Find-WindowsSDKVersions.ps1
+++ b/build/Find-WindowsSDKVersions.ps1
@@ -57,13 +57,13 @@ function Get-SdkVersion
$versions.Add($version) | Out-Null
# Versions may also be specified without the 10.0.xxxxx.0 format in the
- # PropertyGroup/DefaultTargetPlatformVersion and PropertyGroup/DefaultTargetPlatformMinVersion
+ # PropertyGroup/TargetPlatformRevision and PropertyGroup/TargetPlatformMinRevision
# If you want a complete set of SDKs that are required, uncomment the following
- # $version = Get-NodeValue $xml 'PropertyGroup/DefaultTargetPlatformMinVersion'
+ # $version = Get-NodeValue $xml 'PropertyGroup/TargetPlatformMinRevision'
# $versions.Add("10.0." + $version + ".0") | Out-Null
- $version = Get-NodeValue $xml 'PropertyGroup/DefaultTargetPlatformVersion'
+ $version = Get-NodeValue $xml 'PropertyGroup/TargetPlatformRevision'
$versions.Add("10.0." + $version + ".0") | Out-Null
}
diff --git a/build/Windows.Toolkit.Uwp.Build.targets b/build/Windows.Toolkit.Uwp.Build.targets
new file mode 100644
index 00000000000..96eb9df1922
--- /dev/null
+++ b/build/Windows.Toolkit.Uwp.Build.targets
@@ -0,0 +1,19 @@
+
+
+
+
+ $(TargetPlatformBaseVersion).$(TargetPlatformRevision).0
+ $(TargetPlatformBaseVersion).$(TargetPlatformMinRevision).0
+ Portable
+
+
+
+
+ Windows Desktop Extensions for the UWP
+
+
+ Windows Mobile Extensions for the UWP
+
+
+
+
\ No newline at end of file
diff --git a/build/Windows.Toolkit.VisualStudio.Design.props b/build/Windows.Toolkit.VisualStudio.Design.props
new file mode 100644
index 00000000000..de91a09dfad
--- /dev/null
+++ b/build/Windows.Toolkit.VisualStudio.Design.props
@@ -0,0 +1,21 @@
+
+
+
+ $([MSBuild]::EnsureTrailingSlash($([MSBuild]::ValueOrDefault('$(BaseIntermediateOutputPath)', 'obj'))))
+
+
+
+
+
+ $(BaseIntermediateOutputPath)Design\
+
+
+
+
+ $(BaseIntermediateOutputPath)DesignTools\
+
+
+
+
+
+
\ No newline at end of file