question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

RadioButtons does not support direct content.

See original GitHub issue

I’m trying to place RadioButton inside the RadioButtons group as per documentation.

<RadioButtons>
                    <RadioButton Content="Button1"/>
                    <RadioButton Content="Button2"/>
 </RadioButtons>

I keep getting RadioButtons does not support direct content. RadioButtons does not support layout controls like StackPanel or Grid.

The only way I seem I seem to get it to work is if I create my own RadioButton group.

Is anyone else experiencing this, I can’t work out what I’m doing wrong.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
Felix-Devcommented, Dec 17, 2020

I believe the RadioButtons control takes String values, and it creates it’s own RadioButton controls…

The RadioButtons control should be able to work with elements passed as a RadioButton. We only wrap an element in a RadioButton control if said element is not a RadioButton.

0reactions
Elmarcotorocommented, Dec 19, 2020

@MikeHillberg Thank you, You are correct, it does build and run. I never tried to build because of the error. I feel foolish:-( For the WinUI guys this is happening on the ProjectReunion nuget package.

Read more comments on GitHub >

github_iconTop Results From Across the Web

The type 'RadioButton' does not support direct content
I am using the new RadioButton in Xam.Forms 5 The Android implementation doesn't support views, so I must have a different layout according ......
Read more >
xaml The type 'Button' does not support direct content
Try to use Grid inside the Button.Content element. <Button> <Button.Content> <Grid> </Grid> </Button.Content> </Button>. Resources:.
Read more >
The type "LayoutControl" does not support direct content
Hello, This issue may occur if you don't add all the required references. Please check if you add a reference to the DevExpress....
Read more >
When using a Visual Studio Preview version, you ...
The XAML editor shows The type 'page' does not support direct content message. XAML Intellisense is not working properly in Visual Studio when...
Read more >
The RadioButton control
The RadioButton control allows you to give your user a list of possible options and in this article, we give it a thorough...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found