public MainPage()

in WhackAMole.UWPClient/MainPage.xaml.cs [61:93]


        public MainPage()
        {
            this.InitializeComponent();
            this.Loaded += async (s, e) => {
                MolePen.Clip = new RectangleGeometry() { Rect = new Rect(0, 0, MolePen.ActualWidth, MolePen.ActualHeight) };
                if (_whackSpace == null)
                {
                    _whackSpace = new WhackSpace(MolePen.ActualWidth, MolePen.ActualHeight, Settings);
                    DataContext = _whackSpace;
                    _whackSpace.Inactive += async (s1, e1) =>
                    {
                        await this.Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal,
                            () =>
                            {
                                this.Frame.GoBack();
                            });
                    };
                }

                Debug.WriteLine($"start size: {this.ActualWidth} - {this.ActualHeight}");
                Debug.WriteLine($"mole start size: {MolePen.ActualWidth} - {MolePen.ActualHeight}");
                await Start();
            };
            
            this.SizeChanged += (s, e) => {
                if (_whackSpace == null)
                    return;
                Debug.WriteLine($"old size: {e.PreviousSize} new size: {e.NewSize}");
                Debug.WriteLine($"mole size: {MolePen.ActualWidth} - {MolePen.ActualHeight}");
                _whackSpace.Width = MolePen.ActualWidth;
                _whackSpace.Height = MolePen.ActualHeight;
            };
        }