title: WPF - Assign Enum Value To Prism's RegionName Directly
body: <p>I am using Prism, this is a chunk of <code>.xaml</code> code of the main window</p>
  <pre class="lang-xml prettyprint-override"><code>&lt;mah:MetroWindow
      x:Class=&quot;ProjectName.Views.MainWindow&quot;
      xmlns:mah=&quot;http://metro.mahapps.com/winfx/xaml/controls&quot;
      xmlns:prism=&quot;http://prismlibrary.com/&quot;&gt;
          
      &lt;ContentControl
          prism:RegionManager.RegionName=&quot;CenterRegion&quot; /&gt;
          
  &lt;/mah:MetroWindow&gt;
  </code></pre>
  <p>I have grouped all regions' names in an Enum <code>UiRegion</code>, And now, I want to rename some of the values in <code>UiRegion</code>, but renaming will not affect the strings in <code>.xaml</code>! Hence, I have to change them manually.. So I've tried to change the <code>.xaml</code> code to something like this</p>
  <pre class="lang-xml prettyprint-override"><code>&lt;ContentControl
      prism:RegionManager.RegionName=&quot;{x:Static model:UiRegion.CenterRegion}&quot; /&gt;
  </code></pre>
  <p>But it gives a runtime error at <code>InitializeComponent();</code></p>
  <blockquote>
  <p>'CenterRegion' is not a valid value for property 'RegionName'.</p>
  </blockquote>
  <p><strong>My Question is</strong>: Is there a way to fix this? and if not, is there another way to update <code>.xaml</code> code when renaming <code>UiRegion</code> values?</p>