How to do hot reloading of XAML files in C#?
Posted: 06 May 2022, 09:33
Hello
I'm currently try to implement hot-reloading for XAML files on C#. The theory sounds very easy, as far as I understand it:
When the XamlProvider, which is set by calls the method with an uri, Noesis knows that something has changed on that file and will call on that provider with the same uri in order to reload it.
The problem is: it does not happen. The method gets called on the provider (I checked it with the debugger and can clearly see the call). But Noesis is afterwards not calling the method on that provider. The provider is directly installed with , so it is not "decorated" by the EmbeddedXamlProvider.
Is there anything further necessary to make hot-relaoding? Do I have to set any global flag or something like that?
I'm using Noesis GUI 3.1.4.
Edit: I also checked, who subscribed to the XamlChanged event of the provider and there is nobody. I don't know, if this is normal or maybe the reason.
I'm currently try to implement hot-reloading for XAML files on C#. The theory sounds very easy, as far as I understand it:
When the XamlProvider, which is set by
Code: Select all
NoesisLib.GUI.SetXamlProvider(...)Code: Select all
RaiseXamlChanged(...)Code: Select all
LoadXaml(...)The problem is: it does not happen. The method
Code: Select all
RaiseXamlChanged(...)Code: Select all
LoadXaml(...)Code: Select all
NoesisLib.GUI.SetXamlProvider(...)Is there anything further necessary to make hot-relaoding? Do I have to set any global flag or something like that?
I'm using Noesis GUI 3.1.4.
Edit: I also checked, who subscribed to the XamlChanged event of the provider and there is nobody. I don't know, if this is normal or maybe the reason.