BaseGpsReceiverWpfExtensionsDrawCompassWithSkinToWpfCanvas(BaseGpsReceiver, Canvas, String, Int32) Method |
Draws a compass, using a custom skin to WPF canvas.
Namespace: ZylSoft.GpsAssembly: 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
)
<ExtensionAttribute>
Public Shared Sub DrawCompassWithSkinToWpfCanvas (
gpsReceiver As BaseGpsReceiver,
canvas As Canvas,
imagePath As String,
radius As Integer
)
Dim gpsReceiver As BaseGpsReceiver
Dim canvas As Canvas
Dim imagePath As String
Dim radius As Integer
gpsReceiver.DrawCompassWithSkinToWpfCanvas(canvas,
imagePath, radius)
public:
[ExtensionAttribute]
static void DrawCompassWithSkinToWpfCanvas(
BaseGpsReceiver^ gpsReceiver,
Canvas^ canvas,
String^ imagePath,
int radius
)
[<ExtensionAttribute>]
static member DrawCompassWithSkinToWpfCanvas :
gpsReceiver : BaseGpsReceiver *
canvas : Canvas *
imagePath : string *
radius : int -> unit
/** @attribute ExtensionAttribute */
public static void DrawCompassWithSkinToWpfCanvas(
BaseGpsReceiver gpsReceiver,
Canvas canvas,
String imagePath,
int radius
)
public static function DrawCompassWithSkinToWpfCanvas(
gpsReceiver : BaseGpsReceiver,
canvas : Canvas,
imagePath : String,
radius : int
)
ZylSoft.Gps.BaseGpsReceiverWpfExtensions.DrawCompassWithSkinToWpfCanvas = function(gpsReceiver, canvas, imagePath, radius);
STATIC METHOD DrawCompassWithSkinToWpfCanvas(
SELF gpsReceiver AS BaseGpsReceiver,
canvas AS Canvas,
imagePath AS STRING,
radius AS LONG
) AS VOID
No code example is currently available or this language may not be supported.
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