Ejemplo n.º 1
0
 public ChartClientForRangeControlModule()
 {
     InitializeComponent();
     lbGridAlignment.SelectedIndex = 0;
     ChartClientModel = new ChartClientModel();
     ChartClientModel.NumericItemsSource  = GenerateNumericData();
     ChartClientModel.DateTimeItemsSource = GenerateDateTimeData();
     this.DataContext = this;
 }
Ejemplo n.º 2
0
        protected static void DateTimeGridAlignmentChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            ChartClientModel model = d as ChartClientModel;

            if (model != null && e.NewValue != null)
            {
                DateTimeGridAlignment gridAlignment = (DateTimeGridAlignment)(((ListBoxEditItem)(e.NewValue)).Tag);
                model.GridSpacingVisibility = gridAlignment.Equals(DateTimeGridAlignment.Auto) ? Visibility.Collapsed : Visibility.Visible;
                model.UpdateGridSpacing(gridAlignment);
            }
        }