Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
ContentDecorator.cs
Go to the documentation of this file.
1 // Copyright (c) 2014 Silicon Studio Corp. (http://siliconstudio.co.jp)
2 // This file is distributed under GPL v3. See LICENSE.md for details.
3 using SiliconStudio.Core;
4 
5 namespace SiliconStudio.Paradox.UI.Controls
6 {
7  /// <summary>
8  /// A <see cref="ContentControl"/> decorating its <see cref="ContentControl.Content"/> with a background image.
9  /// </summary>
11  {
12  /// <summary>
13  /// The key to the NotPressedImage dependency property.
14  /// </summary>
15  public static readonly PropertyKey<UIImage> BackgroundImagePropertyKey = new PropertyKey<UIImage>("BackgroundImageKey", typeof(ContentDecorator), DefaultValueMetadata.Static<UIImage>(null));
16 
17  /// <summary>
18  /// Gets or sets the image that the button displays when pressed
19  /// </summary>
20  public UIImage BackgroundImage
21  {
22  get { return DependencyProperties.Get(BackgroundImagePropertyKey); }
23  set { DependencyProperties.Set(BackgroundImagePropertyKey, value); }
24  }
25 
27  {
28  DrawLayerNumber += 1; // (decorator design image)
29  }
30  }
31 }
Represents a control with a single piece of content of any type.
A ContentControl decorating its ContentControl.Content with a background image.
Class holding all the data required to define an UI image.
Definition: UIImage.cs:15
A class that represents a tag propety.
Definition: PropertyKey.cs:17