-
-
Notifications
You must be signed in to change notification settings - Fork 4
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
Support ResourcesDictionary With a Code-Behind #78
Comments
The code behind file does not seem to be generated, can't you just add a Generic.xaml.cs that has the required content? |
Generic file is generated by your tool, how i can add a code-behind for this? What do you think about this Idea, if we consider a property for example IsCodeBehind
Then, instead of the contents of this dictionary being placed inside the generic, We only have one reference to this dictionary in Generic.xaml-->
|
The Generic.xaml is generated by my tool, but it doesn't know or care about any code files. |
So how about x:class attribute? Does this attribute added to generic.xaml by tool? |
All attributes/namespaces are taken over to the generated file. Have you tried just adding a Generic.xaml.cs for your case? |
I will test as soon as I get home |
You could try copying your existing file and just rename it to Generic.xaml.cs. That might work. I have to admit that i haven't done any WinUI development so far. So it's just guessing from my WPF experience. |
Ok tnx i should test, Do you have any comment about my idea? Adding a property in xamlcombineitem csproj? I think this can be work |
hi, i have a Library and in this library i have a ResourcesDictionary file called
ItemTemplate.xaml
in this file i have aDataTemplate
, for using x:Bind method i have to set an empty Code-Behind for this ResourcesDictionary. when i compile my library with merging this ResourcesDictionary into Generic.xaml file and running an example project, i get some exceptions. is this supported? if not can you please add it?https://github.com/WinUICommunity/LandingsPage/blob/main/LandingsPage/Themes/ItemTemplates.xaml
https://github.com/WinUICommunity/LandingsPage/blob/main/LandingsPage/Themes/ItemTemplates.xaml.cs
The text was updated successfully, but these errors were encountered: