public void InitializeComponent() {
     if (_contentLoaded) {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/UnityBallgame;component/MainPage.xaml", System.UriKind.Relative));
     this.DrawingSurfaceBackground = ((System.Windows.Controls.DrawingSurfaceBackgroundGrid)(this.FindName("DrawingSurfaceBackground")));
 }
 public void InitializeComponent() {
     if (_contentLoaded) {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/CrazzyBird;component/MainPage.xaml", System.UriKind.Relative));
     this.DrawingSurfaceBackground = ((System.Windows.Controls.DrawingSurfaceBackgroundGrid)(this.FindName("DrawingSurfaceBackground")));
     this.AdMedBottomCenter = ((Microsoft.AdMediator.WindowsPhone8.AdMediatorControl)(this.FindName("AdMedBottomCenter")));
 }
Exemple #3
0
 public void InitializeComponent()
 {
     if (_contentLoaded)
     {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/GUI1;component/MainPage.xaml", System.UriKind.Relative));
     this.DrawingSurfaceBackground = ((System.Windows.Controls.DrawingSurfaceBackgroundGrid)(this.FindName("DrawingSurfaceBackground")));
 }
Exemple #4
0
 public void InitializeComponent() {
     if (_contentLoaded) {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/Crabby;component/GamePage.xaml", System.UriKind.Relative));
     this.XnaSurface = ((System.Windows.Controls.DrawingSurfaceBackgroundGrid)(this.FindName("XnaSurface")));
     this.TitlePanel = ((System.Windows.Controls.StackPanel)(this.FindName("TitlePanel")));
     this.ContentPanel = ((System.Windows.Controls.Grid)(this.FindName("ContentPanel")));
 }
 public void InitializeComponent() {
     if (_contentLoaded) {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/_2Cars2;component/MainPage.xaml", System.UriKind.Relative));
     this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.DrawingSurfaceBackground = ((System.Windows.Controls.DrawingSurfaceBackgroundGrid)(this.FindName("DrawingSurfaceBackground")));
     this.adGridVserv = ((System.Windows.Controls.Grid)(this.FindName("adGridVserv")));
     this.adGridAdmob = ((System.Windows.Controls.Grid)(this.FindName("adGridAdmob")));
 }
Exemple #6
0
 public void InitializeComponent() {
     if (_contentLoaded) {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/PhoneDirect3DXamlAppInterop;component/MainPage.xaml", System.UriKind.Relative));
     this.DrawingSurfaceBackground = ((System.Windows.Controls.DrawingSurfaceBackgroundGrid)(this.FindName("DrawingSurfaceBackground")));
     this.MemoryDisplay = ((System.Windows.Controls.StackPanel)(this.FindName("MemoryDisplay")));
     this.MemoryTextBlock = ((System.Windows.Controls.TextBlock)(this.FindName("MemoryTextBlock")));
     this.PeakMemoryTextBlock = ((System.Windows.Controls.TextBlock)(this.FindName("PeakMemoryTextBlock")));
 }
 public void InitializeComponent()
 {
     if (_contentLoaded)
     {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/TextTutorial;component/MainPage.xaml", System.UriKind.Relative));
     this.fDrawingSurfaceBackgroundGrid = ((System.Windows.Controls.DrawingSurfaceBackgroundGrid)(this.FindName("fDrawingSurfaceBackgroundGrid")));
     this.fCoronaPanel = ((CoronaLabs.Corona.WinRT.Phone.CoronaPanel)(this.FindName("fCoronaPanel")));
 }
 public void InitializeComponent()
 {
     if (_contentLoaded)
     {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/.in;component/MainPage.xaml", System.UriKind.Relative));
     this.root        = ((Microsoft.Phone.Controls.PhoneApplicationPage)(this.FindName("root")));
     this.DisplayGrid = ((System.Windows.Controls.DrawingSurfaceBackgroundGrid)(this.FindName("DisplayGrid")));
     this.red         = ((System.Windows.Controls.Button)(this.FindName("red")));
 }
Exemple #9
0
 public void InitializeComponent()
 {
     if (_contentLoaded)
     {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/ChizMover;component/GamePage.xaml", System.UriKind.Relative));
     this.XnaSurface   = ((System.Windows.Controls.DrawingSurfaceBackgroundGrid)(this.FindName("XnaSurface")));
     this.TitlePanel   = ((System.Windows.Controls.StackPanel)(this.FindName("TitlePanel")));
     this.ContentPanel = ((System.Windows.Controls.Grid)(this.FindName("ContentPanel")));
 }
 public void InitializeComponent()
 {
     if (_contentLoaded)
     {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/PhoneDirect3DXamlAppInterop;component/MainPage.xaml", System.UriKind.Relative));
     this.DrawingSurfaceBackground = ((System.Windows.Controls.DrawingSurfaceBackgroundGrid)(this.FindName("DrawingSurfaceBackground")));
     this.MemoryDisplay            = ((System.Windows.Controls.StackPanel)(this.FindName("MemoryDisplay")));
     this.MemoryTextBlock          = ((System.Windows.Controls.TextBlock)(this.FindName("MemoryTextBlock")));
     this.PeakMemoryTextBlock      = ((System.Windows.Controls.TextBlock)(this.FindName("PeakMemoryTextBlock")));
 }
        public void Load(System.Windows.Controls.DrawingSurfaceBackgroundGrid dSurface, FrameworkElement drawingLayer = null)
        {
            DrawingSurfaceBackground = dSurface;
            var content = Application.Current.Host.Content;

            Interop.WindowBounds     = new Windows.Foundation.Size((float)content.ActualWidth, (float)content.ActualHeight);
            Interop.NativeResolution = new Windows.Foundation.Size((float)Math.Floor(content.ActualWidth * content.ScaleFactor / 100.0f + 0.5f),
                                                                   (float)Math.Floor(content.ActualHeight * content.ScaleFactor / 100.0f + 0.5f));
            Interop.RenderResolution = Interop.NativeResolution;
            var pr = Interop.CreateContentProvider();

            pr.AddToObjectMonitor("PROVIDER");
            DrawingSurfaceBackground.SetBackgroundContentProvider(pr);
            DrawingSurfaceBackground.SetBackgroundManipulationHandler(Interop);


            if (drawingLayer != null)
            {
                List <UIElement> parList = new List <UIElement>();
                foreach (var i in DrawingSurfaceBackground.SelectElements <UIElement>(drawingLayer, parList))
                {
                    if (i.Visibility == Visibility.Visible)
                    {
                        restoreActions.Add(() => i.Visibility = Visibility.Visible);
                        i.Visibility = Visibility.Collapsed;
                    }
                }
                foreach (var item in parList)
                {
                    if (item is Panel)
                    {
                        var bitem = item as Panel;
                        var brush = bitem.Background;
                        bitem.Background = null;
                        restoreActions.Add(() => bitem.Background = brush);
                    }
                }
            }
        }