Пример #1
0
        void panelContentControlBackButtonClicked(object sender, EventArgs e)
        {
            if (animationLock > 0)
            {
                return;
            }
            PanelContentControl pcc = (PanelContentControl)sender;

            DoExpand(DockLayoutManager.GetLayoutItem(sender as DependencyObject));
            pcc.IsExpanded = !pcc.IsExpanded;
        }
Пример #2
0
        void OnPanelContentControlMouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            if (animationLock > 0)
            {
                return;
            }
            PanelContentControl pcc = (PanelContentControl)sender;

            if (!pcc.IsExpanded)
            {
                DoExpand(DockLayoutManager.GetLayoutItem(sender as DependencyObject));
                pcc.IsExpanded = !pcc.IsExpanded;
            }
        }
Пример #3
0
        LayoutPanel CreateItem(int index)
        {
            LayoutPanel         panel  = new LayoutPanel();
            Random              random = new Random(DateTime.Now.Millisecond);
            PanelContentControl panelContentControl = new PanelContentControl()
            {
                IndexName     = indicies[index],
                CurrentValue  = random.Next(400, 1000),
                CurrentChange = Math.Round(random.NextDouble() - 0.5, 3)
            };

            for (int i = 0; i < 7; i++)
            {
                panelContentControl.Data.Add(new Point(i, random.Next(0, 300)));
            }
            panelContentControl.MouseLeftButtonDown += OnPanelContentControlMouseLeftButtonDown;
            panelContentControl.BackButtonClicked   += new EventHandler(panelContentControlBackButtonClicked);
            panelContentList.Add(panelContentControl);
            panel.Content = panelContentControl;
            return(panel);
        }
Пример #4
0
        private static void OnCurrentChangeChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            PanelContentControl panelContentControl = (PanelContentControl)d;

            panelContentControl.IsChangePositive = (double)(e.NewValue) == 0 ? null : (bool?)((double)(e.NewValue) > 0);
        }
Пример #5
0
        private static void OnCurrentValueChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            PanelContentControl panelContentControl = (PanelContentControl)d;

            panelContentControl.CurrentChange = Math.Round((double)e.NewValue - (double)e.OldValue, 3);
        }