feat: add two attached properties to mark an custom element triggering drag move or close.

This commit is contained in:
rabbitism
2024-02-08 23:15:26 +08:00
parent f758ceb760
commit 974afa33c5
5 changed files with 128 additions and 22 deletions

View File

@@ -5,6 +5,7 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:Ursa.Demo.Dialogs"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:u="https://irihi.tech/ursa"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
d:DesignHeight="450"
@@ -30,6 +31,7 @@
HorizontalAlignment="Right"
Orientation="Horizontal"
Spacing="8">
<Rectangle Width="10" Height="10" Fill="Red" u:DialogControlBase.CanClose="True"></Rectangle>
<Button Command="{Binding DialogCommand}" Content="Dialog" />
<Button Command="{Binding OKCommand}" Content="OK" />
<Button Command="{Binding CancelCommand}" Content="Cancel" />