using System.Windows;
using Microsoft.Phone.Controls;
using System.Windows.Controls;
using System.Windows.Media;
using System.Windows.Controls.Primitives;

namespace Controls.Pages
{
    public partial class PopUpPage : PhoneApplicationPage
    {
        //private Popup myPopup = new Popup();

        public PopUpPage()
        {
            InitializeComponent();

            //// Steuerelemente fuer die Popup-Oberflaeche initialisieren
            //TextBlock textblock1 = new TextBlock();       
            //textblock1.Text = "Dies ist ein Textblock im PopUp Element";

            //Button btnClosePopUp = new Button();
            //btnClosePopUp.Margin = new Thickness(10, 10, 10, 10);
            //btnClosePopUp.Width = 320;
            //btnClosePopUp.Content = "PopUp ausblenden";
            //btnClosePopUp.Click+=new RoutedEventHandler(btnClosePopup_Click);

            //StackPanel stackpanel1 = new StackPanel();
            //stackpanel1.Children.Add(textblock1);
            //stackpanel1.Children.Add(btnClosePopUp);

            //Border border1 = new Border();
            //border1.BorderBrush = new SolidColorBrush(Colors.Red);
            //border1.BorderThickness = new Thickness(5.0);
            //border1.Height = 144;
            //border1.Width = 384;
            //border1.Child = stackpanel1;

            //// Popup initialisieren
            //myPopup.IsOpen = true;
            //myPopup.HorizontalOffset = 40;
            //myPopup.VerticalOffset = 100;
            //myPopup.Child = border1;

            //ContentPanel.Children.Add(myPopup);
        }

        private void btnClosePopup_Click(object sender, RoutedEventArgs e)
        {
            // Popup ausblenden
            myPopup.IsOpen = false;
        }
    }
}