Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
SizeExtension.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(SizeExtension))]
11  {
12  public SizeExtension(double uniformLength)
13  {
14  Value = new Size(uniformLength, uniformLength);
15  }
16 
17  public SizeExtension(double width, double height)
18  {
19  Value = new Size(width, height);
20  }
21 
22  public SizeExtension(Size value)
23  {
24  Value = value;
25  }
26 
27  public Size Value { get; set; }
28 
29  public override object ProvideValue(IServiceProvider serviceProvider)
30  {
31  return Value;
32  }
33  }
34 }
override object ProvideValue(IServiceProvider serviceProvider)