弹出窗口:页边距有问题
|
我正在开发Windows Phone应用。
我使用一个用户控件来显示一个弹出窗口:
<UserControl x:Class=\"XXXXXXX.Views.Lists.GameDescriptionControl\"
xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"
xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"
xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"
xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"
mc:Ignorable=\"d\"
FontFamily=\"{StaticResource PhoneFontFamilyNormal}\"
FontSize=\"{StaticResource PhoneFontSizeNormal}\"
Foreground=\"{StaticResource PhoneForegroundBrush}\" Height=\"290\" Width=\"460\">
<Grid x:Name=\"LayoutRoot\" Background=\"{StaticResource PhoneChromeBrush}\" Margin=\"0,0,0,0\" Width=\"460\">
<Grid.RowDefinitions>
<RowDefinition Height=\"Auto\"/>
<RowDefinition Height=\"133\"/>
<RowDefinition Height=\"86\"/>
</Grid.RowDefinitions>
<TextBlock HorizontalAlignment=\"Center\" Margin=\"10\" Name=\"gameDescription\" Text=\"\" VerticalAlignment=\"Top\" TextWrapping=\"Wrap\" Grid.Row=\"1\" Style=\"{StaticResource PhoneTextTitle3Style}\" />
<Button Content=\"{Binding Path=AppResources.Yes, Source={StaticResource LocalizedStrings}}\" Height=\"72\" HorizontalAlignment=\"Left\" Margin=\"50,5,0,0\" Name=\"okButton\" VerticalAlignment=\"Top\" Width=\"160\" Click=\"okButton_Click\" Grid.Row=\"2\" />
<Button Content=\"{Binding Path=AppResources.No, Source={StaticResource LocalizedStrings}}\" Height=\"72\" HorizontalAlignment=\"Left\" Margin=\"244,5,0,0\" Name=\"cancelButton\" VerticalAlignment=\"Top\" Width=\"160\" Click=\"cancelButton_Click\" Grid.Row=\"2\" />
<TextBlock Grid.Row=\"0\" x:Name=\"caption\" HorizontalAlignment=\"Left\" Margin=\"10\" TextWrapping=\"Wrap\" Text=\"{Binding Path=AppResources.Description, Source={StaticResource LocalizedStrings}}\" Style=\"{StaticResource PhoneTextLargeStyle}\"/>
</Grid>
</UserControl>
这是显示弹出窗口的代码:
private void showInfo(int gameId)
{
string gameDesc = getGameInfo(gameId);
p = new Popup();
GameDescriptionControl gd = new GameDescriptionControl();
gd.Description = gameDesc;
gd.OkClicked += new EventHandler(gd_OkClicked);
gd.CancelClicked += new EventHandler(gd_CancelClicked);
p.Child = gd;
// Set where the popup will show up on the screen.
p.VerticalOffset = 10;
p.HorizontalOffset = 10;
// Open the popup.
p.IsOpen = true;
}
但是我得到这个:
如您所见,字幕TextBlock的页边空白不大。
有什么建议吗?
没有找到相关结果
已邀请:
2 个回复
瓜唱鬼
荒劫娇噬