For some of my activities, I would prefer to have it completely collapsed to just show the title bar when the users collapses its designer. By default, if you are using the standard way of a collapsible designer (with datatrigger on ShowExpanded), you still get an empty white rectangle under the title bar - at least on Win7 with .NET 4.0.3
I would like to have it displayed just as the Delay activity shown above, without any box underneath the title.
It seems to me that this annoying white box is caused by the default template defined in resource WorkflowElementDesignerDefaultTemplate which has a ContentPresenter with Margin="7":
<ContentPresenter x:Uid="ContentPresenter_1" Margin="7" Content="{Binding Path=Content, RelativeSource={RelativeSource AncestorType={x:Type swd:WorkflowViewElement}}}" Grid.Row="1">
<ContentPresenter.Style>
<Style x:Uid="Style_10">
<Setter x:Uid="Setter_204" Property="ContentPresenter.Visibility" Value="Visible" />
<Style.Triggers>
<DataTrigger x:Uid="DataTrigger_237" Binding="{Binding Path=Content, RelativeSource={RelativeSource AncestorType={x:Type swd:WorkflowViewElement}}}" Value="{x:Null}">
<Setter x:Uid="Setter_213" Property="ContentPresenter.Visibility" Value="Collapsed" />
</DataTrigger>
</Style.Triggers>
</Style>
</ContentPresenter.Style>
</ContentPresenter>
So, even when the contained stuff that we define in our activity designer XAML gets completely collapsed, this margin of 7 still shows up.
Is there any way to avoid it? Setting the margin to 0 (or even better, triggering Visibility=Collapsed for the containing ContentPresenter from the default template) when the designer is to be shown as collapsed?
(I hope that was not too confusing?)