title: Windows RT XAML toggle switch for visibility problems
body: <p>I started with a blank windows RT app in visual studio.
  I've implemented the BooleanToVisibility converter from: <a href="http://blogs.u2u.be/diederik/post/2011/11/14/null.aspx" rel="nofollow">http://blogs.u2u.be/diederik/post/2011/11/14/null.aspx</a></p>
  
  <p>I have this in my App.xaml:</p>
  
  <pre><code>&lt;Pathfinder:BooleanToVisibilityConverter x:Key="VisibleToInvisibleConverter" /&gt;
  &lt;Pathfinder:BooleanToVisibilityConverter x:Key="InvisibleToVisibleConverter" IsReversed="True" /&gt;
  </code></pre>
  
  <p>I added a toggle switch and a textbox I'm trying to toggle the visibility on for proof of concept.
  Here is the toggle switch:</p>
  
  <pre><code>&lt;ToggleSwitch IsOn="{Binding IsEditing, Mode=TwoWay}"
                Margin="10"
                HorizontalAlignment="Left"
                VerticalAlignment="Top"
                OffContent=""
                OnContent=""
                BorderThickness="0"
                Width="80"
                /&gt;
  </code></pre>
  
  <p>Here is the text box:</p>
  
  <pre><code>&lt;TextBlock x:Name="pageTitle" Grid.Column="1" Text="{StaticResource AppName}"
   Style="{StaticResource PageHeaderTextStyle}" 
  Visibility="{Binding IsEditing, Converter={StaticResource InvisibleToVisibleConverter}}"/&gt;
  </code></pre>
  
  <p>I'm trying to make it so when the switch is off, the textbox is visible and when the switch is on the text box is invisible. I notice that when I have the converter on the textbox set to "BooleanToVisibilityConverter" or "VisibleToInvisibleConverter" it is indeed gone (visible with "InvisibleToVisibleConverter"). I've bound the IsOn variable on the switch to IsEditing so it should be toggling that variable off/on and then toggling the visibility off/on.</p>
  
  <p>Here is my notifier class:</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Text;
  using System.Threading.Tasks;
  using Windows.UI.Xaml.Data;
  using System.ComponentModel;
  
  namespace Pathfinder
  {
      class Notifier
      {
          private bool isEditing;
          public event PropertyChangedEventHandler PropertyChanged;
          public bool IsEditing
          {
              get { return isEditing; }
              set
              {
                  isEditing = value;
                  if (PropertyChanged != null)
                      PropertyChanged(this, new PropertyChangedEventArgs("IsEditing"));
              }
          }
      }
  }
  </code></pre>
  
  <p>I create an instance of it in MainPage.Xaml.CS:</p>
  
  <pre><code>public MainPage()
  {
      this.InitializeComponent();
      this.DataContext = new Notifier();
  
  }
  </code></pre>
  
  <p>Anyone have thoughts on what I might be overlooking to setup this toggle?</p>