RSmithChart class
public sealed class RSmithChart : ControlThe interactive Smith chart.
Constructors
RSmithChart()The empty chart, with the impedance grid.
Properties
double Z0 { get; set; }The normalization impedance, ohm (50).
bool ShowImpedance { get; set; }Whether the impedance grid is drawn (true).
bool ShowAdmittance { get; set; }Whether the admittance grid is drawn (false).
double MaxGamma { get; set; }The largest |Γ| shown: 1 is the normal chart, 2 or more the expanded chart, where the resistance is negative outside |Γ| = 1.
List<RComplexSeries> Series { get; }The curves (one Γ per frequency).
List<RSmithMarker> Markers { get; }The points.
List<RSmithCircle> Circles { get; }The circles (VSWR, Q, stability, gain, noise).
bool MarkerValues { get; set; }Whether each marker writes Z and VSWR under its label (true).
bool ShowReading { get; set; }Whether the reading under the pointer is written (true).
double Zoom { get; }The magnification of the view (1: the whole chart).
Complex ViewCenter { get; }The Γ at the center of the view (0 for the whole chart).
CultureInfo Culture { get; set; }How the numbers are written (invariant: the point).
string BackgroundKey { get; set; }The theme resource of the background.
string GridKey { get; set; }The theme resource of the grid.
string InkKey { get; set; }The theme resource of the texts and of the outer circle.
double TextSize { get; set; }The size of the texts.
Complex? Under { get; }The Γ under the pointer, or null.
double Radius { get; }The radius of the circle |Γ| = 1 in pixels, with the zoom.
Methods
Point PixelOf(Complex gamma)The point of the control of a reflection coefficient.
Complex GammaAt(Point p)The reflection coefficient of a point of the control.
void ZoomAt(Point p, double factor)Zooms by a factor keeping the Γ at the given point where it is (the wheel does it at the pointer); the zoom stays from 1 to 50.
void ResetView()Shows the whole chart again.
void SavePng(string path, double widthCm = 12, double dpi = 300)Saves the chart as PNG, square, the given centimetres wide at the given dpi (RImage); the chart is then laid out again on the screen.
void Render(DrawingContext ctx)Draws background, grids, circles, curves, markers, legend and reading.
void Move(RSmithMarker m, Complex gamma)Brings a marker to the given Γ (inside |Γ| = MaxGamma) and tells MarkerMoved: what the mouse does, usable from code and tests.
Events
event Action<RSmithMarker> MarkerMovedA draggable marker has been moved.