O'Reilly logo

XAML Unleashed by Adam Nathan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Consuming the User Control

Consuming a user control is straightforward. You must simply reference the appropriate namespace for the element, which, in this case, is Chapter15. Figure 15.1 shows three instances of the control on the following Page:

<Page x:Class="Chapter15.MainPage" xmlns:local="using:Chapter15"   xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">  <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">    <StackPanel HorizontalAlignment="Left">      <local:NumericUpDown/>       <local:NumericUpDown Number="5"/>       <local:NumericUpDown Number="10"/>     </StackPanel>  </Grid></Page>

FIGURE 15.1 NumericUpDown ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required