Ejemplo n.º 1
0
        public MainPage()
        {
            InitializeComponent();

            _pithGrid = new PitchGrid(LayoutRoot);
            _ball = new Ball(BallImage);
            _arrow = new Arrow(ArrowImage);

            LayoutRoot.Width = Consts.Width;
            LayoutRoot.Height = Consts.Height;

            Pitch.Width = Consts.Width;
            Pitch.Height = Consts.Height;

            BallImage.Margin = new Thickness(Consts.Width / 2 - BallImage.Width/2, Consts.Height / 2 - BallImage.Height / 2, 0, 0);
            ArrowImage.Margin = new Thickness(Consts.Width / 2, Consts.Height / 2 - ArrowImage.Height / 2, 0, 0);
        }