Provides a lightweight control for displaying small amounts of text, supporting text
wrapping at word boundaries.
Namespace: DigitalRune.Game.UI.ControlsAssembly: DigitalRune.Game.UI (in DigitalRune.Game.UI.dll) Version: 1.1.0.0 (1.1.1.9392)
Syntax
Examples
The following examples shows how to create a button and handle the
Click event.
| C# | |
|---|---|
var button = new Button { Content = new TextBlock { Text = "Click Me!" }, Margin = new Vector4F(4), Padding = new Vector4F(6), HorizontalAlignment = HorizontalAlignment.Stretch, }; // To show the button, add it to an exising content control or panel. panel.Children.Add(button); // To handle button clicks simply add an event handler to the Click event. button.Click += OnButtonClicked; | |
Inheritance Hierarchy
System..::..Object
DigitalRune.Game..::..GameObject
DigitalRune.Game.UI.Controls..::..UIControl
DigitalRune.Game.UI.Controls..::..TextBlock
DigitalRune.Game..::..GameObject
DigitalRune.Game.UI.Controls..::..UIControl
DigitalRune.Game.UI.Controls..::..TextBlock