Describe the bug
When using the latest version of Wpf.Ui (lepoco) in a .NET 10 WPF application, setting the Appearance property of a ui:Button to Primary renders the button as completely transparent.
Interestingly, other appearance types seem to render correctly, and the issue only occurs if the required ResourceDictionary merged dictionaries are defined locally within <ui:FluentWindow.Resources>. If the exact same resource dictionaries are moved to App.xaml, the Primary button style loads and renders as expected.
To Reproduce
Steps to reproduce the behavior:
- Create a brand new WPF Application targeting .NET 10.
- Install the latest version of the
Wpf.Ui NuGet package.
- Leave
App.xaml / App.xaml.cs untouched (with no local Wpf.Ui resource dictionaries).
- Update
MainWindow.xaml to use ui:FluentWindow and define the resources locally as follows:
<ui:FluentWindow
x:Class="WpfApp7.MainWindow"
xmlns="[http://schemas.microsoft.com/winfx/2006/xaml/presentation](http://schemas.microsoft.com/winfx/2006/xaml/presentation)"
xmlns:x="[http://schemas.microsoft.com/winfx/2006/xaml](http://schemas.microsoft.com/winfx/2006/xaml)"
xmlns:d="[http://schemas.microsoft.com/expression/blend/2008](http://schemas.microsoft.com/expression/blend/2008)"
xmlns:local="clr-namespace:WpfApp7"
xmlns:mc="[http://schemas.openxmlformats.org/markup-compatibility/2006](http://schemas.openxmlformats.org/markup-compatibility/2006)"
xmlns:ui="[http://schemas.lepo.co/wpfui/2022/xaml](http://schemas.lepo.co/wpfui/2022/xaml)"
Title="MainWindow"
Width="800"
Height="450"
mc:Ignorable="d">
<ui:FluentWindow.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ui:ThemesDictionary Theme="Light" />
<ui:ControlsDictionary />
<ResourceDictionary Source="pack://application:,,,/Wpf.Ui;component/Controls/Button/Button.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</ui:FluentWindow.Resources>
<Grid>
<ui:TitleBar />
<ui:Button
Width="100"
Height="30"
Appearance="Primary"
Content="Test Button" />
</Grid>
</ui:FluentWindow>
- Run the application.
- Observe that the
ui:Button is transparent/invisible, even though it should display with the primary theme color.
Expected behavior
Expect button color to be blue when Primary is selected
Screenshots
OS version
Windows 10
.NET version
10
WPF-UI NuGet version
4.3.0
Additional context
No response
Describe the bug
When using the latest version of
Wpf.Ui(lepoco) in a .NET 10 WPF application, setting theAppearanceproperty of aui:ButtontoPrimaryrenders the button as completely transparent.Interestingly, other appearance types seem to render correctly, and the issue only occurs if the required
ResourceDictionarymerged dictionaries are defined locally within<ui:FluentWindow.Resources>. If the exact same resource dictionaries are moved toApp.xaml, thePrimarybutton style loads and renders as expected.To Reproduce
Steps to reproduce the behavior:
Wpf.UiNuGet package.App.xaml/App.xaml.csuntouched (with no localWpf.Uiresource dictionaries).MainWindow.xamlto useui:FluentWindowand define the resources locally as follows:ui:Buttonis transparent/invisible, even though it should display with the primary theme color.Expected behavior
Expect button color to be blue when
Primaryis selectedScreenshots
OS version
Windows 10
.NET version
10
WPF-UI NuGet version
4.3.0
Additional context
No response