MicaWPF icon indicating copy to clipboard operation
MicaWPF copied to clipboard

[Bug]: The title bar didn't have the desired effect. in Win11

Open huangj1e opened this issue 1 year ago • 12 comments

Describe the bug

Actived: image

UnActived: image

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

huangj1e avatar May 09 '24 03:05 huangj1e

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>

Simnico99 avatar May 09 '24 06:05 Simnico99

Thank you. Let me try.

huangj1e avatar May 09 '24 06:05 huangj1e

Is the title bar active or has a background color

image

image

huangj1e avatar May 09 '24 06:05 huangj1e

The lastest version is 6.3.0 Try this one

Simnico99 avatar May 09 '24 06:05 Simnico99

Okay, I'll try

huangj1e avatar May 09 '24 06:05 huangj1e

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.

image

huangj1e avatar May 09 '24 07:05 huangj1e

Can you zip me the project or a sample project so I can replicate the issue on my end?

Simnico99 avatar May 09 '24 07:05 Simnico99

yes,I added it to my git. https://github.com/huangj1e/MicaWPF/tree/101-TitleBar-Background-Color

huangj1e avatar May 09 '24 07:05 huangj1e

I am running the WpfDemo from your git and weirdly its working properly I didn't change anything: image

Simnico99 avatar May 09 '24 07:05 Simnico99

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

huangj1e avatar May 09 '24 07:05 huangj1e

image I will download a VM with your version and try

Simnico99 avatar May 09 '24 07:05 Simnico99

Okay, thank you.

huangj1e avatar May 09 '24 07:05 huangj1e