title: Custom DependencyProperty on Style.Trigger
body: <p>for an <code>UserControl</code> I declared a <code>DependencyProperty</code> :</p>
  
  <pre><code>        public static readonly DependencyProperty DeselectedPresentationModeProperty =
          DependencyProperty.Register(
          "DeselectedPresentationMode",
          typeof(int),
          typeof(MyUserControl),
          new FrameworkPropertyMetadata(1,FrameworkPropertyMetadataOptions.AffectsRender | FrameworkPropertyMetadataOptions.BindsTwoWayByDefault));
  
      public static readonly DependencyProperty SelectedPresentationModeProperty =
          DependencyProperty.Register(
          "SelectedPresentationMode",
          typeof(int),
          typeof(MyUserControl),
          new FrameworkPropertyMetadata(1, FrameworkPropertyMetadataOptions.AffectsRender | FrameworkPropertyMetadataOptions.BindsTwoWayByDefault));
  </code></pre>
  
  <p>Now I want to use these properties within a MultiTrigger:</p>
  
  <pre><code>    &lt;Style TargetType="{x:Type ListBoxItem}" BasedOn="{StaticResource {x:Type ListBoxItem}}" x:Key="MyUserControlItemStyle"&gt;
          &lt;Style.Triggers&gt;
              &lt;MultiTrigger&gt;
                  &lt;MultiTrigger.Conditions&gt;
                      &lt;Condition Property="IsSelected" Value="False" /&gt;
                      &lt;Condition Property="gui:MyUserControl.DeselectedPresentationMode" Value="0" /&gt;
                  &lt;/MultiTrigger.Conditions&gt;
                  &lt;MultiTrigger.Setters&gt;
                      &lt;Setter Property="ContentTemplate" Value="{StaticResource PresentationModeIconOnly}" /&gt;
                  &lt;/MultiTrigger.Setters&gt;
              &lt;/MultiTrigger&gt;
              &lt;MultiTrigger&gt;
                  &lt;MultiTrigger.Conditions&gt;
                      &lt;Condition Property="IsSelected" Value="False" /&gt;
                      &lt;Condition Property="gui:MyUserControl.DeselectedPresentationMode" Value="1" /&gt;
                  &lt;/MultiTrigger.Conditions&gt;
                  &lt;MultiTrigger.Setters&gt;
                      &lt;Setter Property="ContentTemplate" Value="{StaticResource PresentationModeSimple}" /&gt;
                  &lt;/MultiTrigger.Setters&gt;
              &lt;/MultiTrigger&gt;
              &lt;MultiTrigger&gt;
                  &lt;MultiTrigger.Conditions&gt;
                      &lt;Condition Property="IsSelected" Value="True" /&gt;
                      &lt;Condition Property="gui:MyUserControl.SelectedPresentationMode" Value="0" /&gt;
                  &lt;/MultiTrigger.Conditions&gt;
                  &lt;MultiTrigger.Setters&gt;
                      &lt;Setter Property="ContentTemplate" Value="{StaticResource PresentationModeExtended}" /&gt;
                  &lt;/MultiTrigger.Setters&gt;
              &lt;/MultiTrigger&gt;
              &lt;MultiTrigger&gt;
                  &lt;MultiTrigger.Conditions&gt;
                      &lt;Condition Property="IsSelected" Value="True" /&gt;
                      &lt;Condition Property="gui:MyUserControl.SelectedPresentationMode" Value="1" /&gt;
                  &lt;/MultiTrigger.Conditions&gt;
                  &lt;MultiTrigger.Setters&gt;
                      &lt;Setter Property="ContentTemplate" Value="{StaticResource PresentationModeIconOnly}" /&gt;
                  &lt;/MultiTrigger.Setters&gt;
              &lt;/MultiTrigger&gt;
          &lt;/Style.Triggers&gt;
      &lt;/Style&gt;
      ...
      ...
      &lt;ListBox ... ItemContainerStyle="{StaticResource MyUserControlItemStyle}"/&gt;
  </code></pre>
  
  <p>But if I use MyUserControl another project, there is no reaction if I change my <code>DependencyProperty</code>. Whether I use <code>xaml</code> e.g:</p>
  
  <pre><code>&lt;Window 
  ...
  x:Class="WpfControlsTester.MainWindow" 
  Title="MainWindow"&gt;
  &lt;Grid&gt;
      &lt;GUI:MyUserControl Name="test"/&gt;
      &lt;Slider Minimum="0" Maximum="1" Value="{Binding SelectedPresentationMode, ElementName=test}" /&gt;
      &lt;Slider Minimum="0" Maximum="1" Value="{Binding DeselectedPresentationMode, ElementName=test}" /&gt;
  &lt;/Grid&gt;
  </code></pre>
  
  <p></p>
  
  <p>or if I use any kind of manipulation the value like            <code>this.test.DeselectedPresentationMode = 0;</code> on an event or smth else.</p>
  
  <p>I used WPF Inspector to "debug" my Triggers, and both properties always had their default value (1). Where is my mistake or what should I add to update my triggers?</p>
  
  <p>Edit : Changed false "MyControl to "MyUserControl"</p>