Skip to content

用于类型“MenuItem”的样式不能应用于类型“Separator” #829

Closed

Description

@hyfree

Describe the bug
A clear and concise description of what the bug is.
新建wpf项目并且引入HandyControl,HandyControl版本=3.1.0

经过测试,此问题在3.0.0版本中未发现,仅在3.1.0中出现该问题

在Menu标签中加入Separator会导致异常

image

Code

<Window
    x:Class="WpfApp3.MainWindow"
    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:local="clr-namespace:WpfApp3"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    Title="MainWindow"
    Width="800"
    Height="450"
    mc:Ignorable="d">
    <Grid>
        <Menu>
            <MenuItem />
            <MenuItem />
            <Separator />
            <MenuItem />
            <MenuItem />
        </Menu>

    </Grid>
</Window>

异常

错误	XDG0066	用于类型“MenuItem”的样式不能应用于类型“Separator”。


错误	XDG0062	Baml 流中出现意外记录。尝试添加到不是集合或具有 TypeConverter 的 Path。	

Activity

  1. added a commit that references this issue on Mar 28, 2024
    a24baef
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      ⌂ 换网址