How to open a User Control in UWP

In UWP, you can understand UserControl as a container in which some controls are placed.

For a control container, the way to display it on the interface is to put it in the visual tree.

UserControl does not have a Show method. To show it, you can do this:

<Grid x:Name="RootGrid">
    <MyUserControl .../>
</Grid>

or add it in code-behind

RootGrid.Children.Add(new MyUserControl());

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top