44 строки
2.2 KiB
C#
44 строки
2.2 KiB
C#
// ******************************************************************
|
|
// Copyright (c) Microsoft. All rights reserved.
|
|
// This code is licensed under the MIT License (MIT).
|
|
// THE CODE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
|
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
|
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH
|
|
// THE CODE OR THE USE OR OTHER DEALINGS IN THE CODE.
|
|
// ******************************************************************
|
|
|
|
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 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),
|
|
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(new ToolboxCategoryAttribute(ToolboxCategoryPaths.Toolkit, false));
|
|
}
|
|
);
|
|
}
|
|
}
|
|
}
|