<p>i have scenario where i have to provide my own control template for a few WPF controls - i.e. GridViewHeader. when you take a look at control template for GridViewHEader in blend, it is agregated from several other controls, which in some cases are styled for that control only - i.e. this splitter between columns. 
those templates, obviously are resources hidden somewhere in system...dll (or somewhwere in themes dll's). 
so, my question is - is there a way to reference those predefined templates? so far, i've ended up having my own copies of them in my resources, but i don't like that approach.</p>

<p>here is sample scenario:
i have a GridViewColumnHeader:</p>

<pre><code>        &lt;Style TargetType="{x:Type GridViewColumnHeader}" x:Key="gridViewColumnStyle"&gt;
            &lt;Setter Property="HorizontalContentAlignment" Value="Stretch"/&gt;
            &lt;Setter Property="VerticalContentAlignment" Value="Stretch"/&gt;
            &lt;Setter Property="Background" Value="{StaticResource GridViewHeaderBackgroundColor}"/&gt;
            &lt;Setter Property="BorderBrush" Value="{StaticResource GridViewHeaderForegroundColor}"/&gt;
            &lt;Setter Property="BorderThickness" Value="0"/&gt;
            &lt;Setter Property="Padding" Value="2,0,2,0"/&gt;
            &lt;Setter Property="Foreground" Value="{StaticResource GridViewHeaderForegroundColor}"/&gt;
            &lt;Setter Property="Template"&gt;
                &lt;Setter.Value&gt;
                    &lt;ControlTemplate TargetType="{x:Type GridViewColumnHeader}"&gt;
                        &lt;Grid SnapsToDevicePixels="true" Tag="Header" Name="Header"&gt;
                            &lt;ContentPresenter Name="HeaderContent" Margin="0,0,0,1" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" /&gt;
                            &lt;Canvas&gt;
                                &lt;Thumb x:Name="PART_HeaderGripper" Style="{StaticResource GridViewColumnHeaderGripper}"/&gt;
                            &lt;/Canvas&gt;
                        &lt;/Grid&gt;
                        &lt;ControlTemplate.Triggers&gt;
                            &lt;Trigger Property="IsMouseOver" Value="true"&gt;
                            &lt;/Trigger&gt;
                            &lt;Trigger Property="IsPressed" Value="true"&gt;
                                &lt;Setter TargetName="HeaderContent" Property="Margin" Value="1,1,0,0"/&gt;
                            &lt;/Trigger&gt;
                            &lt;Trigger Property="Height" Value="Auto"&gt;
                                &lt;Setter Property="MinHeight" Value="20"/&gt;
                            &lt;/Trigger&gt;
                            &lt;Trigger Property="IsEnabled" Value="false"&gt;
                                &lt;Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/&gt;
                            &lt;/Trigger&gt;
                        &lt;/ControlTemplate.Triggers&gt;
                    &lt;/ControlTemplate&gt;
                &lt;/Setter.Value&gt;
            &lt;/Setter&gt;
        &lt;/Style&gt;
</code></pre>

<p>so far - nothing interesting, but say, i want to add some extra functionality straight in the template - i'd leave cotnent presenter as is, add my controls next to it and i'd like to leave Thumb with defaults from framework. i've found themes provided by microsoft <a href="http://msdn.microsoft.com/en-us/library/aa358533.aspx" rel="nofollow noreferrer">here</a>:</p>

<p>the theme for Thumb looks like that:</p>

<pre><code>&lt;Style x:Key="GridViewColumnHeaderGripper"
       TargetType="{x:Type Thumb}"&gt;
    &lt;Setter Property="Canvas.Right"
            Value="-9"/&gt;
    &lt;Setter Property="Width"
            Value="18"/&gt;
    &lt;Setter Property="Height"
            Value="{Binding Path=ActualHeight,RelativeSource={RelativeSource TemplatedParent}}"/&gt;
    &lt;Setter Property="Padding"
            Value="0"/&gt;
    &lt;Setter Property="Background"
            Value="{StaticResource GridViewColumnHeaderBorderBackground}"/&gt;
    &lt;Setter Property="Template"&gt;
        &lt;Setter.Value&gt;
            &lt;ControlTemplate TargetType="{x:Type Thumb}"&gt;
                &lt;Border Padding="{TemplateBinding Padding}"
                        Background="Transparent"&gt;
                    &lt;Rectangle HorizontalAlignment="Center"
                               Width="1"
                               Fill="{TemplateBinding Background}"/&gt;
                &lt;/Border&gt;
            &lt;/ControlTemplate&gt;
        &lt;/Setter.Value&gt;
    &lt;/Setter&gt;
&lt;/Style&gt;
</code></pre>

<p>so far - i have to copy &amp; paste that style, while i'd prefer to get reference to it from resources.</p>

[{'answer_id': 69427, 'author': 'Ana Betts', 'author_id': 5728, 'author_profile': 'https://Stackoverflow.com/users/5728', 'pm_score': 2, 'selected': False, 'text': "<p>Referencing internal resources that are 100% subject to change isn't serviceable - better to just copy it. </p>\n"}, {'answer_id': 71725, 'author': 'Nidonocu', 'author_id': 483, 'author_profile': 'https://Stackoverflow.com/users/483', 'pm_score': 0, 'selected': False, 'text': "<p>It is possible to reference them, but as paulbetts said, its not recommended as they could change. Also consider if what you are doing is truely 'correct'. Can you edit your question to explain why you need to do this exactly?</p>\n"}]
['https://Stackoverflow.com/questions/69398', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/11013/']