Hi There,
I have a requirement where i have to display a small image at left side of contentpresenter on every header of control. for this at present i have to add a below xaml to every controls template,
but there will be a huge maintenance. i want to place this in one place may be i can create a template for contentpresenter and i can use the style key.
If you have any better solution please guide me.
Thanks in Advance,
Srinivas.
.
I have a requirement where i have to display a small image at left side of contentpresenter on every header of control. for this at present i have to add a below xaml to every controls template,
<
ControlTemplate
TargetType
=
"ContentControl"
x:Key
=
"Sample"
>
<
StackPanel
Orientation
=
"Horizontal"
>
<
mage
x:Name
=
"Symbol"
Template="{Binding
Path=(prop:VResultType),
RelativeSource={RelativeSource TemplatedParent},
Converter={StaticResource vSymbolConverter}}"
Margin
=
"0,0,5,0"
Visibility
=
"Collapsed"
Height
=
"16"
Width
=
"16"
>
<
ToolTipService.ToolTip
>
<
ToolTip
Placement
=
"Bottom"
Content="{Binding
Path=(prop:ResultIndicator.ResultToolTip),
RelativeSource={RelativeSource TemplatedParent}}" />
</
ToolTipService.ToolTip
>
</
uxc:XamlImage
>
<
ContentPresenter
x:Name
=
"Content"
ContentSource
=
"Header"
RecognizesAccessKey
=
"True"
SnapsToDevicePixels
=
"{TemplateBinding SnapsToDevicePixels}"
Height
=
"Auto"
Width
=
"Auto"
VerticalAlignment
=
"Center"
HorizontalAlignment
=
"Center"
Visibility
=
"Visible"
/>
</
StackPanel
>
</
ControlTemplate
>
but there will be a huge maintenance. i want to place this in one place may be i can create a template for contentpresenter and i can use the style key.
If you have any better solution please guide me.
Thanks in Advance,
Srinivas.
.