Avalonia: Using Source Generators to generate Controls (Code behind)

Created on 30 Apr 2020  路  4Comments  路  Source: AvaloniaUI/Avalonia

Right now (as far I'm aware) AvaloniaUI doesn't have a way to add any controls to the code behind of an application. This requires people that are using this having to add each control that they need to control in code themselves and when you are making a complex UI, this adds up quickly.

Microsoft has introduced C# Source Generators, this allows extra code to be added before an application gets built, which for this library could allow for controls in code to be added without any input.

Any opinions on this?

Most helpful comment

We've already been talking about this, source generators would be perfect for this functionality!

All 4 comments

We've already been talking about this, source generators would be perfect for this functionality!

Also for compiled bindings please (just like what x:Bind in UWP did)

Compiled bindings will be implemented using regular MSIL emission engine. We aren't planning to drop F# support.

Compiled bindings will be implemented using regular MSIL emission engine. We aren't planning to drop F# support.

Big thanks for this.

There are developers who write Avalonia-app with F#. Don't forget about us :-)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

TheColonel2688 picture TheColonel2688  路  3Comments

Suriman picture Suriman  路  3Comments

x2bool picture x2bool  路  4Comments

MiKaMaru picture MiKaMaru  路  4Comments

stdcall picture stdcall  路  4Comments