title: WPF Toggle switch default value depending on condition
body: <p>In my xaml code, I have a toggle switch and I need to set a default value under certain conditions.</p>
  
  <p>For example, if the user checked a checkbox for a test type "A", my toggle switch value needs to be set on "Yes" by default. And conversely. </p>
  
  <p>How can I set this default value ?</p>
  
  <p>Here is the part of my code for the toggle switch :</p>
  
  <pre><code>&lt;dxe:ToggleSwitchEdit Name="ToggleSwitchEdit" 
                        IsChecked="{Binding Path=PathName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                        HorizontalAlignment="Left" VerticalAlignment="Center" 
                        CheckedStateContent="Yes" UncheckedStateContent="No" ContentPlacement="Both"
                        AutomationProperties.AutomationId="Id"&gt;
  &lt;/dxe:ToggleSwitchEdit&gt;
  </code></pre>