https://github.com/bintoss/groupbox.avalonia
A casual attempt at a "classic" styled GroupBox for Avalonia. This repository primarily serves as a minor improvement over @derekantrican's Classic and Modern GroupBox examples at https://github.com/AvaloniaUI/Avalonia/issues/823#issuecomment-692270581
https://github.com/bintoss/groupbox.avalonia
avalonia avaloniaui groupbox
Last synced: 2 months ago
JSON representation
A casual attempt at a "classic" styled GroupBox for Avalonia. This repository primarily serves as a minor improvement over @derekantrican's Classic and Modern GroupBox examples at https://github.com/AvaloniaUI/Avalonia/issues/823#issuecomment-692270581
- Host: GitHub
- URL: https://github.com/bintoss/groupbox.avalonia
- Owner: BinToss
- License: mit
- Created: 2023-07-11T09:09:04.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2025-01-30T04:41:16.000Z (3 months ago)
- Last Synced: 2025-01-30T05:24:40.393Z (3 months ago)
- Topics: avalonia, avaloniaui, groupbox
- Language: C#
- Homepage:
- Size: 764 KB
- Stars: 16
- Watchers: 2
- Forks: 0
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/semantic-release/semantic-release)
[](https://github.com/AvaloniaUI/Avalonia)[](https://github.com/BinToss/GroupBox.Avalonia/actions/workflows/ci.yml)
[](https://github.com/BinToss/GroupBox.Avalonia/actions/workflows/release.yml)
[](https://www.nuget.org/packages/BinToss.GroupBox.Avalonia/)# GroupBox.Avalonia
Another attempt to recreate the GroupBox control for AvaloniaUI.
Based on @derekantrican's Classic and Modern GroupBox examples at [[GroupBox] Missing · Issue #823 · AvaloniaUI/Avalonia](https://github.com/AvaloniaUI/Avalonia/issues/823#issuecomment-692270581).
When this library is production-ready, its themes/styles _may_ be pull-requested to teast/Avalonia.GroupBox. Otherwise, someone else will need to maintain this project.

# Known Issues
- Sample app re-distributes the checkbox labels...weirdly.
# Usage
1. Add the package: https://www.nuget.org/packages/BinToss.GroupBox.Avalonia/
```sh
dotnet add package BinToss.GroupBox.Avalonia
```2. In an AXAML/XAML file, add the following xmlns statement: `xmlns:gb="using:GroupBox.Avalonia.Controls"`. I used `ctrl` in the sample project, but other projects should use `gb`.
https://github.com/BinToss/GroupBox.Avalonia/blob/5515704496a0103200733b788bcfcad1c1ce5ea1/GroupBox.Avalonia.Sample/Views/MainView.axaml#L1-L53. Add a basic GroupBox via ``
https://github.com/BinToss/GroupBox.Avalonia/blob/5515704496a0103200733b788bcfcad1c1ce5ea1/GroupBox.Avalonia.Sample/Views/MainView.axaml#L25-L31For its contents, you should use a `Panel`-based `Control` such as `Grid` or `StackPanel`. It's a *Group*Box, after all.
4. (Optional) To use the "classic" theme replicating Windows' classic GroupBox, use `Theme="{StaticResource GroupBoxClassic}"`
https://github.com/BinToss/GroupBox.Avalonia/blob/5515704496a0103200733b788bcfcad1c1ce5ea1/GroupBox.Avalonia.Sample/Views/MainView.axaml#L16-L18---
For more info, see [GroupBox.Avalonia.Sample](https://github.com/BinToss/GroupBox.Avalonia/tree/main/GroupBox.Avalonia.Sample).