Quantcast
Channel: Aligning controls on both left and right side in a stack panel in WPF - Stack Overflow
Viewing all articles
Browse latest Browse all 6

Aligning controls on both left and right side in a stack panel in WPF

$
0
0

I have the following code:

<DockPanel><StackPanel DockPanel.Dock="Top" Orientation="Horizontal"><RadioButton Content="_Programs"                    IsChecked="{Binding Path=ProgramBanksSelected}" IsEnabled="{Binding Path=ProgramsEnabled}" Margin="8" /><StackPanel><Label Content="Master" Height="28" Name="MasterFileStatus" VerticalContentAlignment="Center"/></StackPanel></StackPanel>    ...

The radio button should be placed on the left side in the stack panel (I removed some buttons for not cluttering the example) and the label (which I put temporarily in a nested StackPanel) should be on the right side.

I tried already lots of combinations of alignments but I cannot get the label on the right side.What should I add to accomplish this?


Viewing all articles
Browse latest Browse all 6

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>