wpf如何实现radiobutton同一排显示

沧海1梦 沧海1梦 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
请问下如何实现下面的效果,

我加了一个border,然后在里面添加radiobutton,发现实现不了
代码如下:

<Border Grid.Row="0" Margin="20,47,15,497" BorderBrush="#188AE5" BorderThickness="1">
<StackPanel Name="check" Grid.Column="1" Grid.Row="0" Margin="0,10,15,210" Grid.ColumnSpan="2">
<TextBlock Text="区域显示:" Margin="10,0,1067,0" Foreground="Blue" Height="20" />
<RadioButton x:Name="putong" HorizontalAlignment="Left" Height="20" Width="120" IsChecked="True" FlowDirection="RightToLeft" Template="{StaticResource radioBoxTemp}" Checked="putong_Checked" Unchecked="putong_Unchecked" Content="普通" Foreground="White" />
<RadioButton x:Name="zhongdian" HorizontalAlignment="Left" Margin="0 0 10 0" Height="20" Width="60" FlowDirection="RightToLeft" Template="{StaticResource radioBoxTemp}" Checked="zhongdian_Checked" Unchecked="zhongdian_Unchecked" Content="重点" />
<RadioButton x:Name="pingbi" HorizontalAlignment="Left" Margin="0,0,10,0" Height="20" Width="60" IsChecked="True" FlowDirection="RightToLeft" Template="{StaticResource radioBoxTemp}" Checked="pingbi_Checked" Unchecked="pingbi_Unchecked" Content="屏蔽" />
<TextBlock Text="跟踪模式:" Margin="10,0,10,0" Foreground="Blue" Height="20" />
<RadioButton x:Name="shoudong" Margin="0,0,10,0" HorizontalAlignment="Left" Height="20" Width="60" IsChecked="True" FlowDirection="RightToLeft" Template="{StaticResource radioBoxTemp}" Checked="shoudong_Checked" Unchecked="shoudong_Unchecked" Content="手动" />
<RadioButton x:Name="Auto" HorizontalAlignment="Left" Margin="0,0,10,0" Height="20" Width="60" FlowDirection="RightToLeft" Template="{StaticResource radioBoxTemp}" Checked="Auto_Checked" Unchecked="Auto_Unchecked" Content="自动" />
<TextBlock Text="轨迹显示" Margin="15,0,10,0" Foreground="Blue" Height="20"/>
<RadioButton x:Name="display" Margin="0,0,10,0" HorizontalAlignment="Left" Height="20" Width="60" IsChecked="True" FlowDirection="RightToLeft" Template="{StaticResource radioBoxTemp}" Checked="display_Checked" Unchecked="display_Unchecked" Content="显示" />
<RadioButton x:Name="hidden" HorizontalAlignment="Left" Margin="0 0 10 0" Height="20" Width="60" FlowDirection="RightToLeft" Template="{StaticResource radioBoxTemp}" Checked="hidden_Checked" Unchecked="hidden_Unchecked" Content="隐藏" />
</StackPanel>
</Border>
...全文
评论 3
收藏 已收藏
分享
返回顶部
沧海1梦
WPF/Silverlight 8,757 成员 12,031 内容