Files
WinWARP/WinWARP.Ui/Helpers/TypeExtension.cs
T
2026-09-09 16:19:45 +03:00

23 lines
497 B
C#

using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.UI.Xaml.Markup;
namespace WinWARP.Ui.Helpers;
/// <summary>
/// A markup extension that allows you to specify a <see cref="Type"/> in XAML.
/// </summary>
[MarkupExtensionReturnType(ReturnType = typeof(Type))]
public sealed class TypeExtension : MarkupExtension
{
public Type? TargetType
{
get; set;
}
protected override object? ProvideValue()
{
return TargetType;
}
}