Table of Contents

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

bool

CloseAllCommand

Gets the command to close all plot windows.

public ICommand CloseAllCommand { get; }

Property Value

ICommand

CloseCommand

Gets the command to close the window.

public ICommand CloseCommand { get; }

Property Value

ICommand

CopyImageCommand

Gets the command to copy the plot to the clipboard.

public ICommand CopyImageCommand { get; }

Property Value

ICommand

SaveImageCommand

Gets the command to save the plot as image.

public ICommand SaveImageCommand { get; }

Property Value

ICommand

Title

Gets or sets the title.

public string Title { get; set; }

Property Value

string

Waveforms

Gets the waveforms.

public IEnumerable<IWaveform> Waveforms { get; }

Property Value

IEnumerable<IWaveform>

XAxisZoomIsEnabled

Gets or sets a value indicating whether zoom of X axis is enabled.

public bool XAxisZoomIsEnabled { get; set; }

Property Value

bool

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 int

The width in pixels.

height int

The height in pixels.

background Color

Background 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 string

Path o f the file.

width int

The width in pixels.

height int

The height in pixels.

background Color

Background 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

path string

Path o f the file.

width int

The width of the plot.

height int

The height of the plot.

Exceptions

ArgumentNullException

Throw when path is null.