I am attempting to modify the style of a CustomControl based on TextBox, I have been largely successful. The last thing I'm attempting to accomplish is to make it dim when disabled. I have successfully gotten this to work but the color is off, it doesn't match the standard TextBoxes when they are disabled.
What is the appropriate color for the native TextBox and/or how can I access the default style for the native TextBox in order to copy the appropriate syntax? The example on MSDN does not appear to be the standard Style? I've also seen suggestions to use Blend to grab the default style? That doesn't appear to work either, for some reason this approach creates a reference to PresentationFramework.Classic in my project and provides me with a TextBox that looks like Windows Forms(Sunken border, etc).
Generic.xaml
<Style x:Key="{x:Type l:CustomTextBox}" BasedOn="{StaticResource {x:Type TextBox}}" TargetType="{x:Type l:CustomTextBox}">
<Setter Property="SnapsToDevicePixels" Value="True" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type l:CustomTextBox}">
<Border x:Name="Border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
<ScrollViewer x:Name="PART_ContentHost" Margin="2" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsEnabled" Value="False">
<!-- The background does change, but the color does not match native disabled TextBoxes. -->
<Setter Property="Background" TargetName="Border" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" />
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" />
</Trigger>
<!-- Additional triggers, none of which modify the Background. -->
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>