Skip to content

Instantly share code, notes, and snippets.

@cwensley
Created February 17, 2015 17:27
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cwensley/322f827dea9eecab5719 to your computer and use it in GitHub Desktop.
Save cwensley/322f827dea9eecab5719 to your computer and use it in GitHub Desktop.
Shows the new StackLayout
public class MyForm : Form
{
public MyForm()
{
ClientSize = new Size(200, 200);
Content = new StackLayout
{
Orientation = Orientation.Vertical,
ContentAlign = StackLayoutAlign.Center,
Spacing = 10,
Items =
{
"Some centered label",
new StackLayoutItem("Right aligned", StackLayoutAlign.BottomOrRight),
new StackLayoutItem(new TextBox(), StackLayoutAlign.Fill),
"Some other label",
new NumericUpDown()
}
};
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment