HandyControls icon indicating copy to clipboard operation
HandyControls copied to clipboard

NonClientAreaContent can not drag window

Open CodingOctocat opened this issue 3 years ago • 1 comments

Describe the bug

NonClientAreaContent can not drag window.

Steps to reproduce the bug

  1. Create a simple hc:Window
  2. Add hc:Window.NonClientAreaContent (content is Menu)
  3. 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

CodingOctocat avatar Aug 10 '22 11:08 CodingOctocat

Temporary Solutions: set NonClientAreaContent background {x:null}

CodingOctocat avatar Aug 10 '22 12:08 CodingOctocat

mybe you are doing it wrong way... Animation2

    <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>

ghost1372 avatar Aug 15 '22 14:08 ghost1372

The reason for the problem is that I did not use Grid, but directly used hc:SimpleStackPanel.

CodingOctocat avatar Aug 16 '22 01:08 CodingOctocat