top button
Flag Notify
Site Registration

Explain XAML POPUP in Windows Phone?

+2 votes
383 views
Explain XAML POPUP in Windows Phone?
posted Feb 12, 2015 by Saravanan

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+2 votes
 
Best answer

Xaml PopUp:

A XAML Popup represents a popup window. A popup window is a window that floats over a page or window providing functionality for some quick action. For example a login control on a page or to provide an animated popup tip. Fortunately, WPF comes with a Popup control to provide this functionality.

This tutorial shows you how to create and use a Popup control available in Windows Presentation Foundation (WPF) and XAML.

<Popup></Popup>  

The Width and Height properties represent the width and the height of a Popup.

The Name property represents the name of the control, which is a unique identifier of a control. The Margin property tells the location of a Popup on the parent control. The HorizontalAlignment and VerticalAlignment properties are used to set horizontal and vertical alignments.

The code also sets the horizontal alignment to left and the vertical alignment to top.

<Popup Margin="10,10,0,13" Name="Popup1" HorizontalAlignment="Left"   
VerticalAlignment="Top" Width="194" Height="200" /> 

To make a popup control visible, you need to set the IsOpen property to true.

IsOpen="True"

Adding Popup Contents

A Popup control can have only one child

<Popup Margin="10,10,0,13" Name="Popup1" HorizontalAlignment="Left"   
 VerticalAlignment="Top" Width="194" Height="200" IsOpen="True">  
       <TextBlock Name="McTextBlock"   
             Background="LightBlue" >  
        This is popup text   
       </TextBlock>  
</Popup>  
answer Feb 16, 2015 by Jdk
how to align center , in all mobile screen ?
...