Skip to content

Specify `-webkit-app-region: drag` in CSS to define which regions are draggable, functioning similarly to the OS's standard titlebar in CefSharp.

Notifications You must be signed in to change notification settings

qwqcode/CefSharpDraggableRegion

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

CefSharpDraggableRegion

You can specify -webkit-app-region: drag in CSS to tell CefSharp which regions are draggable (like the OS's standard titlebar), and apps can also use -webkit-app-region: no-drag to exclude the non-draggable area from the draggable region. Note that only rectangular shapes are currently supported.

To make the whole window draggable, you can add -webkit-app-region: drag as body's style:

<body style="-webkit-app-region: drag">
</body>

And note that if you have made the whole window draggable, you must also mark buttons as non-draggable, otherwise it would be impossible for users to click on them:

button {
  -webkit-app-region: no-drag;
}

If you're only setting a custom titlebar as draggable, you also need to make all buttons in titlebar non-draggable.

About

Specify `-webkit-app-region: drag` in CSS to define which regions are draggable, functioning similarly to the OS's standard titlebar in CefSharp.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published