Ejemplo n.º 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;
        }
Ejemplo n.º 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;
            }
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }