2012-08-27 38 views

回答

2

显然你把它作为<phone:PhoneApplicationPage>的孩子。

实施例给出:

<phone:PhoneApplicationPage x:Class="Your.Class" 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone" 
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone" 
    Some other namespace declarations > 

    <!-- Your page resources dictionary --> 
    <phone:PhoneApplicationPage.Resources> 
     <ControlTemplate x:Key="MsgPropmtNoBorder" 
         TargetType="c4f:MessagePrompt"> 
       BLAH-BLAH-BLAH 
     </ControlTemplate> 
    </phone:PhoneApplicationPage.Resources> 

    <!-- Your layout root and all the page content --> 
    <Grid x:Name="LayoutRoot" 
      Background="Transparent"> 
     <Grid.RowDefinitions> 
      <RowDefinition Height="Auto" /> 
      <RowDefinition Height="*" /> 
     </Grid.RowDefinitions> 

     BLAH-BLAH-BLAH-YOUR-CONTENT 

    </Grid> 
</phone:PhoneApplicationPage>