HandyOrg / HandyControl

Contains some simple and commonly used WPF controls
https://handyorg.github.io/
MIT License
6.18k stars 1.04k forks source link

FloatingBlock invalid #1579

Open MCcber opened 7 months ago

MCcber commented 7 months ago

Describe the bug

Available when handyControl:FloatingBlock.Content is set, invalid when ContentTemplate is set

Steps to reproduce the bug

After writing the following code in the WPF program and starting debugging, the FloatingBlock fails.


<Button
    Width="180"
    Margin="0,10,0,0"
    handyControl:FloatingBlock.Duration="0:0:1"
    handyControl:FloatingBlock.ToX="50"
    handyControl:FloatingBlock.ToY="-80"
    handyControl:FloatingBlock.VerticalOffset="-20"
    handyControl:IconElement.Geometry="{StaticResource ThumbsUpGeometry}">
    <handyControl:FloatingBlock.ContentTemplate>
        <DataTemplate>
            <Path
                Width="16"
                Height="16"
                Data="{StaticResource ThumbsUpGeometry}"
                Fill="{DynamicResource DangerBrush}" />
        </DataTemplate>
    </handyControl:FloatingBlock.ContentTemplate>
</Button>```

### Expected behavior

Theoretically, after writing the above code and starting debugging, your thumb should fly upward when you click the button. In fact, this does not happen.

### Screenshots

![image](https://github.com/HandyOrg/HandyControl/assets/45808036/5c4cd071-80de-4675-8d25-4e28669b14d8)

### NuGet package version

None

### IDE

Visual Studio 2022

### Framework type

_No response_

### Windows version

Windows 11 (22000)

### Additional context

_No response_