I have a WPF project where I'm trying to use radio buttons to determine which TextBox input to use. When I run it, though, the radio button itself is aligned to the top of the container, and I cannot find any sort of alignment property that affects it. Is this behavior expected? I've been searching for answers but everything seems to be asking how to align the radio button vertically. My assumption is that it's related to how I have it nested in other controls, but how can I make it work without changing too much?
This is the xaml relevant to the radio buttons:
0
Hours
0
Minutes
0
Seconds
// ...
This is what it looks like:
How can I get the radio buttons to be centered vertically?
解决方案
Set VerticalContentAlignment as Center for RadioButton:
VerticalContentAlignment="Center">
.....