Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A bug in NavigationView #142

Open
6 tasks done
cjhdevact opened this issue Jan 23, 2025 · 1 comment
Open
6 tasks done

A bug in NavigationView #142

cjhdevact opened this issue Jan 23, 2025 · 1 comment
Labels
package: controls Taking place in the iNKORE.UI.WPF.Modern.Controls project

Comments

@cjhdevact
Copy link

cjhdevact commented Jan 23, 2025

Describe the bug

如图所示,图一为刚创建的窗口
Image
如图所示,图二为点击了展开按钮后再收起的窗口
Image
可以看到,第一张图在创建窗口时被错误显示的”M“在第二张图消失了
https://github.com/user-attachments/assets/05d086e2-c9b4-42d8-b302-9a7d10d60688

Reproduction

使用这段xml创建一个窗口

<Window x:Class="LockTimeSettingWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern"
        WindowStartupLocation="CenterScreen"
        Topmost="True"
        Icon="appicon.ico"
        ui:WindowHelper.UseModernWindowStyle="True"
        ui:WindowHelper.SystemBackdropType="Mica"
        ui:TitleBar.IsBackButtonVisible="False"
        ui:TitleBar.IsBackEnabled="False"
        ui:WindowHelper.FixMaximizedWindow="True"
        ui:TitleBar.Height="30"
        xmlns:local="clr-namespace:LockTime"
        mc:Ignorable="d"
        Title="设置" Height="600" Width="800" >
    <ui:NavigationView x:Name="nvSample5" Header="设置" IsTabStop="False" PaneDisplayMode="Auto">
        <ui:NavigationView.MenuItems>
            <ui:NavigationViewItem Content="Menu Item1" Tag="LockTimeAboutPage">
            <ui:NavigationViewItem.Icon>
                <ui:FontIcon FontFamily="Segoe Fluent Icons" Glyph="&#xe946;" />
            </ui:NavigationViewItem.Icon>
        </ui:NavigationViewItem>
       </ui:NavigationView.MenuItems>
             <ui:Frame x:Name="contentFrame5" Margin="0,0,0,0" />
    </ui:NavigationView>
</Window>

Suggested Solution

那个”M“无论什么时候如果没有被展开都不应该被显示

Library Version

0.10.0

Operating System

Windows 11

Framework

.NET Framework

Framework Version

4.5.2

Source of Package

NuGet.org (Package)

Additional Notes

Validations

  • Check that there isn't already an issue that reports the same or similar problem.
  • Check that this is a bug in the library that should be fixed, not a feature, also this is not about the documentation. (Or please choose the right repo and template.)
  • This is one single problem, or a few problems with the same cause. (If you want to report multiple problems, please create one issue for every single problem.)
  • You've checked that this problem still exists in the latest version. (Keep in mind that we don't provide any support for old versions.)
  • You know that we can't guarantee that we will satisfy your request. This is not really our duty to do everything anyone asks for. Also, you will treat our staff, contributors, and other users with respect and kindness.
  • You're sure there's something wrong with the library itself, not how you're using it. (If you are having issues using it and need help, please go to discussion.)
@cjhdevact cjhdevact added the status: needs-triage Waiting to be triaged by our memebers label Jan 23, 2025
@NotYoojun NotYoojun added package: base Taking place in the iNKORE.UI.WPF.Modern project package: controls Taking place in the iNKORE.UI.WPF.Modern.Controls project and removed status: needs-triage Waiting to be triaged by our memebers package: base Taking place in the iNKORE.UI.WPF.Modern project labels Jan 23, 2025
@NotYoojun
Copy link
Member

这个问题很久以前就有了,目前可以通过手动设置 IsPaneOpen 为 false 来修补这个问题。我过几天看能不能修一下代码。

https://github.com/iNKORE-NET/Documentation/blob/main/data%2Fdocs%2Fui-wpf-modern%2F03.%20components%2F08.%20navigation%2F%23%20navigation-view%2Findex.en-US.mdx#L49-L55

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: controls Taking place in the iNKORE.UI.WPF.Modern.Controls project
Projects
None yet
Development

No branches or pull requests

2 participants