https://github.com/qwqcode/cefsharpdraggableregion
Specify `-webkit-app-region: drag` in CSS to define which regions are draggable, functioning similarly to the OS's standard titlebar in CefSharp.
https://github.com/qwqcode/cefsharpdraggableregion
Last synced: 10 months ago
JSON representation
Specify `-webkit-app-region: drag` in CSS to define which regions are draggable, functioning similarly to the OS's standard titlebar in CefSharp.
- Host: GitHub
- URL: https://github.com/qwqcode/cefsharpdraggableregion
- Owner: qwqcode
- Created: 2018-12-30T07:54:44.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-12-30T08:34:26.000Z (about 7 years ago)
- Last Synced: 2025-04-01T12:03:56.124Z (11 months ago)
- Language: C#
- Homepage: https://qwqaq.com/57a3ffd3.html
- Size: 14.6 KB
- Stars: 21
- Watchers: 3
- Forks: 8
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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:
```html
```
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:
```css
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.