HandyControls
HandyControls copied to clipboard
NonClientAreaContent can not drag window
Describe the bug
NonClientAreaContent can not drag window.
Steps to reproduce the bug
- Create a simple
hc:Window - Add
hc:Window.NonClientAreaContent(content isMenu) - Try drag the title bar (NonClientAreaContent) to move window,can not do it.
Expected behavior
No response
Screenshots
No response
NuGet package version
HandyControls (Custom version) 3.4.0
IDE
Visual Studio 2022
Framework type
.Net 6.0
Windows version
Windows 11 (22000)
Additional context
No response
Temporary Solutions:
set NonClientAreaContent background {x:null}
mybe you are doing it wrong way...

<hc:Window.NonClientAreaContent>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<StackPanel Height="29">
<Menu HorizontalAlignment="Left">
<MenuItem Header="Header1">
<MenuItem Header="Header1"/>
<MenuItem Header="Header2"/>
</MenuItem>
<MenuItem Header="Header2">
<MenuItem Header="Header1"/>
<MenuItem Header="Header2"/>
</MenuItem>
</Menu>
</StackPanel>
<Button HorizontalAlignment="Right" Grid.Column="1" Name="ButtonConfig" Style="{StaticResource ButtonIcon}" Foreground="{DynamicResource PrimaryTextBrush}" hc:IconElement.Geometry="{StaticResource ConfigGeometry}"/>
</Grid>
</hc:Window.NonClientAreaContent>
The reason for the problem is that I did not use Grid, but directly used hc:SimpleStackPanel.