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

ListView missing in .NET 9 Fluent theme #10076

Open
antikmozib opened this issue Nov 15, 2024 · 0 comments
Open

ListView missing in .NET 9 Fluent theme #10076

antikmozib opened this issue Nov 15, 2024 · 0 comments

Comments

@antikmozib
Copy link

antikmozib commented Nov 15, 2024

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

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

No branches or pull requests

1 participant