Пример #1
0
            //containers.MouseMove += OnMouseMove;
            //containers.MouseLeave += OnMouseLeave;
            //containers.MouseLeftButtonDown += OnMousePress;
            //containers.MouseLeftButtonUp += OnMouseRelease;
#else
        protected override void OnApplyTemplate()
        {
            Containers = this.GetTemplateChild("PART_containers") as ContainerCollection;
            if (Containers != null)
            {
                Containers.Chart = this;
            }
            RootDockPanel = this.GetTemplateChild("Part_rootDockPanel") as RootPanel;
#endif
#if WPF
            Containers.ClipToBounds = true;
#else
            foreach (SeriesBase series in Series)
            {
                Binding dataContextBinding = new Binding {
                    Path = new PropertyPath("DataContext"), Source = this
                };
                BindingOperations.SetBinding(series, SeriesBase.DataContextProperty, dataContextBinding);
            }
#endif
            BrushTheme();
            base.OnApplyTemplate();
            legend          = (Legend)this.GetTemplateChild("Part_Legend");
            InnerChartPanel = (Grid)this.GetTemplateChild("Part_InnerChartPanel");
            OuterChartPanel = (Grid)this.GetTemplateChild("Part_OuterChartPanel");
            RefreshLegend();
        }
Пример #2
0
 /// <summary>
 /// When overridden in a derived class, is invoked whenever application code or internal processes (such as a rebuilding layout pass) call <see cref="M:System.Windows.Controls.Control.ApplyTemplate" />. In simplest terms, this means the method is called just before a UI element displays in an application. For more information, see Remarks.
 /// </summary>
 public override void OnApplyTemplate()
 {
     Containers = (ContainerCollection)this.GetTemplateChild("PART_containers");
     if (Containers != null)
     {
         Containers.Chart = this;
     }
     RootDockPanel = (RootPanel)this.GetTemplateChild("Part_rootDockPanel");
Пример #3
0
            //containers.MouseMove += OnMouseMove;
            //containers.MouseLeave += OnMouseLeave;
            //containers.MouseLeftButtonDown += OnMousePress;
            //containers.MouseLeftButtonUp += OnMouseRelease;
#else
        protected override void OnApplyTemplate()
        {
            Containers = this.GetTemplateChild("PART_containers") as ContainerCollection;
            if (Containers != null)
                Containers.Chart = this;
            RootDockPanel = this.GetTemplateChild("Part_rootDockPanel") as RootPanel;            
#endif
#if WPF
            Containers.ClipToBounds = true;  
#else
            foreach (SeriesBase series in Series)
            {
                Binding dataContextBinding = new Binding {Path = new PropertyPath("DataContext"), Source = this};
                BindingOperations.SetBinding(series, SeriesBase.DataContextProperty, dataContextBinding);
            }
#endif                       
            BrushTheme();       
            base.OnApplyTemplate();
            legend = (Legend)this.GetTemplateChild("Part_Legend");
            InnerChartPanel = (Grid)this.GetTemplateChild("Part_InnerChartPanel");
            OuterChartPanel = (Grid)this.GetTemplateChild("Part_OuterChartPanel");
            RefreshLegend();  
        }
Пример #4
0
 /// <summary>
 /// When overridden in a derived class, is invoked whenever application code or internal processes (such as a rebuilding layout pass) call <see cref="M:System.Windows.Controls.Control.ApplyTemplate" />. In simplest terms, this means the method is called just before a UI element displays in an application. For more information, see Remarks.
 /// </summary>
 public override void OnApplyTemplate()
 {            
     Containers = (ContainerCollection)this.GetTemplateChild("PART_containers");
     if (Containers != null)
         Containers.Chart = this;
     RootDockPanel = (RootPanel)this.GetTemplateChild("Part_rootDockPanel");