-
-
Notifications
You must be signed in to change notification settings - Fork 773
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
ListView does not display columns #918
Comments
I have the same issue with |
Workaround: <ListView ItemsSource="{Binding ViewModel.Items}">
<ListView.ItemContainerStyle>
<Style TargetType="{x:Type ListViewItem}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type ListViewItem}">
<GridViewRowPresenter Content="{TemplateBinding Content}" Columns="{TemplateBinding GridView.ColumnCollection}" />
</ControlTemplate>
</Setter.Value>
</Setter>
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
</Style>
</ListView.ItemContainerStyle>
<ListView.View>
<GridView>
<GridViewColumn Header="Key" DisplayMemberBinding="{Binding Key}" />
<GridViewColumn Header="Value" CellTemplateSelector="{StaticResource MyTemplateSelector}" />
</GridView>
</ListView.View>
</ListView> |
2 tasks
I'm looking to move my project to use WPFUI and I too am running into this issue. Looks great otherwise though so really hoping to see resolution. I'll also try this workaround, thanks. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
When using a ListView with columns defined, the ListView does not display the columns, instead the ListViewItems are displayed using their ToString()
To Reproduce
Expected behavior
The ListView should display the ListViewItems in columns.
Screenshots
No response
OS version
Windows 10 & 11
.NET version
.NET 8
WPF-UI NuGet version
Latest from Main
Additional context
No response
The text was updated successfully, but these errors were encountered: