Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
StaticResourceConverter.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.Globalization;
5 using System.Windows;
6 
7 namespace SiliconStudio.Presentation.ValueConverters
8 {
9  /// <summary>
10  /// A converter that resolve the specified value from the resources from the current application
11  /// </summary>
12  public class StaticResourceConverter : OneWayValueConverter<StaticResourceConverter>
13  {
14  public override object Convert(object value, Type targetType, object parameter, CultureInfo culture)
15  {
16  return Application.Current.FindResource(value);
17  }
18  }
19 }
override object Convert(object value, Type targetType, object parameter, CultureInfo culture)
A converter that resolve the specified value from the resources from the current application ...