Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
ThicknessExtension.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 System;
4 using System.Windows;
5 using System.Windows.Markup;
6 
7 namespace SiliconStudio.Presentation.MarkupExtensions
8 {
9  [MarkupExtensionReturnType(typeof(ThicknessExtension))]
11  {
12  public ThicknessExtension(double uniformLength)
13  {
14  Value = new Thickness(uniformLength);
15  }
16 
17  public ThicknessExtension(double horizontal, double vertical)
18  {
19  Value = new Thickness(horizontal, vertical, horizontal, vertical);
20  }
21 
22  public ThicknessExtension(double left, double top, double right, double bottom)
23  {
24  Value = new Thickness(left, top, right, bottom);
25  }
26 
27  public ThicknessExtension(Thickness value)
28  {
29  Value = value;
30  }
31 
32  public Thickness Value { get; set; }
33 
34  public override object ProvideValue(IServiceProvider serviceProvider)
35  {
36  return Value;
37  }
38  }
39 }
ThicknessExtension(double left, double top, double right, double bottom)
override object ProvideValue(IServiceProvider serviceProvider)