This commit is contained in:
NaBian committed 2020-06-30 00:09:24 +08:00
1 parent 2d9b6bb8ad
commit 148530b91d
14 files changed
+132 -28

No files matched your search

@@ -0,0 +1,11 @@
<Border x:Class="HandyControlDemo.UserControl.GeometryItem"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
Margin="16"
Cursor="Hand"
mc:Ignorable="d"
Style="{StaticResource BorderCircular}" Background="{DynamicResource RegionBrush}" ToolTip="{Binding Info.Key,RelativeSource={RelativeSource Self}}">
<Path Style="{StaticResource Path4GeometryItem}"/>
</Border>
@@ -0,0 +1,19 @@
using System.Windows;
using HandyControlDemo.Data;
namespace HandyControlDemo.UserControl
{
public partial class GeometryItem
{
public GeometryItem() => InitializeComponent();
public static readonly DependencyProperty InfoProperty = DependencyProperty.Register(
"Info", typeof(GeometryItemModel), typeof(GeometryItem), new PropertyMetadata(default(GeometryItemModel)));
public GeometryItemModel Info
{
get => (GeometryItemModel) GetValue(InfoProperty);
set => SetValue(InfoProperty, value);
}
}
}