Set RadioButton to check state : RadioButton « Windows Presentation Foundation « C# / CSharp Tutorial






<Window x:Class="WpfApplication1.Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="FlowDocumentPage" Height="450" Width="500">
    <DockPanel>
        <Button Padding="20" Margin="40">
            <FlowDocumentReader>
                <FlowDocument FontSize="12" xml:space="preserve">
                    <Paragraph TextAlignment="Center" FontSize="18"><Bold>bold</Bold></Paragraph>
                    <Paragraph>Para<Italic>italic</Italic>HTML</Paragraph>
                    <Paragraph>aaa<Button>Push me</Button> 
                    <RadioButton IsChecked="True">Yes</RadioButton>
                    <RadioButton>No</RadioButton>
                    <RadioButton>Unsure</RadioButton>
                    </Paragraph>
                    <Paragraph><Bold>Lists:</Bold></Paragraph>
                    <List>
                        <ListItem><Paragraph>A</Paragraph></ListItem>
                        <ListItem><Paragraph>B</Paragraph></ListItem>
                        <ListItem><Paragraph>C<Ellipse Fill="Red" Width="20" Height="20"/></Paragraph></ListItem>
                        <ListItem><Paragraph>D<Rectangle Fill="Blue" Width="20" Height="20"></Rectangle></Paragraph></ListItem>
                    </List>
                </FlowDocument>
            </FlowDocumentReader>
        </Button>
    </DockPanel>
</Window>
WPF Set Radio Button To Check State








24.21.RadioButton
24.21.1.Checked RadioButtonChecked RadioButton
24.21.2.Use StackPanel to Hold RadioButtonsUse StackPanel to Hold RadioButtons
24.21.3.Circled Radio ButtonsCircled Radio Buttons
24.21.4.Color animate based on Radio Button Click eventColor animate based on Radio Button Click event
24.21.5.Radio Button GroupsRadio Button Groups
24.21.6.Set RadioButton to check stateSet RadioButton to check state
24.21.7.Image RadioButtonImage RadioButton
24.21.8.Add checked event listener to RadioButton
24.21.9.Assign value to RadioButton tag