title: Using enum in ConverterParameter
body: <p>I am building an application that can be used by many users. Each user is classified to one of the next Authentication levels:</p>
  <pre><code>public enum AuthenticationEnum
  {
      User,
      Technitian,     
      Administrator,
      Developer
  }
  </code></pre>
  <p>Some controls (such as buttons) are exposed only to certain levels of users.
  I have a property that holds the authentication level of the current user:</p>
  <pre><code>public AuthenticationEnum CurrentAuthenticationLevel { get; set; }
  </code></pre>
  <p>I want to bind this property to the 'Visibilty' property of some controls and pass a parameter to the Converter method, telling it what is the lowest authentication level that is able to see the control.
  For example:</p>
  <pre><code>&lt;Button Visibility=&quot;{Binding Path=CurrentAuthenticationLevel, Converter={StaticResource AuthenticationToVisibility}, ConverterParameter=&quot;Administrator&quot;}&quot;/&gt;
  </code></pre>
  <p>means that only 'Administrator' and 'Developer' can see the button.
  Unfortunately, the above code passes <code>&quot;Administrator&quot;</code> as a string. Of course I can use switch/case inside the converter method and convert the string to <code>AuthenticationEnum</code>. But this is ugly and prone to maintenance errors (each time the <code>enum</code> changes - the converter method would require a change also).</p>
  <p>Is there a better way to pass a nontrivial object as a parameter?</p>