C#
VB
WinRT C#
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 pixelsvar 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 canvasvar canvas = _viewer.InteractiveModeCanvas;// Fill with gradient// Draw the edge in yellowRectangle 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);}
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
