title: Xamarin Forms - Check a switch has been toggled manually
body: <p>I am writing a Xamarin forms application which checks whether or not a user is in a specific geo-location. When a user walks inside an area, a <code>XAML</code> switch is toggled from the off to on position.</p>
  
  <pre><code>farmSwitch.toggled = true;
  </code></pre>
  
  <p>This calls this function     </p>
  
  <pre><code>farmSwitch.Toggled += (object sender, ToggledEventArgs e) =&gt; {
              manualOnFarm = true;
              Console.WriteLine("Switch.Toggled event sent");
              changeOnFarmStatus(e);
          };
  </code></pre>
  
  <p>I also need functionality where a user <strong>manually</strong> clicks the switch, which need to be differentiated from when the code automatically toggles <code>farmSwitch</code></p>
  
  <p>The reason is that I have a boolean that should only be true when the user manually clicks <code>farmSwitch</code>, and should be false when the switch is toggled automatically</p>
  
  <p>What are my options? Ideally there would be a farSwtich.clicked() function I could call for when a user manually clicks <code>farmSwitch</code>, but no such luck</p>