Ejemplo n.º 1
0
        private StackPanel GetAddBlockPanel()
        {
            var          margin   = new Thickness(0, 0, 0, 20);
            const double fontSize = 30;

            _addBlockPanel = new StackPanel();

            var lastTimeValue = _timeSlider != null?_timeSlider.GetTimeValue() : DefaultTime;

            var label = new TextBlock
            {
                Text         = AppResources.IntervalAddLabel,
                Margin       = margin,
                TextWrapping = TextWrapping.Wrap,
                FontSize     = fontSize
            };

            _tbxLabel = new PhoneTextBox
            {
                Height = 72,
                Width  = 456,
                HorizontalAlignment = HorizontalAlignment.Left,
                TextWrapping        = TextWrapping.Wrap,
                Hint = "Block n°" + (_viewModel.Blocks.Count + 1)
            };
            var tbkTemps = new TextBlock
            {
                Text         = AppResources.IntervalAddTime,
                Margin       = margin,
                TextWrapping = TextWrapping.Wrap,
                FontSize     = fontSize
            };

            _timeSlider = new TimeLabeledRadialSlider
            {
                TextFontSize = 90,
            };
            _timeSlider.SetTimeValue(lastTimeValue);
            _addBlockPanel.Children.Add(label);
            _addBlockPanel.Children.Add(_tbxLabel);
            _addBlockPanel.Children.Add(tbkTemps);
            _addBlockPanel.Children.Add(_timeSlider);

            return(_addBlockPanel);
        }