1
我正在嘗試爲顯示EULA的全屏彈出窗口創建用戶控件。我無法讓我的內容顯示,但我不知道爲什麼。我創建了其他彈出式控件,並且在這些和這個之間沒有看到任何佈局差異。自定義WP7彈出式窗口控件不顯示內容
在Expression Blend中,我可以單擊LayoutRoot節點,它顯示我的背景樣式,但沒有內容。如果我點擊popEula節點,我會看到整個內容,包括背景樣式。當我將控件添加到頁面時,我只能看到背景。我不確定爲什麼我的所有內容都在消失。
<Grid x:Name="LayoutRoot" Style="{StaticResource MyBackgroundStyle}">
<Popup x:Name="popEula">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<!--This section is empty. Place new content here Grid.Row="1"-->
<Grid Grid.Row="1" x:Name="ContentGrid" Margin="24, 0, 24, 0">
<Grid.RowDefinitions>
<RowDefinition Height="435" />
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<ScrollViewer x:Name="ScrollViewer">
<TextBlock x:Name="LicenseText" Style="{StaticResource MyTextNormalStyle}"
Text="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum bibendum semper ante a vestibulum. Ut ultricies tellus sit amet sapien viverra tempus. Sed auctor pretium purus, eu ornare libero malesuada a. Vivamus dignissim vulputate nunc, a venenatis sapien condimentum quis. Nam vestibulum, neque molestie rhoncus rutrum, ante lacus vulputate odio, ac tristique augue lacus ac mi. Donec a sollicitudin diam. Nulla facilisi. Ut eu purus felis, id faucibus urna. Nullam luctus porttitor cursus. Curabitur auctor leo vitae lorem fringilla at egestas mi sollicitudin. Vestibulum blandit tempor orci vel iaculis. Sed eleifend bibendum dapibus. Sed sed elit ac libero consequat interdum sit amet vitae lacus. Donec sit amet velit et nulla placerat iaculis. Nunc aliquam sollicitudin cursus. Sed sed tincidunt augue. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum bibendum semper ante a vestibulum. Ut ultricies tellus sit amet sapien viverra tempus. Sed auctor pretium purus, eu ornare libero malesuada a. Vivamus dignissim vulputate nunc, a venenatis sapien condimentum quis. Nam vestibulum, neque molestie rhoncus rutrum, ante lacus vulputate odio, ac tristique augue lacus ac mi. Donec a sollicitudin diam. Nulla facilisi. Ut eu purus felis, id faucibus urna. Nullam luctus porttitor cursus. Curabitur auctor leo vitae lorem fringilla at egestas mi sollicitudin. Vestibulum blandit tempor orci vel iaculis. Sed eleifend bibendum dapibus. Sed sed elit ac libero consequat interdum sit amet vitae lacus. Donec sit amet velit et nulla placerat iaculis. Nunc aliquam sollicitudin cursus. Sed sed tincidunt augue."/>
</ScrollViewer>
<toolkit:WrapPanel Grid.Row="2" Margin="0, 48, 0, 0">
<Button x:Name="btnAccept" Style="{StaticResource MyButtonStyle}" Content="Accept" Width="150"/>
<Button x:Name="btnDecline" Style="{StaticResource MyButtonStyle}" Content="Decline" Width="150" Margin="20, 0, 0, 0" />
</toolkit:WrapPanel>
</Grid>
</Grid>
</Popup>
</Grid>
謝謝。那是我的問題。我不能相信我忽略了這一點。 – CACuzcatlan 2010-12-10 17:37:26