<DockPanel Grid.Row="1" HorizontalAlignment="Right" Width="300">
<Button x:Name="startPackageSendButton" Command="{Binding StartPackageSendingProcessCommand}" Style="{StaticResource blueButtonStyle}" Content="Start" Width="100" VerticalAlignment="Top" Margin="0,0,0,0" Visibility="Visible" HorizontalAlignment="Right"/>
<Button x:Name="clearPackageSendButton" Command="{Binding ClearPackageSendingProcessCommand}" Style="{StaticResource blueButtonStyle}" Content="Clear" Width="100" VerticalAlignment="Top" Margin="0,0,0,0" Visibility="Collapsed" HorizontalAlignment="Right"/>
<Button x:Name="cancelPackageSendButton" Command="{Binding CancelPackageSendingProcessCommand}" Style="{StaticResource blueButtonStyle}" Content="Stop" Width="100" VerticalAlignment="Top" Margin="0,0,0,0" Visibility="Visible" HorizontalAlignment="Right"/>
</DockPanel>
I am using Dockpanel
to stack some buttons with horizontal alignment.
If some buttons are not Visible
I have empty spaces between buttons.
How can i eliminate empty spaces in case buttons do not have Visibility
set to visible?
Is there a technique that I could achieve this effect?
EDIT: I changed hidden to collapsed as advised.