using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
namespace GradientBrushSample;
public sealed partial class AwesomArcControl : UserControl
{
public AwesomArcControl()
{
this.InitializeComponent();
}
// The "new" keyword hides the UserControl's base member "Content".
public new object Content
{
get => (object)GetValue(ContentProperty);
set => SetValue(ContentProperty, value);
}
// The "new" keyword hides the UserControl's base member "ContentProperty".
public static new readonly DependencyProperty ContentProperty = DependencyProperty.Register(
nameof(Content),
typeof(object),
typeof(AwesomArcControl),
new PropertyMetadata(default));
}
1条答案
按热度按时间mzillmmw1#
这是一个
UserControl
的例子,它的外观和你的图片相似。这并不适用于你提到的每一个案例,但我希望这能给你一个好的方向。AwesomArcControl.xaml
AwesomArcControl.xaml.cs
你可以这样使用它: