2.10.0
New Features
Hot Reload
Eto.Forms now supports hot reload when supported by the runtime/debugger, and even hot reload of .xeto and .jeto files for all other platforms. To enable hot reload, simply add the following to your startup:
#if DEBUG
HotReloadService.Initialize();
#endif
and for any control you'd like to support hot reload for, add this attribute to your class, giving the name of the method to call when the class or .xeto/.jeto changes:
[HotReload(nameof(InitializeComponent))]
public class MyControl : Panel
{
void InitializeComponent()
{
XamlReader.Load(this); // or however you populate this control
// other initialization logic that can be re-executed
}
}
As of this writing, only VS 2022 supports code-based hot reload. It appears that the C# Dev Kit for VS Code is getting some love in this regard, but it's not fully there just yet.