xaml support
Is there any plan to support xaml transfromation?
Just wondering why you would want to do this? Is it something that can be done at run-time, during packaging, or deployment?
I'd like to transform WPF views. I think it will be awesome to get different UI by just using corresponding build configuration and it will be good practices of MVVM. @icnocop
This can already be done by using the existing implementation, and it doesn't require transforming XAML. For example, you can configure SlowCheetah to transform app.config based on the configuration, and then the application can be implemented to read the transformed settings in app.config during runtime and dynamically display the appropriate view in XAML. This implementation doesn't depend on whether MVVM is used or not.
public partial class App : Application
{
protected override void OnStartup(StartupEventArgs e)
{
// get transformed appSetting based on the configuration
string configurationName = ConfigurationSettings.AppSettings["ConfigurationName"];
if (configurationName == "Debug")
{
// display the debug view
DebugWindow debugWindow = new DebugWindow();
debugWindow.ShowDialog();
}
else
{
// display the release view
ReleaseWindow releaseWindow = new ReleaseWindow();
releaseWindow.ShowDialog();
}
}
}