Fluent Markup
Overview
Examples
var textBox = new TextBox
{
LabelText = "Name:",
Location = new Point(20, 20),
Size = new Size(150, 24)
};
var binding = textBox.DataBindings.Add("Text", dataSource, "FirstName");
binding.Format += (s, e) => {
e.Value = e.Value.ToString().ToUpper();
};
var button = new Button
{
Text = "Click me",
Location = new Point(20, 50),
Size = new Size(80, 32),
};
button.Click += (s, e) => {
// Do something on click.
};
page.Controls.Add(button);
page.Controls.Add(textBox);Last updated
Was this helpful?

