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

Fill DropDownButton items without Binding #2078

Closed
Iworb opened this issue Aug 19, 2015 · 4 comments · Fixed by #2572
Closed

Fill DropDownButton items without Binding #2078

Iworb opened this issue Aug 19, 2015 · 4 comments · Fixed by #2572
Labels
Milestone

Comments

@Iworb
Copy link

Iworb commented Aug 19, 2015

Is there a way to create DropDownButton without Binding? I've trired to add Buttons into "Items" property or create ContextMenu, but all the same - DropDown part always empty, instead of Binding way.
I just wanna create some DropDownButton menu with hierarchy like that:
Add:
- To 1st list
- To 2nd list

@QuantumDeveloper
Copy link
Contributor

Yeah, this is my fault. This control was designed only for MVVM, but I think I could modify it to use items without binding

@Iworb
Copy link
Author

Iworb commented Aug 19, 2015

It should be great if this control can hold Buttons like DropDownButtons in other packs, because I have no idea how this one could be used, because he has no SelectedItem property... Now it looks like Button with tooltip of what items we have.

@michaelmairegger
Copy link
Contributor

@QuantumDeveloper any news? It would be cool if I could write code like this:

<controls1:DropDownButton Content="..." >
  <controls1:DropDownButton.Items>
    <controls1:ToggleSwitch />
    <ComboBox />
  </controls1:DropDownButton.Items>
</controls1:DropDownButton>

otherwise I have to use the workaround with an Array:

<controls1:DropDownButton Content="..." >
  <controls1:DropDownButton.ItemsSource>
    <x:Array Type="{x:Type system:Object}">
      <controls1:ToggleSwitch />
      <ComboBox />
    </x:Array>
  </controls1:DropDownButton.ItemsSource>
</controls1:DropDownButton>

@QuantumDeveloper
Copy link
Contributor

Hi. The problem here is that actual Items property is to in corresponding with ContextMenu items property, which is actually displayed. Thats why there is an empty list.
Currently I have no idea how to fix that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging a pull request may close this issue.

4 participants