title: Using BooleanToVisibilityConverter without MVVM
body: <p>I'm using VB.Net &amp; WPF (not using MVVM as I'm not familiar with it)</p>
  
  <p>I have a Toolbar control in my User Control Style whose Visibility needs to be set from code behind so I decided to use BooleanToVisibilityConverter. I have a Boolean variable in my code depending on whose value toolbar visibility needs to be set.</p>
  
  <p>How can I achieve this.</p>
  
  <p>Thanks in advance</p>
  
  <p>Edit</p>
  
  <p>Tried following </p>
  
  <p><strong>XAML</strong></p>
  
  <pre><code>&lt;Window.Resources&gt;
     &lt;BooleanToVisibilityConverter x:Key="BooleanToVisibility"/&gt;
  &lt;/Window.Resources&gt;
  
  &lt;ToolBarTray Visibility="{Binding Converter={StaticResource BooleanToVisibility}}"/&gt;
  </code></pre>
  
  <p><strong>VB.Net Code</strong></p>
  
  <pre><code>Dim IsToolbarVisible As Boolean = True
  
  Public Property ToolbarVisibality As Boolean
      Get
          Return IsToolbarVisible
      End Get
      Set(value As Boolean)
          IsToolbarVisible = value
      End Set
  End Property
  </code></pre>
  
  <p>How to Pass value of IsToolBarVisisble to Boolean TO Visibility Converter ???</p>