Consuming the Control

Figure 15.2 shows instances of PlayingCard in action, using the following content of MainPage.xaml:

<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}">    <Viewbox>      <StackPanel Orientation="Horizontal">        <local:PlayingCard Face="HA"/>        <local:PlayingCard Face="D2"/>        <local:PlayingCard Face="C3"/>        <local:PlayingCard Face="S4"/>      </StackPanel>    </Viewbox>  </Grid></Page>

FIGURE 15.2 Four PlayingCard instances, after the two of diamonds is clicked ...

Get XAML Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.