Is there a way to control the visibility of the Content of a RadPathButton via some property? From the documentation it seems not but the ControlTemplate makes it appear otherwise.
Background: I was looking into making a RadPathButton that would hide its content (and only show the PathGeometry) when it got small enough. My idea was either to derive a class from this or to create a WPF Behavior that added a ContentVisibility DependencyProperty to take care of this for me. Then I would write my own style with my own ControlTemplate to honor this property
But when I looked at Telerik's ControlTemplate for RadPathButton (in the Windows8Touch theme) I saw a reference to "ContentVisibilityStates" group in the VisualStateManager section that looked like what I need. It has a Visible and Collapsed states. If I could find a way to make the control enter the Collapsed state, it would collapse the content exactly as I desire.
However I cannot see any sort of property that binds to this. So how is it changed? Is it possible for me to bind some property to the button to make its content disappear when I need it to?
Background: I was looking into making a RadPathButton that would hide its content (and only show the PathGeometry) when it got small enough. My idea was either to derive a class from this or to create a WPF Behavior that added a ContentVisibility DependencyProperty to take care of this for me. Then I would write my own style with my own ControlTemplate to honor this property
But when I looked at Telerik's ControlTemplate for RadPathButton (in the Windows8Touch theme) I saw a reference to "ContentVisibilityStates" group in the VisualStateManager section that looked like what I need. It has a Visible and Collapsed states. If I could find a way to make the control enter the Collapsed state, it would collapse the content exactly as I desire.
However I cannot see any sort of property that binds to this. So how is it changed? Is it possible for me to bind some property to the button to make its content disappear when I need it to?
<VisualStateGroup x:Name="ContentVisibilityStates">
<VisualState x:Name="Visible" />
<VisualState x:Name="Collapsed">
<Storyboard>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentHost"
Storyboard.TargetProperty="Visibility">
<DiscreteObjectKeyFrame KeyTime="0">
<DiscreteObjectKeyFrame.Value>
<Visibility>Collapsed</Visibility>
</DiscreteObjectKeyFrame.Value>
</DiscreteObjectKeyFrame>
</ObjectAnimationUsingKeyFrames>
</Storyboard>
</VisualState>
</VisualStateGroup>