Exemplo n.º 1
0
 private void right_Clicked(object sender, EventArgs e)
 {
     if (move(strRight))
     {
         InformationPopup popup = new InformationPopup();
         popup.Title = "CLEAR";
         popup.Text  = "End the game";
         popup.Show();
     }
 }
Exemplo n.º 2
0
        public InformationPopup()
        {
            _popUp = DependencyService.Get <InformationPopup>(DependencyFetchTarget.NewInstance);
            if (_popUp == null)
            {
                throw new InvalidOperationException("Object reference not set to an instance of a Popup.");
            }

            _popUp.BackButtonPressed += (s, e) =>
            {
                BackButtonPressed?.Invoke(this, EventArgs.Empty);
            };

            SetBinding(IsProgressRunningProperty, new Binding(nameof(IsProgressRunning), mode: BindingMode.OneWayToSource, source: _popUp));
            SetBinding(BottomButtonProperty, new Binding(nameof(BottomButton), mode: BindingMode.OneWayToSource, source: _popUp));
            SetBinding(TitleProperty, new Binding(nameof(Title), mode: BindingMode.OneWayToSource, source: _popUp));
            SetBinding(TextProperty, new Binding(nameof(Text), mode: BindingMode.OneWayToSource, source: _popUp));
        }