简体   繁体   中英

How to remove extra spaces in Coding4Fun MessagePrompt background?

I want to have a Body sized 400x400 on MessagePrompt but can't find a property to remove extra spaces besides 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();  

This is the style i used to override current style:

 <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>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM