3 ms·
what is the support for custom controls like? (i.e. inheriting from a canvas and drawing themselves, while being added as a new widget type to the layout code.)
by zem 10y ago
what is the support for custom controls like? (i.e. inheriting from a canvas and drawing themselves, while being added as a new widget type to the layout code.)
- grokys 10y agoCustom controls are supported, although I'm not sure that inheriting from Canvas is the best way to do that. See e.g. https://github.com/Core2D/Core2D https://github.com/Core2D/Core2D for an example of an application with lots of custom controls.
- wiso 10y agoThe support is great, you can see this example [1] of using custom rendering in Canvas being part of UI layout [2]. You can also see Avalonia in action here [3]. [1] https://github.com/wieslawsoltes/SpiroNet/blob/master/src/SpiroNet.Avalonia/Renderer/CanvasRenderer.cs https://github.com/wieslawsoltes/SpiroNet/blob/master/src/Sp... [2] https://github.com/wieslawsoltes/SpiroNet/blob/master/src/SpiroNet.Avalonia/Views/EditorView.xaml#L164 https://github.com/wieslawsoltes/SpiroNet/blob/master/src/Sp... [3] https://youtu.be/wZK9MPR_UeE https://youtu.be/wZK9MPR_UeE