Exemplo n.º 1
0
        private void HideWheelAndPlaceText(FortuneWheel wheel, int textIdx)
        {
            wheel.Visibility = Visibility.Collapsed;

            var tb = new TextBlock
            {
                Text = wheel.CorrectValue,
                Height = 80,
                FontSize = 16,
                FontWeight = FontWeights.Bold,
                HorizontalAlignment = HorizontalAlignment.Center,
            };
            _leftStack.Children.Insert(textIdx, tb);
        }
Exemplo n.º 2
0
        private void HideWheelAndPlaceText(FortuneWheel wheel, int textIdx)
        {
            wheel.Visibility = Visibility.Collapsed;

            var tb = new TextBlock
            {
                Text                = wheel.CorrectValue,
                Height              = 80,
                FontSize            = 16,
                FontWeight          = FontWeights.Bold,
                HorizontalAlignment = HorizontalAlignment.Center,
            };

            _leftStack.Children.Insert(textIdx, tb);
        }
Exemplo n.º 3
0
        private void ShowNextWheel(FortuneWheel wheel, string title, string values, string correctValue)
        {
            _leftStack.Children.Remove(wheel);
            wheel.SetValue(Grid.RowProperty, 1);
            wheel.SetValue(Grid.ColumnProperty, 1);
            wheel.Width = double.NaN;
            wheel.Height = double.NaN;
            wheel.Values = values;
            wheel.Title = title;
            wheel.CorrectValue = correctValue;
            _grid.Children.Add(wheel);

            _nextTapAction = () =>
            {
                wheel.Spin();
                _nextTapAction = null;
            };
        }