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

can't mix IsCheckable values in DropDownButton menuitems #4511

Open
TheCamel opened this issue Jul 30, 2024 · 0 comments
Open

can't mix IsCheckable values in DropDownButton menuitems #4511

TheCamel opened this issue Jul 30, 2024 · 0 comments
Labels

Comments

@TheCamel
Copy link

Describe the bug

can't mix IsCheckable items in DropDownButton when using the items source collection

try also with StyleSelector

any idea for a work around or another solution ?

Steps to reproduce

bind one to a collection and add the prop below to the control


<mah:DropDownButton Margin="5 5 10 5"
								Padding="8"
								Content="{DynamicResource DisplayMode.Title}"
								DisplayMemberPath="Header"
								ItemsSource="{Binding Displays}">
				<mah:DropDownButton.Icon>
					<mah:PathIcon Width="18"
								  Height="18"
								  Margin="6"
								  Data="M9,6H5V10H7V8H9M19,10H17V12H15V14H19M21,16H3V4H21M21,2H3C1.89,2 1,2.89 1,4V16A2,2 0 0,0 3,18H10V20H8V22H16V20H14V18H21A2,2 0 0,0 23,16V4C23,2.89 22.1,2 21,2" />
				</mah:DropDownButton.Icon>
				<mah:DropDownButton.ItemContainerStyle>
					<Style BasedOn="{StaticResource {x:Type MenuItem}}"
						   TargetType="{x:Type MenuItem}">
						<Setter Property="Command"
								Value="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type mah:DropDownButton}}, Path=DataContext.ChangeDisplayModeCommand}" />
						<Setter Property="CommandParameter"
								Value="{Binding Mode}" />
**<Setter Property="IsCheckable"
								Value="{Binding WhatYouWant}" />**
					</Style>
				</mah:DropDownButton.ItemContainerStyle>

Expected behavior

the problem is for items with sub items, it can't be checkable because it does not displays subs

Actual behavior

it has no effect.

it seems it is all checkable or not

Environment


Target Framework: .Net Core 8

@TheCamel TheCamel added the Bug label Jul 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

1 participant