title: XAML - Binding error on a Slider.Value converter parameter inside a ControlTemplate
body: <p>I'm getting the following error when i try to bind some values to a control passed to a converter: </p>
  
  <blockquote>
    <p>System.Windows.Data Error: 2 : Cannot find governing FrameworkElement or FrameworkContentElement for target element. BindingExpression:Path=Minimum; DataItem=null; target element is 'QuadraticSliderWrapper' (HashCode=9652842); target property is 'Minimum' (type 'Double')</p>
  </blockquote>
  
  <p>Here is my code:</p>
  
  <pre><code>&lt;ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                  xmlns:controls="clr-namespace:PowersoftSDK.Controls"&gt;
      &lt;Style TargetType="{x:Type controls:QuadraticSlider}"&gt;
          &lt;Setter Property="Template"&gt;
              &lt;Setter.Value&gt;
                  &lt;ControlTemplate TargetType="{x:Type controls:QuadraticSlider}"&gt;
                      &lt;Border x:Name="Bd"
                          SnapsToDevicePixels="true"
                          Background="{TemplateBinding Background}"
                          BorderBrush="{TemplateBinding BorderBrush}"
                          BorderThickness="{TemplateBinding BorderThickness}"
                          Padding="{TemplateBinding Padding}"&gt;
                          &lt;Slider x:Name="QuadraticSlider"
                              Minimum="{TemplateBinding Minimum}"
                              Maximum="{TemplateBinding Maximum}"
                              SmallChange="{TemplateBinding SmallChange}"
                              LargeChange="{TemplateBinding LargeChange}"
                              MinWidth="{TemplateBinding MinWidth}"
                              MaxWidth="{TemplateBinding MaxWidth}"
                              MinHeight="{TemplateBinding MinHeight}"
                              MaxHeight="{TemplateBinding MaxHeight}"
                              Orientation="{TemplateBinding Orientation}" TickPlacement="{TemplateBinding TickPlacement}" TickFrequency="{TemplateBinding TickFrequency}"&gt;
                              &lt;Slider.Value&gt;
                                  &lt;Binding Path="Value" RelativeSource="{RelativeSource TemplatedParent}" Converter="{x:Static controls:QuadraticToValueConverter.Default}"&gt;
                                      &lt;Binding.ConverterParameter&gt;
                                          &lt;controls:QuadraticSliderWrapper Minimum="{Binding Path=Minimum, RelativeSource={RelativeSource TemplatedParent}}"
                                                                       Maximum="{Binding Path=Maximum, RelativeSource={RelativeSource TemplatedParent}}"
                                                                       Middle="{Binding Path=Middle, RelativeSource={RelativeSource TemplatedParent}}"/&gt;
                                      &lt;/Binding.ConverterParameter&gt;
                                  &lt;/Binding&gt;
                              &lt;/Slider.Value&gt;
                              &lt;/Slider&gt;
                       &lt;/Border&gt;
                  &lt;/ControlTemplate&gt;
               &lt;/Setter.Value&gt;
               &lt;/Setter&gt;
      &lt;/Style&gt;
  &lt;/ResourceDictionary&gt;
  </code></pre>
  
  <p>I need to pass the templated values for max,min and middle to the QuadraticSliderWrapper.</p>