首页 > 其他分享 >WPF RadioButton GroupName

WPF RadioButton GroupName

时间:2024-09-18 16:36:33浏览次数:18  
标签: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入门教学二 安装与配置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]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......