Since local value `xamlFile` is set after `LoadFromXaml()`,
`xamlFile` is always null in `Reload()`.
To fix this exception, it sets `xamlFile` before `XamlLoader.Load()`.
}
LoadFromXaml(xamlFile);
- this.xamlFile = xamlFile;
}
/// <summary>
XamlResources.SetAndLoadSource(new Uri(themeResource), themeResource, Assembly.GetAssembly(GetType()), null);
LoadFromXaml(xamlFile);
- this.xamlFile = xamlFile;
}
/// <summary>
{
using (var reader = XmlReader.Create(xamlFile))
{
+ this.xamlFile = xamlFile;
XamlLoader.Load(this, reader);
}
}