mfractor / mfractor-feedback

Found a bug or have a feature request for MFractor? Submit it here!
3 stars 0 forks source link

Enhancement: Read styles from Merged dictionaries from the App level resource dictionary #292

Closed Pastajello closed 3 years ago

Pastajello commented 3 years ago

Hi,

I'm not sure if this is an enhancement or a bug? because this may be working for some. But anyway. Im creating a quite big application with a team. We have a lot of screens, colors, styles so to keep things tidy we put our resources in separate files and added them to the App like so: `

` Recently I've installed MFractor, and I see that a some things are recognised(but that may be a local style, not sure) but mostly styles are treaded as not existing while being added to the App level. So the idea here is simple: to load resources from MergedDictionaries as well so things will be visible to MFractor and wont be shown as non existent. Im working on Mac if that means anything. Great tool BTW!
matthewrdev commented 3 years ago

@Miksier This should be supported by the engine however there are a few things that could throw it off.

  1. Are the resource dictionaries referenced from another assembly?
  2. What is the name of your application xaml class and file?
Pastajello commented 3 years ago

@matthewrdev

Thanks for fast reply.

  1. Dictionaries are in the same project, same namespace(well mostly), and are included as xmlns:local="clr-namespace:<solution>.<project>.Resources"
  2. x:Class="<solution>.<project>.App". The file name is App.xaml/App.xaml.cs We are using Prism so the App is a prism:PrismApplication.

Cant write any project specific data ^_^

matthewrdev commented 3 years ago

@Miksier I suspect the culprit could be the prism:PrismApplication base class. Again, this should be supported however I'll build a local repro case and confirm.

matthewrdev commented 3 years ago

One more question, when referencing your resource dictionaries via local, does this refer to a CLR namespace or a URI defined by a custom xaml namespace schema?

EG: https://docs.microsoft.com/en-us/xamarin/xamarin-forms/xaml/custom-namespace-schemas

Pastajello commented 3 years ago

@matthewrdev just a normal CLR namespace, no custom schemas. I've pasted it above. Nothing unusual should be there

Pastajello commented 3 years ago

@matthewrdev So uh well. I think the problem disappeared with some branch switching/restarts. Maybe cache didnt set up correctly at first because now things are working correctly.

Thanks for responses but it seems it was just a hiccup.

matthewrdev commented 3 years ago

@Miksier Glad to hear that this has resolved itself. Please reach out again if you run into any issues!