Beispiel #1
0
 private void OnPlotChanged(object sender, PlotChangedEventArgs e) {
     if (e.NewPlotElement == null) {
         ClearHistoryInfo();
     } else {
         Plots.PlotContentProvider.DoNotWait(RefreshHistoryInfo());
     }
 }
Beispiel #2
0
 private void OnPlotChanged(object sender, PlotChangedEventArgs e)
 {
     if (e.NewPlotElement == null)
     {
         ClearHistoryInfo();
     }
     else
     {
         Plots.PlotContentProvider.DoNotWait(RefreshHistoryInfo());
     }
 }
        private void ContentProvider_PlotChanged(object sender, PlotChangedEventArgs e)
        {
            this.RootContainer.Child = e.NewPlotElement;
            this.Watermark.Visibility = e.NewPlotElement == null ? Visibility.Visible : Visibility.Hidden;
            this.Scroller.Visibility = e.NewPlotElement == null ? Visibility.Hidden : Visibility.Visible;

            var element = e.NewPlotElement as FrameworkElement;
            if (element != null)
            {
                // Force calculate the size of the plot element
                element.UpdateLayout();

                // If it doesn't fit into our available space, display the scrollbars
                bool showScrollbars = element.ActualWidth > ActualWidth || element.ActualHeight > ActualHeight;
                Scroller.HorizontalScrollBarVisibility = Scroller.VerticalScrollBarVisibility  = showScrollbars ? ScrollBarVisibility.Visible : ScrollBarVisibility.Hidden;
            }
        }
Beispiel #4
0
        private void ContentProvider_PlotChanged(object sender, PlotChangedEventArgs e)
        {
            this.RootContainer.Child  = e.NewPlotElement;
            this.Watermark.Visibility = e.NewPlotElement == null ? Visibility.Visible : Visibility.Hidden;
            this.Scroller.Visibility  = e.NewPlotElement == null ? Visibility.Hidden : Visibility.Visible;

            var element = e.NewPlotElement as FrameworkElement;

            if (element != null)
            {
                // Force calculate the size of the plot element
                element.UpdateLayout();

                // If it doesn't fit into our available space, display the scrollbars
                bool showScrollbars = element.ActualWidth > ActualWidth || element.ActualHeight > ActualHeight;
                Scroller.HorizontalScrollBarVisibility = Scroller.VerticalScrollBarVisibility = showScrollbars ? ScrollBarVisibility.Visible : ScrollBarVisibility.Hidden;
            }
        }