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的ColumnHeaderFontSize无效(所有的listview代码可以在这里直接复制) #268

Open
Sandf123hehe opened this issue Sep 22, 2024 · 2 comments

Comments

@Sandf123hehe
Copy link
Collaborator

No description provided.

@Sandf123hehe
Copy link
Collaborator Author

    <ListView
        Name="MyListView"
        pu:ListViewHelper.ColumnHeaderClickBackground="Green"
        pu:ListViewHelper.ColumnHeaderClickBorderBrush="Red"
        pu:ListViewHelper.ColumnHeaderClickBorderThickness="2"
        pu:ListViewHelper.ColumnHeaderClickForeground="Blue"
        pu:ListViewHelper.ColumnHeaderFontSize="100">
        <ListView.View>
            <GridView>
                <GridViewColumn DisplayMemberBinding="{Binding Name}" Header="Name" />
                <GridViewColumn DisplayMemberBinding="{Binding Age}" Header="Age" />
            </GridView>
        </ListView.View>
    </ListView>

@Sandf123hehe
Copy link
Collaborator Author

    public MainWindow()
    {
        InitializeComponent();
        LoadData();
    }

    private void LoadData()
    {
        var people = new List<Person>
    {
        new Person { Name = "Alice", Age = 30 },
        new Person { Name = "Bob", Age = 25 },
        new Person { Name = "Charlie", Age = 35 }
    };

        MyListView.ItemsSource = people;
    }
    public class Person
    {
        public string Name { get; set; }
        public int Age { get; set; }
    }

@Sandf123hehe Sandf123hehe changed the title ListView的ColumnHeaderFontSize无效 ListView的ColumnHeaderFontSize无效(所有的listview代码可以在这里直接复制) Sep 22, 2024
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