title: XAML:How to use a Binding Converter within a Style?
body: <p>I used the Converter in a Sytle,but it seems that the Converter was never been called...</p>
  
  <p>The code is like this:</p>
  
  <pre><code>&lt;Style x:Key="DependencyToolTipStyle" TargetType="{x:Type ToolTip}"&gt;
      &lt;Style.Resources&gt;
          &lt;local:ConvertTypeToTypeCN x:Key="Converter1"&gt;&lt;/local:ConvertTypeToTypeCN&gt;
      &lt;/Style.Resources&gt;
              &lt;Setter Property="Template"&gt;
          &lt;Setter.Value&gt;
              &lt;ControlTemplate TargetType="ToolTip"&gt;
                  &lt;Border  Background="LightYellow" BorderThickness="1" BorderBrush="Black"&gt;
                      &lt;Grid&gt;
                          &lt;Grid.ColumnDefinitions&gt;
                              &lt;ColumnDefinition /&gt;
                              &lt;ColumnDefinition /&gt;
                              &lt;ColumnDefinition /&gt;
                          &lt;/Grid.ColumnDefinitions&gt;
                          &lt;Grid.RowDefinitions&gt;
                              &lt;RowDefinition /&gt;
                              &lt;RowDefinition /&gt;
                              &lt;RowDefinition  /&gt;
                              &lt;RowDefinition  /&gt;
                          &lt;/Grid.RowDefinitions&gt;
                          &lt;TextBlock Margin="1" Text="type:" Grid.Column="0" Grid.Row="0" /&gt;
                          &lt;TextBlock Margin="1" Grid.ColumnSpan="2"  Grid.Column="1" Grid.Row="0"&gt;
                              &lt;TextBlock.Text&gt;
                                  **&lt;Binding Path="LinkType" Converter="{StaticResource Converter1}"/&gt;** 
                              &lt;/TextBlock.Text&gt;
                          &lt;/TextBlock&gt;
                          &lt;TextBlock Margin="1" Text="Lag:" Grid.Column="0" Grid.Row="1" /&gt;
                          &lt;TextBlock Margin="1"  Grid.Column="1" Grid.Row="1" Text="{Binding Lag}" /&gt;                          
                          &lt;TextBlock Margin="1" Text="From:" Grid.Column="0" Grid.Row="2" /&gt;
                          &lt;TextBlock Margin="1"  Grid.Column="1" Grid.Row="2" Text="{Binding Path=From.ID}" /&gt;
                          &lt;TextBlock Margin="1"  Grid.Column="2" Grid.Row="2" Text="{Binding Path=From.Name}" /&gt;
                          &lt;TextBlock Margin="1" Text="To:" Grid.Column="0" Grid.Row="3" /&gt;
                          &lt;TextBlock Margin="1" Grid.Column="1" Grid.Row="3" Text="{Binding Path=To.ID}" /&gt;
                          &lt;TextBlock Margin="1"  Grid.Column="2" Grid.Row="3" Text="{Binding Path=To.Name}" /&gt;
                      &lt;/Grid&gt;
                  &lt;/Border&gt;
              &lt;/ControlTemplate&gt;
          &lt;/Setter.Value&gt;
      &lt;/Setter&gt;
  &lt;/Style&gt;
  &lt;ToolTip x:Key="DependencyToolTip" Style="{StaticResource DependencyToolTipStyle}"/&gt;
  &lt;Style  TargetType="controls:GanttDependency"&gt;
      &lt;Setter Property="ToolTip" Value="{StaticResource DependencyToolTip}" /&gt;
  &lt;/Style&gt;
  </code></pre>