DiagramLite Programmer's Guide
Diagram.ExpandButtonTemplate Property
See Also
 





Gets or sets a custom ControlTemplate for the ExpandButton class.

Namespace: MindFusion.Diagramming
Assembly: MindFusion.Diagramming.Silverlight

 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

<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

Diagram Members
Diagram Class
MindFusion.Diagramming Namespace
NodesExpandable Property