public MainWindow(IWpfVisualizerData data) { RenderOptions.ProcessRenderMode = RenderMode.SoftwareOnly; InitializeComponent(); this.frameholder.Visibility = Visibility.Hidden; this.frameholderTimer.Visibility = Visibility.Hidden; this.DataContext = data; var backgroundFill = ColorHelpers.Convert(data.Configuration.FillColor); BackgroundPlottable = data.Display.BackgroundDataPlot.plt.PlotSignal(new double[] { 1, 10, 5, 15, 10, 5, 0 }, lineWidth: 2, markerSize: 0, color: backgroundFill); BackgroundPlottable.fillColor1 = backgroundFill; BackgroundPlottable.fillType = FillType.FillBelow; var foregroundFill = ColorHelpers.Convert(data.Configuration.ChartProgressColor); ForegroundPlottable = data.Display.MainDataPlot.plt.PlotSignal(new double[] { 1, 10, 5, 15, 10, 5, 0 }, lineWidth: 2, markerSize: 0, color: foregroundFill); ForegroundPlottable.fillColor1 = foregroundFill; ForegroundPlottable.fillType = FillType.FillBelow; this.frameholder.Content = new Chart(new DataPlotBinding { WpfPlot = data.Display.BackgroundDataPlot, Data = data }); this.frameholderTimer.Content = new Chart(new DataPlotBinding { WpfPlot = data.Display.MainDataPlot, Data = data }); }
//TODO: Resizing of transparent wpf window is not supported natively.(xaml) public MainWindow(IWpfVisualizerData data) { InitializeComponent(); this.DataContext = data; this.frameholder.Content = new Chart(data, $"{nameof(IWpfVisualizerData.Configuration)}.{nameof(IWpfVisualizerData.Configuration.ChartColor)}", false); this.frameholderTimer.Content = new Chart(data, $"{nameof(IWpfVisualizerData.Configuration)}.{nameof(IWpfVisualizerData.Configuration.ChartProgressColor)}", true); }
//TODO: Resizing of transparent wpf window is not supported natively.(xaml) public MainWindow(IWpfVisualizerData data) { RenderOptions.ProcessRenderMode = RenderMode.SoftwareOnly; InitializeComponent(); this.DataContext = data; this.frameholder.Content = new Chart(data, $"{nameof(IWpfVisualizerData.Configuration)}.{nameof(IWpfVisualizerData.Configuration.ChartColor)}", false); this.frameholderTimer.Content = new Chart(data, $"{nameof(IWpfVisualizerData.Configuration)}.{nameof(IWpfVisualizerData.Configuration.ChartProgressColor)}", true); }
public Chart(IWpfVisualizerData data, string bindingName, bool isProgressChart) { InitializeComponent(); var binding = new Binding(bindingName); binding.Source = data; LineSeries.SetBinding(Series.FillProperty, binding); if (isProgressChart) { //Disable drawing of AxisY separator binding = new Binding(); AxisYSeparator.SetBinding(Separator.IsEnabledProperty, binding); AxisYSeparator.SetValue(Separator.StrokeThicknessProperty, 0d); } DataContext = data; }