我希望在MessagePrompt上有一个Body尺寸400x400,但是找不到除了Body之外的额外空格的属性!
var objMessagePrompt = new MessagePrompt
{
VerticalAlignment = VerticalAlignment.Center,
Body = new BodyPage(),
IsCancelVisible = false,
MaxWidth = 400,
MaxHeight = 400,
IsOverlayApplied=false,
BorderThickness=new Thickness(0,0,0,0),
Padding = new Thickness(0, 0, 0, 0),
Margin = new Thickness(0, 0, 0, 0),
};
objMessagePrompt.ActionPopUpButtons.Clear();
objMessagePrompt.Show();
答案 0 :(得分:0)
这是我用来覆盖当前样式的样式:
<ControlTemplate x:Key="MsgPropmtNoBorder" TargetType="c4f:MessagePrompt">
<Grid VerticalAlignment="Stretch">
<Rectangle Fill="Transparent" />
<Border VerticalAlignment="Top"
Margin="0"
Background="{TemplateBinding Background}"
BorderThickness="0"
BorderBrush="{StaticResource PhoneForegroundBrush}">
<StackPanel Margin="0">
<ContentPresenter Content="{TemplateBinding Body}" />
</StackPanel>
</Border>
</Grid>
</ControlTemplate>