Gets the interactive mode canvas.
public Canvas InteractiveModeCanvas {get;}
Public ReadOnly Property InteractiveModeCanvas As Canvas
public Canvas InteractiveModeCanvas {get;}
get_InteractiveModeCanvas();
The interactive mode canvas.
The current image will be drawn into the surface of this canvas. Owner draw can also be used to manually draw an image or any other shape on this canvas.
using Leadtools;
using Leadtools.Codecs;
using Leadtools.Controls;
void InteractiveModeCanvasExample()
{
// Our custom image will have 320 by 200 pixels
var width = 320;
var height = 200;
// Call viewer.set_imageSize with these values, this will set a new image in the viewer with 320 by 200 pixels. The back canvas will be created
_viewer.ImageSize = new Size(width, height);
// Get the InteractiveModeCanvas canvas
var canvas = _viewer.InteractiveModeCanvas;
// Fill with gradient
// Draw the edge in yellow
Rectangle rect = new Rectangle
{
Width = width,
Height = height,
Fill = new SolidColorBrush(Windows.UI.Color.FromArgb(255, 0, 0, 255)),
Stroke = new SolidColorBrush(Windows.UI.Color.FromArgb(255, 255, 255, 0)),
};
Canvas.SetLeft(rect, 0);
Canvas.SetTop(rect, 0);
TextBlock textBlock = new TextBlock();
textBlock.Text = "Custom image in the viewer";
textBlock.Width = width / 2;
textBlock.Height = height / 2;
textBlock.TextAlignment = TextAlignment.Center;
Canvas.SetLeft(textBlock, width / 4);
Canvas.SetTop(textBlock, height / 4);
canvas.Children.Add(rect);
canvas.Children.Add(textBlock);
}
Products |
Support |
Feedback: InteractiveModeCanvas Property - OLeadtools.Controls |
Introduction |
Help Version 19.0.2017.3.23
|
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.