FluentAvalonia
FluentAvalonia copied to clipboard
Use Controls only
Am I able to just use the WinUI Button / TextBox Style without applying the whole Window Style to my UI?
Easiest way would be to just pull in the styles you want directly into your app.
Otherwise you can specify which controls to skip in the Fluent avalonia theme.
<sty:FluentAvaloniaTheme SkipControls="DataGrid;etc..." />
Could you give an example to just apply the Styles for Button and TextBox? I'd like to use it with https://github.com/evilbaschdi/Dice/tree/develop/Dice.Avalonia
I wouldn't normally advise doing this, however, you can use SkipControls property on FluentAvaloniaTheme in stable branch (it's going away in the future though) to skip loading everything except textbox and button. You could also copy the styles in their axaml files here into your own project and reference them via StyleInclude. Note that doing this will require you to ensure any resources and dependencies are still available - and some resources are handled internally by FluentAvaloniaTheme. There may also be conflicts in resources between the Fluent v1 theme upstream and Fluentv2 here that could cause some undesired effects. Also note that if you require theme switching (light/dark mode), styles here won't respond to changes in the upstream FluentTheme, that requires FluentAvaloniaTheme or your own theme manager.