Exemplo n.º 1
0
        protected override NWidget CreateExampleContent()
        {
            NStackPanel stack = new NStackPanel();

            NGroupBox gbh = new NGroupBox("Horizontal");

            stack.Add(gbh);
            m_HSlider   = new NSlider();
            gbh.Content = m_HSlider;
            m_HSlider.HorizontalPlacement = ENHorizontalPlacement.Left;
            m_HSlider.PreferredWidth      = 300;
            m_HSlider.ValueChanged       += new Function <NValueChangeEventArgs>(OnSliderValueChanged);

            NGroupBox gbv = new NGroupBox("Vertical");

            stack.Add(gbv);
            m_VSlider                     = new NSlider();
            gbv.Content                   = m_VSlider;
            m_VSlider.Orientation         = ENHVOrientation.Vertical;
            m_VSlider.PreferredHeight     = 300;
            m_VSlider.HorizontalPlacement = ENHorizontalPlacement.Left;
            m_VSlider.ValueChanged       += new Function <NValueChangeEventArgs>(OnSliderValueChanged);

            return(stack);
        }
Exemplo n.º 2
0
        private NStackPanel CreateRangeBased()
        {
            NStackPanel stack = new NStackPanel();

            stack.VerticalSpacing = 10;

            NNumericUpDown numericUpDown = new NNumericUpDown();

            stack.Add(numericUpDown);

            NSlider slider = new NSlider();

            stack.Add(slider);

            NProgressBar progressBar = new NProgressBar();

            progressBar.PreferredHeight = 20;
            progressBar.Value           = 40;
            stack.Add(progressBar);

            return(stack);
        }