←Select platform

Source Property (ImagePanViewer)

Summary

Gets or sets the image viewer currently assigned for panning process by the control.

Syntax

C#
VB
C++
public Leadtools.Windows.Controls.ImageViewer Source {get; set;}
Public Property Source As Leadtools.Windows.Controls.ImageViewer

Property Value

An ImageViewer or RasterImageViewer object which has the image to be panned using the ImagePanViewer control. Default value is null (Nothing in VB).

Remarks

This property contains the ImageViewer or RasterImageViewer object which contains the image to be panned using the ImagePanViewer control. Whenever the Source property is changed, the image displayed in the ImagePanViewer control is updated.

Example

For XAML example, refer to ImagePanViewer.

C#
VB
Silverlight C#
Silverlight VB
Imports Leadtools.Windows.Controls 
 
Public Class MyImagePanViewer : Inherits ImagePanViewer 
    '. 
    '. 
    '. 
    Protected Overrides Sub OnSourceChanged(ByVal e As RoutedPropertyChangedEventArgs(Of ImageViewer)) 
        MyBase.OnSourceChanged(e) 
        Console.WriteLine("OnSourceChanged is called") 
    End Sub 
 
    Protected Overrides Sub OnStrokeChanged(ByVal e As RoutedPropertyChangedEventArgs(Of Brush)) 
        MyBase.OnStrokeChanged(e) 
 
        Console.WriteLine("OnRectangleColorChanged is called") 
    End Sub 
 
    Protected Overrides Sub OnInnerBrushChanged(ByVal e As RoutedPropertyChangedEventArgs(Of Brush)) 
        MyBase.OnInnerBrushChanged(e) 
 
        Console.WriteLine("OnInnerBrushChanged is called") 
    End Sub 
 
    Protected Overrides Sub OnOuterBrushChanged(ByVal e As RoutedPropertyChangedEventArgs(Of Brush)) 
        MyBase.OnOuterBrushChanged(e) 
 
        Console.WriteLine("OnOuterBrushChanged is called") 
    End Sub 
 
    Protected Overrides Sub OnRender(ByVal drawingContext As DrawingContext) 
        MyBase.OnRender(drawingContext) 
 
        Console.WriteLine("OnRender is called") 
    End Sub 
 
    Protected Overrides Sub OnMouseLeftButtonDown(ByVal e As MouseButtonEventArgs) 
        MyBase.OnMouseLeftButtonDown(e) 
 
        Console.WriteLine("OnMouseLeftButtonDown is called") 
    End Sub 
 
    Protected Overrides Sub OnMouseMove(ByVal e As MouseEventArgs) 
        MyBase.OnMouseMove(e) 
 
        Console.WriteLine("OnMouseMove is called") 
    End Sub 
 
    Protected Overrides Sub OnMouseLeftButtonUp(ByVal e As MouseButtonEventArgs) 
        MyBase.OnMouseLeftButtonUp(e) 
 
        Console.WriteLine("OnMouseLeftButtonUp is called") 
    End Sub 
End Class 
using Leadtools.Help; 
using Leadtools.Windows.Controls; 
 
public class MyImagePanViewer : ImagePanViewer 
{ 
   //. 
   //. 
   //. 
   protected override void OnSourceChanged(RoutedPropertyChangedEventArgs<ImageViewer> e) 
   { 
      base.OnSourceChanged(e); 
      Console.WriteLine("OnSourceChanged is called"); 
   } 
 
   protected override void OnStrokeChanged(RoutedPropertyChangedEventArgs<Brush> e) 
   { 
      base.OnStrokeChanged(e); 
 
      Console.WriteLine("OnRectangleColorChanged is called"); 
   } 
 
   protected override void OnInnerBrushChanged(RoutedPropertyChangedEventArgs<Brush> e) 
   { 
      base.OnInnerBrushChanged(e); 
 
      Console.WriteLine("OnInnerBrushChanged is called"); 
   } 
 
   protected override void OnOuterBrushChanged(RoutedPropertyChangedEventArgs<Brush> e) 
   { 
      base.OnOuterBrushChanged(e); 
 
      Console.WriteLine("OnOuterBrushChanged is called"); 
   } 
 
   protected override void  OnRender(DrawingContext drawingContext) 
   { 
       base.OnRender(drawingContext); 
 
      Console.WriteLine("OnRender is called"); 
   } 
 
   protected override void  OnMouseLeftButtonDown(MouseButtonEventArgs e) 
   { 
       base.OnMouseLeftButtonDown(e); 
 
      Console.WriteLine("OnMouseLeftButtonDown is called"); 
   } 
 
   protected override void OnMouseMove(MouseEventArgs e) 
   { 
      base.OnMouseMove(e); 
 
      Console.WriteLine("OnMouseMove is called"); 
   } 
 
   protected override void  OnMouseLeftButtonUp(MouseButtonEventArgs e) 
   { 
      base.OnMouseLeftButtonUp(e); 
 
      Console.WriteLine("OnMouseLeftButtonUp is called"); 
   } 
} 
using Leadtools.Help; 
using Leadtools.Windows.Controls; 
 
public class MyImagePanViewer : ImagePanViewer 
{ 
   //. 
   //. 
   //. 
   protected override void OnSourceChanged(RoutedPropertyChangedEventArgs<ImageViewer> e) 
   { 
      base.OnSourceChanged(e); 
      Console.WriteLine("OnSourceChanged is called"); 
   } 
 
   protected override void OnStrokeChanged(RoutedPropertyChangedEventArgs<Brush> e) 
   { 
      base.OnStrokeChanged(e); 
 
      Console.WriteLine("OnRectangleColorChanged is called"); 
   } 
 
   protected override void OnInnerBrushChanged(RoutedPropertyChangedEventArgs<Brush> e) 
   { 
      base.OnInnerBrushChanged(e); 
 
      Console.WriteLine("OnInnerBrushChanged is called"); 
   } 
 
   protected override void OnOuterBrushChanged(RoutedPropertyChangedEventArgs<Brush> e) 
   { 
      base.OnOuterBrushChanged(e); 
 
      Console.WriteLine("OnOuterBrushChanged is called"); 
   } 
 
   protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e) 
   { 
      base.OnMouseLeftButtonDown(e); 
 
      Console.WriteLine("OnMouseLeftButtonDown is called"); 
   } 
 
   protected override void OnMouseMove(MouseEventArgs e) 
   { 
      base.OnMouseMove(e); 
 
      Console.WriteLine("OnMouseMove is called"); 
   } 
 
   protected override void OnMouseLeftButtonUp(MouseButtonEventArgs e) 
   { 
      base.OnMouseLeftButtonUp(e); 
 
      Console.WriteLine("OnMouseLeftButtonUp is called"); 
   } 
} 
Imports Leadtools.Windows.Controls 
 
Public Class MyImagePanViewer : Inherits ImagePanViewer 
   '. 
   '. 
   '. 
   Protected Overrides Sub OnSourceChanged(ByVal e As RoutedPropertyChangedEventArgs(Of ImageViewer)) 
      MyBase.OnSourceChanged(e) 
      Console.WriteLine("OnSourceChanged is called") 
   End Sub 
 
   Protected Overrides Sub OnStrokeChanged(ByVal e As RoutedPropertyChangedEventArgs(Of Brush)) 
      MyBase.OnStrokeChanged(e) 
 
      Console.WriteLine("OnRectangleColorChanged is called") 
   End Sub 
 
   Protected Overrides Sub OnInnerBrushChanged(ByVal e As RoutedPropertyChangedEventArgs(Of Brush)) 
      MyBase.OnInnerBrushChanged(e) 
 
      Console.WriteLine("OnInnerBrushChanged is called") 
   End Sub 
 
   Protected Overrides Sub OnOuterBrushChanged(ByVal e As RoutedPropertyChangedEventArgs(Of Brush)) 
      MyBase.OnOuterBrushChanged(e) 
 
      Console.WriteLine("OnOuterBrushChanged is called") 
   End Sub 
 
   Protected Overrides Sub OnMouseLeftButtonDown(ByVal e As MouseButtonEventArgs) 
      MyBase.OnMouseLeftButtonDown(e) 
 
      Console.WriteLine("OnMouseLeftButtonDown is called") 
   End Sub 
 
   Protected Overrides Sub OnMouseMove(ByVal e As MouseEventArgs) 
      MyBase.OnMouseMove(e) 
 
      Console.WriteLine("OnMouseMove is called") 
   End Sub 
 
   Protected Overrides Sub OnMouseLeftButtonUp(ByVal e As MouseButtonEventArgs) 
      MyBase.OnMouseLeftButtonUp(e) 
 
      Console.WriteLine("OnMouseLeftButtonUp is called") 
   End Sub 
End Class 

Requirements

Target Platforms

Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.
Leadtools.Windows.Controls Assembly
Click or drag to resize