Class PlotWindowViewModel
- Namespace
- Loehnert.Waveforms.ViewModels
- Assembly
- Loehnert.Waveforms.dll
Represents the view model for an plot window.
public class PlotWindowViewModel
- Inheritance
-
PlotWindowViewModel
- Inherited Members
Constructors
PlotWindowViewModel(IEnumerable<IWaveform>)
Initializes a new instance of the PlotWindowViewModel class.
public PlotWindowViewModel(IEnumerable<IWaveform> waveforms)
Parameters
waveforms
IEnumerable<IWaveform>Waveforms to plot.
Properties
AutoGenerateYAxes
Gets or sets a value indicating whether for each waveform a Y axis should be generated.
public bool AutoGenerateYAxes { get; set; }
Property Value
CloseAllCommand
Gets the command to close all plot windows.
public ICommand CloseAllCommand { get; }
Property Value
CloseCommand
Gets the command to close the window.
public ICommand CloseCommand { get; }
Property Value
CopyImageCommand
Gets the command to copy the plot to the clipboard.
public ICommand CopyImageCommand { get; }
Property Value
SaveImageCommand
Gets the command to save the plot as image.
public ICommand SaveImageCommand { get; }
Property Value
Title
Gets or sets the title.
public string Title { get; set; }
Property Value
Waveforms
Gets the waveforms.
public IEnumerable<IWaveform> Waveforms { get; }
Property Value
XAxisZoomIsEnabled
Gets or sets a value indicating whether zoom of X axis is enabled.
public bool XAxisZoomIsEnabled { get; set; }
Property Value
Methods
Close()
Closes the window.
public void Close()
CloseAll()
Closes all open plot windows.
public static void CloseAll()
CopyToClipboard(int, int, Color)
Exports a image to clipboard.
public void CopyToClipboard(int width = 800, int height = 600, Color background = default)
Parameters
width
intThe width in pixels.
height
intThe height in pixels.
background
ColorBackground color of the plot.
ExportPng(string, int, int, Color)
Exports the image to a file (.png).
public void ExportPng(string path, int width = 800, int height = 600, Color background = default)
Parameters
path
stringPath o f the file.
width
intThe width in pixels.
height
intThe height in pixels.
background
ColorBackground color of the plot.
Exceptions
- ArgumentNullException
Throw when
path
is null.
ExportSvg(string, int, int)
Exports the image to a file (.png).
public void ExportSvg(string path, int width = 800, int height = 600)
Parameters
Exceptions
- ArgumentNullException
Throw when
path
is null.