首页 > 其他分享 >WPF RadioButton GroupName

WPF RadioButton GroupName

时间:2024-09-18 16:36:33浏览次数:1  
标签:11 Different Option GroupName RadioButton WPF

<Window x:Class="WpfApp375.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:WpfApp375"
        mc:Ignorable="d"
        Title="MainWindow" Height="450" Width="800">
    <StackPanel>
        <StackPanel>
            <RadioButton GroupName="A">Option 1</RadioButton>
            <RadioButton GroupName="A">Option 2</RadioButton>
        </StackPanel>
        <StackPanel>
            <RadioButton GroupName="A">Option3</RadioButton>
        </StackPanel>

        <StackPanel>
            <RadioButton GroupName="B">Option 11</RadioButton>
            <RadioButton GroupName="B">Option 12</RadioButton>
            <RadioButton GroupName="C">A Different Option 1</RadioButton>
            <RadioButton GroupName="C">A Different Option 2</RadioButton>
        </StackPanel>
    </StackPanel>
</Window>

 

标签:11,Different,Option,GroupName,RadioButton,WPF
From: https://www.cnblogs.com/Fred1987/p/18418812

相关文章

  • WPF LiveChart 图表详解
    引用LiveChart.Wpf在使用的界面当中引用LiveChart.Wpf的类库xmlns:lvc="clr-namespace:LiveCharts.Wpf;assembly=LiveCharts.Wpf"以直方图、折线图为例,都属于CartesianChart下的一种Series类型,例如折线图,如下:<lvc:CartesianChart><lvc:CartesianCh......
  • WPF overlay on the icon in the taskbar via TaskbarItemInfo
    <Windowx:Class="WpfApp372.MainWindow"xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"xmlns:d="http://schemas.microsoft......
  • WPF打包独立运行的程序
    方案一:使用Costura.Fody插件将自己写的程序打包成一个可以独立运行的EXE文件第1步:安装Costura.Fody首先用VisualStudio2017打开你的解决方案,依次找到“工具”---“NuGet包管理”-“管理解决方案的NuGet程序包”,到了这一步会打开NuGet-解决方案页面,在浏览选项下面的搜索框内......
  • WPF入门教学二 安装与配置WPF开发环境
    在安装与配置WPF(WindowsPresentationFoundation)开发环境时,您需要遵循一系列步骤来确保一切顺利进行。WPF是微软提供的一个强大的UI框架,用于构建Windows桌面应用程序。以下是详细的安装与配置指南:安装VisualStudio访问官方网站:访问MicrosoftVisualStudio官网,下载并安装适......
  • WPF JumpList JumpList ApplicationPath IconResourcePath
    //App.xaml<Applicationx:Class="WpfApp369.App"xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"xmlns:local=&......
  • WPF DataGrid ContextMenu CommandParameter Relative x:Type ContextMenu ,Path=Plac
    //xaml<DataGrid.ContextMenu><ContextMenu><MenuItemHeader="SerializeBinary"Command="{BindingBinSerializeCmd}"CommandParameter="{BindingRelativeSource={Relativ......
  • WPF this.DragMove() DropShadowEffect
    //xaml<Windowx:Class="WpfApp367.MainWindow"xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"xmlns:d="http://schemas.mi......
  • 不可不知的WPF转换(Transform)
    在WPF开发中,经常会需要用到UI控件的2D转换(如:旋转,缩放,移动,倾斜等功能),本文以一些简单的小例子,简述如何通过Transform类实现FrameworkElement对象的2D转换,仅供学习分享使用,如有不足之处,还请指正。 什么是Transform? 转换(Transform)定义如何将控件从一个坐标空间映射或转换到另一......
  • [WPF]XAML中使用IMultiValueConverter实现Command的多参数传参
    对ICommand进行多参数传参问题如何对ICommand传入多个参数?背景最近在做一个WPF的开发,有多个相近的功能写了不同的Command,因为要对应不同的对象。因为是CtrlCV,显得代码有点冗赘不够优雅,但是ICommand又只能接受一个参数。思路使用MultiBinding,对CommandParameter进行绑定,然后......
  • WPF datagrid contextmenu menuitem commandparameter CommandParameter="{Binding R
    Install-packagenewtonsoft.json  <DataGrid.ContextMenu><ContextMenu><MenuItemHeader="ExportSelected"Command="{BindingExportSelectedCmd}"CommandParameter="{BindingRelativeSource={Relat......