
Hi,
I have modified the template for you Alternate Style AnimatedExpander in your sample and have got the "helpText" binding. The problem is that I have to create a new template for each different binding I need. Is there a way to make the "helpText" exposed so that I can bind when the style is applied? (hope this makes sense)What I want to do is replace the
so that I can apply the binding when the STYLE is applied.
Thanks
I have modified the template for you Alternate Style AnimatedExpander in your sample and have got the "helpText" binding. The problem is that I have to create a new template for each different binding I need. Is there a way to make the "helpText" exposed so that I can bind when the style is applied? (hope this makes sense)
<Style
x:Key="AnimatedExpanderAlternateStyle1"
TargetType="{x:Type shared:AnimatedExpander}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="shared:AnimatedExpander">
<DockPanel LastChildFill="True">
<ToggleButton DockPanel.Dock="Left" Content="{TemplateBinding Header}"
IsChecked="{Binding RelativeSource={RelativeSource TemplatedParent},
Path=IsExpanded, Mode=TwoWay}"
Style="{StaticResource AnimatedExpanderToggleButtonStyle}"/>
<Border BorderThickness="1" BorderBrush="Transparent"
Background="#D6DCF0"
SnapsToDevicePixels="True">
<Grid>
<TextBlock
x:Name="helpText"
Text="{Binding Source={x:Static phoenix:Text.Default},
Path=preScaler}"
HorizontalAlignment="Center"
VerticalAlignment="Center" />
<shared:AnimatedExpanderDecorator x:Name="content">
<ContentPresenter Content="{TemplateBinding Content}"
ContentTemplate="{TemplateBinding ContentTemplate}"
ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}" Margin="10" />
</shared:AnimatedExpanderDecorator>
</Grid>
</Border>
</DockPanel>
<ControlTemplate.Triggers>
<Trigger Property="IsExpanded" Value="True">
<Setter TargetName="content" Property="IsExpanded" Value="True" />
<Setter TargetName="helpText" Property="Visibility" Value="Hidden" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
Text="{Binding Source={x:Static phoenix:Text.Default},Path=preScaler}"
Thanks