4 using System.Diagnostics;
6 namespace SiliconStudio.
Paradox.UI.Controls
11 [DebuggerDisplay(
"ImageButton - Name={Name}")]
18 Padding = Thickness.UniformCuboid(0);
19 base.Content = contentImageElement;
21 MouseOverStateChanged += (sender, args) => UpdateContentImage();
29 private void UpdateContentImage()
31 contentImageElement.Source = IsPressed ? PressedImage :
MouseOverState == MouseOverState.MouseOverElement? MouseOverImage: NotPressedImage;
43 set {
throw new InvalidOperationException(
"The content of an ImageButton cannot be modified by the user."); }
46 public override bool IsPressed
48 get {
return base.IsPressed; }
51 if(value == IsPressed)
54 base.IsPressed = value;
MouseOverState
Describe the possible states of the mouse over an UI element.
Provides a base class for all the User Interface elements in Paradox applications.
Represents a control that displays an image.