[Bug]: The title bar didn't have the desired effect. in Win11
Describe the bug
Actived:
UnActived:
Steps to reproduce the bug
<Application
x:Class="WpfApp2.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:WpfApp2"
xmlns:mica="clr-namespace:MicaWPF.Lite.Styles;assembly=MicaWPF.Lite"
StartupUri="MainWindow.xaml">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<mica:ControlsDictionary />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
</Application>
<mica:MicaWindow
x:Class="BlankApp1.Views.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mica="clr-namespace:MicaWPF.Controls;assembly=MicaWPF"
xmlns:prism="http://prismlibrary.com/"
Title="{Binding Title}"
Width="525"
Height="350"
prism:ViewModelLocator.AutoWireViewModel="True"
UseLayoutRounding="True">
<Grid>
<ContentControl prism:RegionManager.RegionName="ContentRegion" />
</Grid>
</mica:MicaWindow>
Expected behavior
No response
Screenshots
No response
Windows version
Windows 11 version 22H2 (22621, 2022 Update)
.Net Version
.NET 8.x
Additional context
版本 Windows 11 专业版 版本 22H2 安装日期 2023-02-02 操作系统版本 22621.3447 体验 Windows Feature Experience Pack 1000.22688.1000.0
I've pushed 6.3.0 Download this one and tell me if it fixes your issue Also You are missing the ThemeDictionary here:
<ResourceDictionary.MergedDictionaries>
<mica:ThemeDictionary />
<mica:ControlsDictionary />
</ResourceDictionary.MergedDictionaries>
Also the namespace for mica should be MicaWPF.Lite.Controls since you are using MicaWPF.Lite:
<mica:MicaWindow
x:Class="BlankApp1.Views.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mica="clr-namespace:MicaWPF.Lite.Controls;assembly=MicaWPF"
xmlns:prism="http://prismlibrary.com/"
Title="{Binding Title}"
Width="525"
Height="350"
prism:ViewModelLocator.AutoWireViewModel="True"
UseLayoutRounding="True">
<Grid>
<ContentControl prism:RegionManager.RegionName="ContentRegion" />
</Grid>
</mica:MicaWindow>
Thank you. Let me try.
Is the title bar active or has a background color
The lastest version is 6.3.0 Try this one
Okay, I'll try
Because I don't see a version of 6.3.0 in nuget Then I pull your source code to run locally, or the same result.
Can you zip me the project or a sample project so I can replicate the issue on my end?
yes,I added it to my git. https://github.com/huangj1e/MicaWPF/tree/101-TitleBar-Background-Color
I am running the WpfDemo from your git and weirdly its working properly I didn't change anything:
Maybe it's my Windows version. What's your version number?
This is my version number. 版本 Windows 11 Pro 版本 22H2 安装日期 2023-02-02 操作系统版本 22621.3447 体验 Windows Feature Experience Pack 1000.22688.1000.0
I will download a VM with your version and try
Okay, thank you.