Click or drag to resize

BaseGpsReceiverWpfExtensionsDrawCompassToWpfCanvas Method

Draws a compass to WPF canvas.

Namespace: ZylSoft.Gps
Assembly: ZylGpsReceiver (in ZylGpsReceiver.dll) Version: 3.28.8737.22596
XMLNS for XAML: Not mapped to an xmlns.
Syntax
public static void DrawCompassToWpfCanvas(
	this BaseGpsReceiver gpsReceiver,
	Canvas canvas,
	int radius,
	Color backColor,
	Color foreColor
)

Parameters

gpsReceiver  BaseGpsReceiver
this
canvas  Canvas
WPF canvas.
radius  Int32
Radius of the compass.
backColor  Color
Back color.
foreColor  Color
Fore color.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type BaseGpsReceiver. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Example
Put a PictureBox control on your form. In the Draw event of the PictureBox use the following code: gpsReceiver.DrawCompass(e.Graphics, Math.Min(pictureBox.Width, pictureBox.Height)/2, Color.Black, Color.White);
See Also