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

Multi-select combo box with check marks #3802

Closed
Luk164 opened this issue May 20, 2020 · 6 comments · Fixed by #4006
Closed

Multi-select combo box with check marks #3802

Luk164 opened this issue May 20, 2020 · 6 comments · Fixed by #4006
Milestone

Comments

@Luk164
Copy link

Luk164 commented May 20, 2020

Is your feature request related to a problem? Please describe.
I currently used an open source fork of extended wpf toolkit because of their CheckComboBox component. Is there any way to replace it with something from MahApps?

Describe the solution you'd like
A simple and reliable way to replace this:

<xctk:CheckComboBox
ItemsSource="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Page}}, Mode=OneWay, UpdateSourceTrigger=PropertyChanged, Path=DataContext.Tags}"
      d:DataContext="{d:DesignInstance entities:EventEntity}"
      DisplayMemberPath="Name"
      ItemSelectionChanged="Selector_OnItemSelectionChanged"
      SelectedItemsOverride="{Binding SelectedTags, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
      Foreground="{DynamicResource MahApps.Brushes.Text}" />

Additional context
This is a member of a custom datagrid column. I need it to be able to bind and immidiately update all items that are selected with checkmarks. (this is used in edit item scenario where list sends edited object to editor and page just binds everything to this object, so any items that were previously selected have to be updated)

@timunie
Copy link
Collaborator

timunie commented Jun 22, 2020

I have also a need for such a control. At the moment I use my own control which does all I need. I don't know if such a control is a good control in terms of UI / UX. Below is a preview of the current implementation:

DemoAppExample

Example of a MultiSelectionComboBox

Features at the Moment:

  • different DataTemplates for Items and SelectedItems
  • different SelectionModes
  • DataTemplate for overlay if the Text is userdefined
  • Editable mode like a normal ComboBox

@punker76 if you want to implement this control, I can make a PR here.

Happy coding
Tim

@Luk164
Copy link
Author

Luk164 commented Jun 22, 2020

@timunie Looks great, please post the code here and maybe we can add it.

@timunie
Copy link
Collaborator

timunie commented Jun 22, 2020

@Luk164 I think this is @punker76 s decision.
Never the less, if you want to have a look here is my code:

Happy coding
Tim

@Luk164
Copy link
Author

Luk164 commented Jun 22, 2020

@timunie I meant that we can implement it and send a pull request. I am pretty sure @punker76 Would not object to that. I will take a crack at it during this weekend.

@timunie
Copy link
Collaborator

timunie commented Jun 22, 2020

@Luk164 I have already #3710 and #3825 in the pipeline 😄 ... Let's wait until this is done. Thank you.

@timunie
Copy link
Collaborator

timunie commented Dec 15, 2020

@Luk164 please give me your ideas / feedback to #4006 .

Thank you and Happy coding
Tim

@punker76 punker76 added this to the 3.0.0 milestone Oct 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.

3 participants