C
C#2y ago
Toreole

WPF ListView.HeaderTemplate property not found

While trying to apply DataTemplates to a ListView, i found out that the ListView.HeaderTemplate property does not exist in my project, despite it being used in the "Item templates for list view" example in the documentation (see: https://learn.microsoft.com/en-us/windows/apps/design/controls/item-templates-listview#table-list-item) With there being no info on what version of anything or whether any specific nuget package is required for this feature, i am completely lost. project info: VisualStudio version: 17.5.3 ouput: exe / Windows Target Framework: .NET 7.0 Target OS Version: 10.0.22621.0 WPF enabled C# Version: 11.0 full project: https://github.com/Toreole/BasicCombatlogParser
10 Replies
ACiDCA7
ACiDCA72y ago
can you show the code where you have the problem.. i dont want to dig through the repo to guess what you could have done
Toreole
ToreoleOP2y ago
well right here
ACiDCA7
ACiDCA72y ago
hmm i doubt it but lemme ask nontheless.. do you have customcontrol that maybe also is named ListView? alternative.. did you try to fill out the headertemplate with content.. maybe designer a bit buggy? (wouldnt be the first time)
Toreole
ToreoleOP2y ago
No i do not have a custom control that is named ListView. This same issue also occurs in a blank project (WPF Template project) with only a MainWindow.xaml and unfortunately it doesnt seem to be just designer being buggy this time
ACiDCA7
ACiDCA72y ago
if you select listview then f12 to go to the definition can you check if there is actually a headertemplate dependencyproperty? i hope at least that were the steps.. currently dont have vs open
Toreole
ToreoleOP2y ago
the only DependencyProperty immediately visible in ListView when checking the "ListView [from metadata]" file is ViewProperty
ACiDCA7
ACiDCA72y ago
aaah god dammit that dependecyproperty is uwp not wpf
Toreole
ToreoleOP2y ago
huh so the article i was looking at wasnt for wpf at all then awesome that it all looks the exact same so you dont know until its too late thank you
ACiDCA7
ACiDCA72y ago
jea i also had to look twice before i saw that..xD
Want results from more Discord servers?
Add your server