Click or drag to resize

BaseGpsReceiverWpfExtensionsDrawCompassWithSkinToWpfCanvas(BaseGpsReceiver, Canvas, String, Int32) Method

Draws a compass, using a custom skin 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 DrawCompassWithSkinToWpfCanvas(
	this BaseGpsReceiver gpsReceiver,
	Canvas canvas,
	string imagePath,
	int radius
)

Parameters

gpsReceiver  BaseGpsReceiver
this
canvas  Canvas
WPF canvas.
imagePath  String
Path of the compass skin (image).
radius  Int32
Radius of the compass.

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.DrawCompassWithSkin(e.Graphics, "c:\compass.png", Math.Min(pictureBox.Width, pictureBox.Height)/2);
See Also