title: How to create a StaticResource for a class without public constructors
body: <p>WPF bindings uses CultureInfo.CurrentUICulture rather than CultureInfo.CurrentCulture which means they do not respect the preferences specified in Control Panel's <em>Region and Language</em> dialog.</p>
  
  <p>To properly implement localisation in a WPF application it is therefore necessary to somehow assign CurrentCulture to the ConverterCulture of every binding.</p>
  
  <p>This is best done with a StaticResource declared in App.xaml but there is a problem: the CultureInfo class has no public constructors. As a result, markup like this</p>
  
  <pre><code>&lt;Application x:Class="ScriptedRoutePlayback.App"
               xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
               xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
               xmlns:sys="clr-namespace:System;assembly=mscorlib"
               xmlns:glob="clr-namespace:System.Globalization;assembly=mscorlib"
               StartupUri="MainWindow.xaml"&gt;
    &lt;Application.Resources&gt;
      &lt;glob:CultureInfo x:Key="CurrentCulture" /&gt;
    &lt;/Application.Resources&gt;
  &lt;/Application&gt;
  </code></pre>
  
  <p>generates a warning about the fact that CultureInfo has no public constructors. Despite this, the markup is sufficient to register an appropriately typed static resource in the namespace used by the designer, which stops markup references to {StaticResource CurrentCulture} from complaining in the rest of the app.</p>
  
  <p>At run-time the failure of this markup to create an instance of CultureInfo is irrelevant because the accompanying Startup code assigns it from CultureInfo.CurrentCulture:</p>
  
  <pre><code>using System.Globalization;
  using System.Windows;
  
  namespace ScriptedRoutePlayback
  {
    public partial class App : Application
    {
      protected override void OnStartup(StartupEventArgs e)
      {
        base.OnStartup(e);
        Resources["CurrentCulture"] = CultureInfo.CurrentCulture;
      }
    }
  }
  </code></pre>
  
  <h2>Finally, the question:</h2>
  
  <p>What is the preferred way to mark up a StaticResource that refers to an existing object such as a singleton obtained from a static property of a class, especially when said class lacks public constructors?</p>