Hi there,
i have another layout problem. I have a WorkflowElement which contains other Workflow Elements: one fixed subelement and on the right side a horizontal List of subelements
here goes my XAML Code:
<Grid Grid.Column="0" Name="defaultGrid" >
<Rectangle Grid.Column="0" Grid.Row="0" Width="2" HorizontalAlignment="Center" VerticalAlignment="Stretch" Fill="#FFD9665B" />
<TextBlock Grid.Column="0" Grid.Row="0" Text="Default" HorizontalAlignment="Center" VerticalAlignment="Top" Foreground="DarkGray"/>
<sap:WorkflowItemsPresenter Name="gDefault" Items="{Binding Path=ModelItem.FirstElement}" MinWidth="150">
<sap:WorkflowItemsPresenter.SpacerTemplate >
<DataTemplate>
<Grid>
<Rectangle Grid.Column="0" Grid.Row="0" Width="2" HorizontalAlignment="Center" Margin="0" Fill="#FFD9665B" />
<TextBlock Foreground="DarkGray" Margin="20" HorizontalAlignment="Center" VerticalAlignment="Center">Drop Element here</TextBlock>
</Grid>
</DataTemplate>
</sap:WorkflowItemsPresenter.SpacerTemplate>
<sap:WorkflowItemsPresenter.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Vertical"/>
</ItemsPanelTemplate>
</sap:WorkflowItemsPresenter.ItemsPanel>
</sap:WorkflowItemsPresenter>
</Grid>
<Grid Name="OtherElementsGrid" Grid.Column="1">
<Border BorderBrush="Black" BorderThickness="2"> <!-- until here the sizes are equal -->
<sap:WorkflowItemsPresenter Name="gCases" Items="{Binding Path=ModelItem.OtherElements}" MinWidth="150" Margin="0"
VerticalAlignment="Stretch" ClipToBounds="True">
<sap:WorkflowItemsPresenter.SpacerTemplate >
<DataTemplate>
<Grid>
<TextBlock Foreground="DarkGray" Margin="20" HorizontalAlignment="Center" VerticalAlignment="Center">Drop Element here</TextBlock>
</Grid>
</DataTemplate>
</sap:WorkflowItemsPresenter.SpacerTemplate>
<sap:WorkflowItemsPresenter.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Horizontal"/>
</ItemsPanelTemplate>
</sap:WorkflowItemsPresenter.ItemsPanel>
</sap:WorkflowItemsPresenter>
</Border>
</Grid>
everything works fine but the right elementlist is not correct updated in height (after the default element is dropped) so that i have no possibility to stretch the single right elements over the whole height.
Now the default element is stretched over the whole heigt and the other elements does not have the same height of the default element.
Does anybody know what i can do to synchronize the heights (the sub-grid is the same height)???
Thank you very much! el