I also had to set:
HorizontalContentAlignment="Stretch"
on the containing ListBox
.
More Related Contents:
- Select ListBoxItem if TextBox in ItemTemplate gets focus
- How to disable a databound ListBox item based on a property value?
- What is a ViewModelLocator and what are its pros/cons compared to DataTemplates?
- ItemContainerGenerator.ContainerFromItem() returns null?
- How to get controls in WPF to fill available space?
- Is there a way to use data-template inheritance in WPF?
- What’s the meaning of * (asterisk) in XAML ColumnDefinition?
- WPF ListView with horizontal arrangement of items?
- How to disable highlighting on listbox but keep selection?
- WPF Some styles not applied on DataTemplate controls
- How to get DataTemplate.DataTrigger to check for greater than or less than?
- Change Data template dynamically
- How to capture a mouse click on an Item in a ListBox in WPF?
- WPF ListBox with a ListBox – UI Virtualization and Scrolling
- WPF: Remove dotted border around focused item in styled listbox
- How can I have a ListBox auto-scroll when a new item is added?
- Different views / data template based on member variable
- How can I sort a ListBox using only XAML and no code-behind?
- How can I implement fading in and out of Added/Removed ListItems
- Force TextBlock to wrap in WPF ListBox
- Child elements of scrollviewer preventing scrolling with mouse wheel?
- How to display search results in a WPF items control with highlighted query terms
- How do I dynamically bind and statically add MenuItems?
- WPF ListView with GridViewColumn and DataTemplate
- How to bind DataTemplate datatype to interface?
- ComboBox Dropdown when Mouse Enter WPF
- WPF VirtualizingStackPanel for increased performance
- What WPF books would you recommend? [closed]
- WPF Events in ResourceDictionary for a ControlTemplate
- WPF ComboBox without drop-down button