Пример #1
0
        private void _buttonClangeValueTextColor_Click(object sender, RoutedEventArgs e)
        {
            BoundObject bo = DataContext as BoundObject;

            PopupColorPicker.Instance.SelectedColor = bo.ValueTextColor;
            PopupColorPicker.Instance.ColorChanged += new PopupColorPicker.ColorChangedEventHandler(ValueColorChanged);
            PopupColorPicker.Instance.Show();
        }
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            BoundObject bo = DataContext as BoundObject;

            if (bo != null)
            {
                bo.CurrentValue = 77;
            }
        }
Пример #3
0
 public AllControlsDemonstrator()
 {
     InitializeComponent();
     _timer.Interval = TimeSpan.FromSeconds(2);
     _timer.Tick    += new EventHandler(_timer_Elapsed);
     Loaded         += new RoutedEventHandler(IAmLoaded);
     bo = new BoundObject
     {
         CurrentValue        = 50,
         FaceTextColor       = Colors.White,
         FaceTextFormat      = "{0:0}",
         FaceTextVisibility  = Visibility.Visible,
         ValueTextColor      = Colors.White,
         ValueTextFormat     = "{0:0}",
         ValueTextVisibility = Visibility.Visible,
         FaceColorRange      = new ColorPointCollection(),
         NeedleColorRange    = new ColorPointCollection()
     };
     DataContext = bo;
     _timer.Start();
 }
 public AllControlsDemonstrator()
 {
     InitializeComponent();
     _timer.Interval = TimeSpan.FromSeconds(2);
     _timer.Tick += new EventHandler(_timer_Elapsed);
     Loaded += new RoutedEventHandler(IAmLoaded);
     bo = new BoundObject
     {
         CurrentValue = 50,
         FaceTextColor = Colors.White,
         FaceTextFormat = "{0:0}",
         FaceTextVisibility = Visibility.Visible,
         ValueTextColor = Colors.White,
         ValueTextFormat = "{0:0}",
         ValueTextVisibility = Visibility.Visible,
         FaceColorRange = new ColorPointCollection(),
         NeedleColorRange = new ColorPointCollection()
     };
     DataContext = bo;
     _timer.Start();
 }
Пример #5
0
        void ValueColorChanged(object sender, ColorSelectedEventargs e)
        {
            BoundObject bo = DataContext as BoundObject;

            bo.ValueTextColor = e.Color;
        }
 public PerformanceMonitorDemonstrator()
 {
     InitializeComponent();
     DataContext = new BoundObject() ;
 }
 public PerformanceMonitorDemonstrator()
 {
     InitializeComponent();
     DataContext = new BoundObject();
 }
Пример #8
0
 public VduMeterDemonstrator()
 {
     InitializeComponent();
     DataContext = new BoundObject();
 }