private void NumberBoxHeight_ValueChanged(NumberBox sender, NumberBoxValueChangedEventArgs args)
 {
     if (ViewModel.SelectedHeight.Display != args.NewValue)
     {
         ViewModel.SelectedHeight = new MeasurementValue(MeasurementType.Display, args.NewValue, ViewModel.InchesPerPixel);
     }
 }
示例#2
0
        private void NumberBox_ValueChanged(NumberBox sender, NumberBoxValueChangedEventArgs args)
        {
            if (StyledGridIWG == null)
            {
                return;
            }

            // Only update either max-row value or margins

            /*if (sender == WrapItemCount)
             * {
             *  StyledGridIWG.MaximumRowsOrColumns = (int)WrapItemCount.Value;
             *  return;
             * }*/

            int rowSpace    = (int)RowSpace.Value;
            int columnSpace = (int)ColumnSpace.Value;

            for (int i = 0; i < StyledGrid.Items.Count; i++)
            {
                GridViewItem item = StyledGrid.ItemContainerGenerator.ContainerFromIndex(i) as GridViewItem;

                Thickness NewMargin = item.Margin;
                NewMargin.Left   = columnSpace;
                NewMargin.Top    = rowSpace;
                NewMargin.Right  = columnSpace;
                NewMargin.Bottom = rowSpace;

                item.Margin = NewMargin;
            }
        }
示例#3
0
        private void NumberBox_OnValueChanged(NumberBox sender, NumberBoxValueChangedEventArgs args)
        {
            var typicalDay = (int)BillingPeriodTypicalBeginningNumberBox.Value;

            AppData.settings.TypicalBeginningOfPeriod = typicalDay;

            SaveSettings();
        }
示例#4
0
        private void MaxText_ValueChanged(NumberBox sender, NumberBoxValueChangedEventArgs args)
        {
            ulong?nullableCount;
            ulong i;

            if (ulong.TryParse(maxText.Value.ToString(), out i))
            {
                nullableCount = i;
            }
            else
            {
                nullableCount = null;
            }

            calendarDateRangePicker1.MaxDatesCountInRange = nullableCount;
        }
示例#5
0
        private void _numberControl_OnValueChanged(NumberBox sender, NumberBoxValueChangedEventArgs args)
        {
            if (_suppressEvents)
            {
                return;
            }

            try
            {
                var currentValue = this.Value;
            }
            catch
            {
                // overflow, reset to default.
                this.Value = _defaultValue;
                return;
            }
            this.ValueChanged.RaiseEvent(this);
        }