Familiar WinForms API
Use Form, Label, TextBox, Button, and other native control names in XML, then work with their normal WinForms types in C#.
Build normal WinForms controls with embedded XML, reactive bindings, live presets, and high-performance virtualized lists.
Vibe-coding disclaimer: This project is vibe coded and was developed with extensive AI assistance. Review and test it for your application and target environment before relying on it in production.
<Form xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../WinFormsXaml.xsd"
Class="MyProduct.UI.MainForm"
Name="MainForm"
Text="Customer search"
Width="640"
Height="420">
<StackPanel Margin="16">
<TextBox Text="{Binding Query, Mode=TwoWay}" />
<Button Text="Search" Click="Search_Click" Margin="0,8,0,8" />
<ItemsControl ItemsSource="{Binding Results}">
<ItemsControl.ItemTemplate>
<Label Text="{Binding Title}" AutoSize="true" />
</ItemsControl.ItemTemplate>
</ItemsControl>
</StackPanel>
</Form>using System;
using System.Windows.Forms;
using WinFormsXaml;
namespace MyProduct.UI
{
public sealed class MainForm : XmlForm
{
public MainForm()
: base("MainForm.xml")
{
}
}
}
namespace MyProduct
{
internal static class Program
{
[STAThread]
private static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
new UI.MainForm().Start();
}
}
}