This article demonstrates how to dynamically load XAML views and their corresponding ViewModels into a WPF application at runtime—rather than defining them statically at compile time—by leveraging reflection and runtime loading techniques to instantiate and bind UI components as needed, increasing flexibility and supporting scenarios like plugin architectures. His companion GitHub project DynamicXamlViews provides a practical demonstration of this approach
Category: English
Posts in English/Posts em inglês
Reformatting your SQL Server code with C#
In the last post, I’ve shown how you can use the Microsoft libraries to parse your SQL Server code in C#. You can use the same parser to reformat your code, but…
Parsing SQL Server code with C# – Part 2 – Advanced parsing
In the last post, I’ve shown how to parse SQL Server code with C# and get all tokens in it, showing their types. This is very nice, there is a lot you…
Parsing Sql Server code with C#
When you are using SQL Server stored procedures, you get a lot of flexibility in your code – changing the code doesn’t need a recompile, deploying the new or updated procedures is…
Detecting Window Closing With UWP
I was developing an app in UWP where I needed to do some cleanup when the window was closed, and the only way that I had found until now was to used…
Multi Instancing in UWP
One thing that went unnoticed in the last post is that the console app is multi-instance: if you click in the live tile or in the start menu, instead of bringing the…
Writing console apps with UWP
One new feature introduced in the April 2018 Windows 10 update is the possibility of writing console apps using UWP. You could ask "why build an UWP console app if we have…
Sending parametrized HTML emails with C#
Sending emails in your app is a normal thing – after some operation, you must send confirmation data to the user, so he can keep the record of it. All the infrastructure…
Publishing your app to the Store with the Desktop Bridge – Part 2 – Publishing a Win32 app
On last post, I’ve shown how to publish a .NET app to the store. This is quite easy with Visual Studio, but the app must be a .NET app and it must…
Publishing your app to the Store with the Desktop Bridge
You have an old app (maybe a WPF or even a VB6 app), it still works fine, but the plans to rewrite it to UWP and get all the features for Windows…