Search
Diagram.ExpandButtonTemplate Property
See Also
 






Gets or sets a custom ControlTemplate for the ExpandButton class. This is a dependency property.

Namespace: MindFusion.Diagramming
Assembly: MindFusion.Diagramming

 Syntax

C#  Copy Code

public ControlTemplate ExpandButtonTemplate { get; set; }

Visual Basic  Copy Code

Public Property ExpandButtonTemplate As ControlTemplate

 Property Value

A ControlTemplate instance that defines the visual structure of the expand/collapse button.

 Example

XAML  Copy Code

<ControlTemplate x:Key="CustomExpandButton" TargetType="diag:ExpandButton">
  <Border Background="#7DFFFFFF"
    BorderBrush="#FF000000"
    BorderThickness="1">
    <VisualStateManager.VisualStateGroups>
      <VisualStateGroup x:Name="States">
        <VisualState x:Name="Expanded" />
        <VisualState x:Name="Collapsed">
          <Storyboard>
            <ColorAnimation Duration="0"
              Storyboard.TargetName="ExpanderRect"
            Storyboard.TargetProperty="(Rectangle.Fill).(SolidColorBrush.Color)"
            To="#FFFF0000"/>
           </Storyboard>
         </VisualState>
      </VisualStateGroup>
    </VisualStateManager.VisualStateGroups>
    <Rectangle x:Name="ExpanderRect"
      Height="5" Width="5" Fill="#FF00FF00" />
  </Border>
</ControlTemplate>

<diag:Diagram Name="diagram" ExpandButtonTemplate="{StaticResource CustomExpandButton}" ...

 See Also