8000 ListView missing in .NET 9 Fluent theme · Issue #10076 · dotnet/wpf · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
ListView missing in .NET 9 Fluent theme #10076
Closed
@antikmozib

Description

@antikmozib

Description

Image
The above screenshots represent the same application and code except that the first one is built with .NET 9 using Fluent theme and the second one is built with .NET 8.

I am wondering if I am missing something here or if it's a bug.

Thank you


MainWindow.xaml

<Window x:Class="WpfApp1.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:WpfApp1"
        mc:Ignorable="d"
        Title="MainWindow"
        Height="200"
        Width="300">
    <Grid>
        <ListView ItemsSource="{Binding Cars}">
            <ListView.View>
                <GridView>
                    <GridViewColumn Header="Make"
                                    DisplayMemberBinding="{Binding Path=Make}" />
                    <GridViewColumn Header="Model"
                                    DisplayMemberBinding="{Binding Path=Model}" />
                </GridView>
            </ListView.View>
        </ListView>
    </Grid>
</Window>

MainWindow.xaml.cs

public partial class MainWindow : Window
{
    public MainWindow()
    {
        InitializeComponent();

        DataContext = new MainViewModel();
    }
}

MainViewModel.cs

public class MainViewModel
{
    public class Car
    {
        public string? Make { get; set; }

        public string? Model { get; set; }
    }

    public ObservableCollection<Car> Cars { get; set; } = [];

    public MainViewModel()
    {
        Cars.Add(new Car() { Make = "Toyota", Model = "Corolla" });
        Cars.Add(new Car() { Make = "Honda", Model = "Civic" });
    }
}

Reproduction Steps

Create a WPF project with .NET 9 + Fluent theme and add a ListView with some column headers.

Expected behavior

ListView in Fluent style.

Actual behavior

No ListView.

Regression?

No response

Known Workarounds

No response

Impact

No response

Configuration

.NET 9.0.100
VS 2022 17.12
Windows 11 24H2 x64

Other information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    ☑ Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0