marc40000
marc40000

Reputation: 3197

How to change the text of a header of a column of a ListView in WPF from C#?

I found out I can do

((GridView)myListView.View).Columns[i].Width = x;

to change the width. But how to Change the Header text? I can't find anything like

((GridView)myListView.View).Columns[i].Content = "Hello World";

Upvotes: 4

Views: 3937

Answers (1)

mark_h
mark_h

Reputation: 5477

You just need to change the header property;

((GridView)myListView.View).Columns[i].Header = "Hello World";

Upvotes: 4

Related Questions