workflow-foundation-4togglebuttonactivitydesigner

Where'd my ActivityDesigner togglebutton go?


It disappeared!

This is an image of a missing toggle button, btw

I'm using the standard ActivityDesigner w/Collapsible UI example:

<sap:ActivityDesigner
    x:Class="WHATTHEEFF.WhaHappenToMe"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:sap="clr- namespace:Blah blah standard stuff here"
    Collapsible="True">
    <sap:ActivityDesigner.Resources>
        <DataTemplate
            x:Key="DTC">
            <TextBlock
                Text="Collapsed" />
        </DataTemplate>
        <DataTemplate
            x:Key="DTE">
            <TextBlock
                Text="Expanded" />
        </DataTemplate>
        <Style
            x:Key="SC"
            TargetType="ContentPresenter">
            <Setter
                Property="ContentTemplate"
                Value="{DynamicResource DTC}" />
            <Style.Triggers>
                <DataTrigger
                    Binding="{Binding Path=ShowExpanded}"
                    Value="true">
                    <Setter
                        Property="ContentTemplate"
                        Value="{DynamicResource DTE}" />
                </DataTrigger>
            </Style.Triggers>
        </Style>
    </sap:ActivityDesigner.Resources>
    <ContentPresenter
        Content="{Binding}"
        Style="{DynamicResource SC}" />
</sap:ActivityDesigner>

Solution

  • Derp.

    Root activity is not collapsible, so if you drop an Activity on a blank workflow that Activity will not be collapsible. Child activities will be.

    Guess testing your collapse template by dropping your activity in an empty workflow isn't the best idea.