Skip to content

In a ContextMenu ItemsControl is creating a hierachical layer #1248

@Aaron-Stewart-RPS

Description

@Aaron-Stewart-RPS

In the blow snippet of code the ItemsControl gets created as a kind of background menu to the bound menu items.

        <fluent:MenuItem Header="Copy As">
            <fluent:MenuItem Command="commands:Commands.CopyText" Style="{StaticResource toolMenuItem}"/>
            <fluent:MenuItem Command="commands:Commands.CopyHTML" Style="{StaticResource toolMenuItem}"/>
            <Separator/>
            <ItemsControl ItemsSource="{Binding DocumentContainer.ClipboardFormats}" >
                <ItemsControl.ItemTemplate>
                    <DataTemplate>
                        <fluent:MenuItem    Header="{Binding DisplayName}"
                                            Command="commands:Commands.CopyOther"
                                            CommandParameter="{Binding}" />
                    </DataTemplate>
                </ItemsControl.ItemTemplate>
            </ItemsControl>
        </fluent:MenuItem>

Reverting to V10.1.0 fixed the issue, but 11.0.1 did not.

Thank you for your continued efforts.


Environment

- Fluent.Ribbon: 11.0.0
- Windows 11
- .NET 4.8

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions