This question is locked. New answers and comments are not allowed.
Hey all -
I've created "Utility Bar" for my rad charts by editing the ControlTemplate of the RadChart (it's a simple stackpanel with a few hyperlinkbuttons, "email", "edit", "export", "bookmark"), placed between the chart title & the dock panel that holds the chart area & legend:
I am creating the charts in code behind. I am able to see this Utility Bar no problem when I load my app. I would, however, like to conditionally hide this Utility Bar for certain charts on my dashboard.
Any idea how this can be done?
I've created "Utility Bar" for my rad charts by editing the ControlTemplate of the RadChart (it's a simple stackpanel with a few hyperlinkbuttons, "email", "edit", "export", "bookmark"), placed between the chart title & the dock panel that holds the chart area & legend:
<
ControlTemplate
TargetType
=
"telerik:RadChart"
>
<
Border
BorderBrush
=
"{TemplateBinding BorderBrush}"
BorderThickness
=
"{TemplateBinding BorderThickness}"
>
<
telerik:ScalePanel
MinFullHeight
=
"{TemplateBinding MinFullHeight}"
MinFullWidth
=
"{TemplateBinding MinFullWidth}"
>
<
Grid
Background
=
"{TemplateBinding Background}"
Margin
=
"{TemplateBinding Padding}"
>
<
Grid
x:Name
=
"PART_DefaultLayoutGrid"
>
<
Grid.RowDefinitions
>
<
RowDefinition
Height
=
"Auto"
/>
<
RowDefinition
Height
=
"Auto"
/>
<
RowDefinition
Height
=
"*"
/>
</
Grid.RowDefinitions
>
<
ContentPresenter
x:Name
=
"PART_DefaultChartTitleContainer"
/>
<
StackPanel
x:Name
=
"UtilityBar"
Orientation
=
"Horizontal"
Grid.Row
=
"1"
>
<
HyperlinkButton
Content
=
"Email"
/>
<
TextBlock
Text
=
"|"
/>
<
HyperlinkButton
Content
=
"Bookmark"
/>
<
TextBlock
Text
=
"|"
/>
<
HyperlinkButton
Content
=
"Edit"
/>
<
TextBlock
Text
=
"|"
/>
<
HyperlinkButton
Content
=
"Export"
/>
</
StackPanel
>
<
telerik:RadDockPanel
LastChildFill
=
"True"
Grid.Row
=
"2"
>
<
ContentPresenter
x:Name
=
"PART_DefaultChartLegendContainer"
telerik:RadDockPanel.Dock
=
"{Binding DefaultView.ChartLegendPosition, RelativeSource={RelativeSource TemplatedParent}}"
/>
<
ContentPresenter
x:Name
=
"PART_DefaultChartAreaContainer"
/>
</
telerik:RadDockPanel
>
</
Grid
>
<
ContentPresenter
/>
</
Grid
>
</
telerik:ScalePanel
>
</
Border
>
</
ControlTemplate
>
I am creating the charts in code behind. I am able to see this Utility Bar no problem when I load my app. I would, however, like to conditionally hide this Utility Bar for certain charts on my dashboard.
Any idea how this can be done?