You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[DataTemplate][Windows] Property Not Found Exception at Styles/Generic.xaml #19977
Somehow Xaml Compiler does not find a Property in a DataTemplate Definition there, but its not altering from all the other DataTemplate Definitions, imported as ResourceDictionary and should be fine...
Expected behavior
Should not throw issue?
How to reproduce it (as minimally and precisely as possible)
(will apply workaround meanwile I dont know the problem source at later commits)
Workaround
as they has been in the page resources that was not happening, so will revert those Refactoring to that central StaticResource as Workaround
Not Rebuild or Build Solution only run debug?
Works on UWP/WinUI
Debug Run target Desktop builds, but "(Re)build Solution" after "Clean Solution" does throw this issue only for the additional Windows target, which is not targeted by debug...
Environment
No response
NuGet package version(s)
No response
Affected platforms
Build tasks
IDE
Visual Studio 2022
IDE version
17.13.6
Relevant plugins
No response
Anything else we need to know?
Added Assets/Samples/**.txt files which are containing xaml copyed code, which are throwing an Issue when used as UnoAsset available as BuildAction, but not documented? set them to Resources but dont know if thats the correct setting when I want to load them with IStorage at runtime and this could cause this issue also
changed the title [-][DataTemplate] Property Not Found Exception at Styles/Generic.xaml ?[/-][+][DataTemplate][Windows] Property Not Found Exception at Styles/Generic.xaml[/+]on Apr 19, 2025
Dont know what exactly that is sourcing in but at current last stable of this repo (parent of "delete SampleCode" commit) its not showing it. But the styles are not theme responsive which makes the resourced DataTemplates not really pretty...
This is an odd error. As it's a WinAppSDK error, the only way around it is to find a workaround, there's generally no fix that we can make in Uno that can help.
Hm since the theme taken from the material toolkit is not theme responsive, can you tell if you might see the reason for this when its set to desktop and not Windows target? All I could consider is just not name any styles and so on but thats nor really cool as you will know... Maybe I did oversee something? 😅
@jeromelaban I tryed that days to re-activate the windows target on the app as I only dragged the target out of the TargetFrameworks and commented it out... Still not building to windows target with 6.0.146 🤔 I dont have any idea whats causing this...
do you maybe have any known workaround I could use for unsing a ResourceDictionary through the Material Toolkit provided MergedDictionarys in my App.xaml? Readed from one of the MS MVP on our discord server that he knowing the page resources as more unreliable and preferres the app approach... Will see if I find the name to link him, maybe he has a idea for this...
@AndrewKeepCoding Do you have any idea why this is happening or how I could make this project build also properly to windows but using a central ResourceDictionary for DataTemplates?
Linking to the src directory of the app I tested it last days on to include again...
It might be worth considering a different file (class) name, ThemeResources.xaml/ThemeResources.xaml.cs maybe?
That said, now you'll get the following exception:
The text associated with this error code could not be found.
Cannot find a Resource with the Name/Key DefaultPersonPictureStyle [Line: 82 Position: 17]
Adding the XamlControlsResources in Generic.xaml doesn't help.
@AndrewKeepCoding that's for checking on this! Indeed I think as I were creating this ResourcesDictionary file, I used the uno docs guide for defining own template librarys🤔 will check on the advised name there and if that name is indeed advised like this there I will make a quick PR to fix this doc, so others will not stumble over this in the future and not knowing why thats happening 😅
To the Codebehind and this also in my case applies to the Control templates aka CustomControl/UserControl:
I think Jeromé told me in the past on discord server that there is kind of a limitation for this in mvux apps😅
if I remember correctly, this requires to do it in an mvvm approach (=>which could potentially cause problems if used alongside with mvvm feature) and trying it although to do it in mvux did cause already problems in the same app spoken of, in one of the first commits, when I tryed to define and use a CustomControl for the "GridListViewHeader" i think I did name it, which I did bind or targeted to bind to the mvux:FeedView using a mvux generated Command. Lastly the hot Reload had problems updating changes in there.
@jeromelaban I would not remember reded this remark to CustomControl -mvux vs. Mvvm on the Docs. Could this information, including a simple but usable workaround advose, get considered to be added by someone of maybe the team or any deeper involved and knowing person to the appropriate docs until this might be resolved in the future?
Additionaly reason for me trying to add such CustomControl:
Setting all the callbacks up for enabling disabling and so on were adding so much boilerplate that I also requested a enhancement to get a HeaderTemplate that could be added to ListView AND Gridview as both of them are inheriting in uno from the ListViewBase I think that was called. Its in the contributing>internals docs.
So by that we could already bind to the FeedView that could include already the refresh bound or re-use this template for both view kinds😅 added a feature request at January I think but so far, seems like nobody had time to even take a look on this to consider.
Therefore my only way to workaround this were using DataTemplates with AncestorBinding or Binding with Parent in-between.
This issue has had no activity for 120 days. It will be closed in 10 days if there is no further activity. Remove the Stale label or leave a comment to keep it open.
Thanks for the detailed investigation here, and thanks @AndrewKeepCoding for digging in. As Jerome mentioned, this error originates on the WinAppSDK side when targeting Windows directly, so there's no fix we can apply from Uno itself. We've already linked this scenario to our external Microsoft follow-up umbrella at #982, so I'll go ahead and close this one to keep things tidy — please continue to track progress there. If you'd like upstream visibility, filing it on https://github.com/microsoft/microsoft-ui-xaml is the most effective path.
Activity
[-][DataTemplate] Property Not Found Exception at Styles/Generic.xaml ?[/-][+][DataTemplate][Windows] Property Not Found Exception at Styles/Generic.xaml[/+]DevTKSS commentedon May 9, 2025
Dont know what exactly that is sourcing in but at current last stable of this repo (parent of "delete SampleCode" commit) its not showing it. But the styles are not theme responsive which makes the resourced DataTemplates not really pretty...
jeromelaban commentedon May 9, 2025
This is an odd error. As it's a WinAppSDK error, the only way around it is to find a workaround, there's generally no fix that we can make in Uno that can help.
DevTKSS commentedon May 9, 2025
Hm since the theme taken from the material toolkit is not theme responsive, can you tell if you might see the reason for this when its set to desktop and not Windows target? All I could consider is just not name any styles and so on but thats nor really cool as you will know... Maybe I did oversee something? 😅
DevTKSS commentedon Jun 29, 2025
@jeromelaban I tryed that days to re-activate the windows target on the app as I only dragged the target out of the TargetFrameworks and commented it out... Still not building to windows target with 6.0.146 🤔 I dont have any idea whats causing this...
do you maybe have any known workaround I could use for unsing a ResourceDictionary through the Material Toolkit provided MergedDictionarys in my App.xaml? Readed from one of the MS MVP on our discord server that he knowing the page resources as more unreliable and preferres the app approach... Will see if I find the name to link him, maybe he has a idea for this...
DevTKSS commentedon Jun 29, 2025
@AndrewKeepCoding Do you have any idea why this is happening or how I could make this project build also properly to windows but using a central ResourceDictionary for DataTemplates?
Linking to the src directory of the app I tested it last days on to include again...
https://github.com/DevTKSS/DevTKSS.Uno.SampleApps/tree/master/src%2FDevTKSS.Uno.Samples.MvuxGallery
To Desktop target thats not problem at all, but as soon as its to windows target, no chance...
AndrewKeepCoding commentedon Jul 1, 2025
@DevTKSS
x:Bindorx:DataTyperequires a code-behind cs file. Something like this:Styles/Generic.xaml.cs
Styles/Generic.xaml
microsoft/microsoft-ui-xaml#10571
It might be worth considering a different file (class) name, ThemeResources.xaml/ThemeResources.xaml.cs maybe?
That said, now you'll get the following exception:
Adding the XamlControlsResources in Generic.xaml doesn't help.
I'm still not sure if this comes from Uno or WinUI. Removing that line fixes the issue, though it seems that you don't need the default style there.
DevTKSS commentedon Jul 1, 2025
@AndrewKeepCoding that's for checking on this! Indeed I think as I were creating this ResourcesDictionary file, I used the uno docs guide for defining own template librarys🤔 will check on the advised name there and if that name is indeed advised like this there I will make a quick PR to fix this doc, so others will not stumble over this in the future and not knowing why thats happening 😅
To the Codebehind and this also in my case applies to the Control templates aka CustomControl/UserControl:
I think Jeromé told me in the past on discord server that there is kind of a limitation for this in mvux apps😅
if I remember correctly, this requires to do it in an mvvm approach (=>which could potentially cause problems if used alongside with mvvm feature) and trying it although to do it in mvux did cause already problems in the same app spoken of, in one of the first commits, when I tryed to define and use a CustomControl for the "GridListViewHeader" i think I did name it, which I did bind or targeted to bind to the mvux:FeedView using a mvux generated Command. Lastly the hot Reload had problems updating changes in there.
@jeromelaban I would not remember reded this remark to CustomControl -mvux vs. Mvvm on the Docs. Could this information, including a simple but usable workaround advose, get considered to be added by someone of maybe the team or any deeper involved and knowing person to the appropriate docs until this might be resolved in the future?
Additionaly reason for me trying to add such CustomControl:
Setting all the callbacks up for enabling disabling and so on were adding so much boilerplate that I also requested a enhancement to get a HeaderTemplate that could be added to ListView AND Gridview as both of them are inheriting in uno from the ListViewBase I think that was called. Its in the contributing>internals docs.
So by that we could already bind to the FeedView that could include already the refresh bound or re-use this template for both view kinds😅 added a feature request at January I think but so far, seems like nobody had time to even take a look on this to consider.
Therefore my only way to workaround this were using DataTemplates with AncestorBinding or Binding with Parent in-between.
AndrewKeepCoding commentedon Jul 1, 2025
@DevTKSS The naming suggestion is just a tip for better naming. I don't believe it's the root of the issue here.
DevTKSS commentedon Jul 1, 2025
@Jen-Uno maybe the external linked DataTemplate issue should get added to the external follow up Microsoft epic pinned issues list?
Jen-Uno commentedon Jul 2, 2025
@DevTKSS I will check with @jeromelaban
jeromelaban commentedon Jul 9, 2025
I've added the issue to the #982
github-actions commentedon May 12, 2026
This issue has had no activity for 120 days. It will be closed in 10 days if there is no further activity. Remove the Stale label or leave a comment to keep it open.
MartinZikmund commentedon May 18, 2026
Thanks for the detailed investigation here, and thanks @AndrewKeepCoding for digging in. As Jerome mentioned, this error originates on the WinAppSDK side when targeting Windows directly, so there's no fix we can apply from Uno itself. We've already linked this scenario to our external Microsoft follow-up umbrella at #982, so I'll go ahead and close this one to keep things tidy — please continue to track progress there. If you'd like upstream visibility, filing it on https://github.com/microsoft/microsoft-ui-xaml is the most effective path.