alexa
menu

MAUI Toolkit

  • User Guide
  • Demos
  • Support

    Show / Hide Table of Contents

    Class SfInteractiveViewer

    Represents a control that enables users to interact with content through zooming and panning operations. The SfInteractiveViewer control can host any .NET MAUI view and provides an intuitive way to view, navigate, and explore content such as images, graphics, diagrams, and custom controls.

    Inheritance
    System.Object
    SfView
    SfInteractiveViewer
    Implements
    IDrawableLayout
    Microsoft.Maui.Graphics.IDrawable
    Microsoft.Maui.IAbsoluteLayout
    Microsoft.Maui.ILayout
    Microsoft.Maui.IView
    Microsoft.Maui.IElement
    Microsoft.Maui.ITransform
    Microsoft.Maui.IContainer
    System.Collections.Generic.IList<Microsoft.Maui.IView>
    System.Collections.Generic.ICollection<Microsoft.Maui.IView>
    System.Collections.Generic.IEnumerable<Microsoft.Maui.IView>
    System.Collections.IEnumerable
    Microsoft.Maui.ISafeAreaView
    Microsoft.Maui.IPadding
    Microsoft.Maui.ICrossPlatformLayout
    Microsoft.Maui.IVisualTreeElement
    Inherited Members
    SfView.Children
    SfView.ClipToBounds
    SfView.Padding
    SfView.PaddingProperty
    Namespace: Syncfusion.Maui.Toolkit.InteractiveViewer
    Assembly: Syncfusion.Maui.Toolkit.dll
    Syntax
    public class SfInteractiveViewer : SfView, IDrawableLayout, IDrawable, IAbsoluteLayout, ILayout, IView, IElement, ITransform, IContainer, IList<IView>, ICollection<IView>, IEnumerable<IView>, IEnumerable, ISafeAreaView, IPadding, ICrossPlatformLayout, IVisualTreeElement, ISemanticsProvider, IInteractiveViewerInfo, IInteractiveZoomInfo, IParentThemeElement, IThemeElement

    Constructors

    SfInteractiveViewer()

    Initializes a new instance of the SfInteractiveViewer class.

    Declaration
    public SfInteractiveViewer()

    Fields

    ContentProperty

    Identifies the Content bindable property.

    Declaration
    public static readonly BindableProperty ContentProperty
    Field Value
    Type Description
    Microsoft.Maui.Controls.BindableProperty

    The identifier for the Content bindable property.

    IsPanEnabledProperty

    Identifies the IsPanEnabled bindable property.

    Declaration
    public static readonly BindableProperty IsPanEnabledProperty
    Field Value
    Type Description
    Microsoft.Maui.Controls.BindableProperty

    The identifier for the IsPanEnabled bindable property.

    IsZoomEnabledProperty

    Identifies the IsZoomEnabled bindable property.

    Declaration
    public static readonly BindableProperty IsZoomEnabledProperty
    Field Value
    Type Description
    Microsoft.Maui.Controls.BindableProperty

    The identifier for the IsZoomEnabled bindable property.

    MaximumZoomFactorProperty

    Identifies the MaximumZoomFactor bindable property.

    Declaration
    public static readonly BindableProperty MaximumZoomFactorProperty
    Field Value
    Type Description
    Microsoft.Maui.Controls.BindableProperty

    The identifier for the MaximumZoomFactor bindable property.

    MinimumZoomFactorProperty

    Identifies the MinimumZoomFactor bindable property.

    Declaration
    public static readonly BindableProperty MinimumZoomFactorProperty
    Field Value
    Type Description
    Microsoft.Maui.Controls.BindableProperty

    The identifier for the MinimumZoomFactor bindable property.

    PanAxisProperty

    Identifies the PanAxis bindable property.

    Declaration
    public static readonly BindableProperty PanAxisProperty
    Field Value
    Type Description
    Microsoft.Maui.Controls.BindableProperty

    The identifier for the PanAxis bindable property.

    ZoomFactorProperty

    Identifies the ZoomFactor bindable property.

    Declaration
    public static readonly BindableProperty ZoomFactorProperty
    Field Value
    Type Description
    Microsoft.Maui.Controls.BindableProperty

    The identifier for the ZoomFactor bindable property.

    Properties

    Content

    Gets or sets the content displayed in the SfInteractiveViewer.

    Declaration
    public View Content { get; set; }
    Property Value
    Type Description
    Microsoft.Maui.Controls.View

    The default value of Content is null.

    See Also
    IsZoomEnabled
    IsPanEnabled

    IsPanEnabled

    Gets or sets a value indicating whether panning is enabled in the SfInteractiveViewer.

    Declaration
    public bool IsPanEnabled { get; set; }
    Property Value
    Type Description
    System.Boolean

    The default value of IsPanEnabled is true.

    See Also
    IsZoomEnabled
    PanAxis

    IsZoomEnabled

    Gets or sets a value indicating whether zooming is enabled in the SfInteractiveViewer.

    Declaration
    public bool IsZoomEnabled { get; set; }
    Property Value
    Type Description
    System.Boolean

    The default value of IsZoomEnabled is true.

    See Also
    MinimumZoomFactor
    MaximumZoomFactor

    MaximumZoomFactor

    Gets or sets the maximum zoom factor allowed in the SfInteractiveViewer.

    Declaration
    public double MaximumZoomFactor { get; set; }
    Property Value
    Type Description
    System.Double

    The default value of MaximumZoomFactor is 10d.

    Remarks

    This property is applicable only when IsZoomEnabled is set to true.

    See Also
    MinimumZoomFactor
    IsZoomEnabled

    MinimumZoomFactor

    Gets or sets the minimum zoom factor allowed in the SfInteractiveViewer.

    Declaration
    public double MinimumZoomFactor { get; set; }
    Property Value
    Type Description
    System.Double

    The default value of MinimumZoomFactor is 1d.

    Remarks

    This property is applicable only when IsZoomEnabled is set to true.

    See Also
    MaximumZoomFactor
    IsZoomEnabled

    PanAxis

    Gets or sets the axis in which panning is allowed in the SfInteractiveViewer.

    Declaration
    public PanAxis PanAxis { get; set; }
    Property Value
    Type Description
    PanAxis

    The default value of PanAxis is Both.

    Remarks

    This property is applicable only when IsPanEnabled is set to true.

    ZoomFactor

    Gets or sets the current zoom factor of the SfInteractiveViewer.

    Declaration
    public double ZoomFactor { get; set; }
    Property Value
    Type Description
    System.Double

    The default value of ZoomFactor is 1d.

    Remarks

    This property is applicable only when IsZoomEnabled is set to true.

    See Also
    MinimumZoomFactor
    MaximumZoomFactor
    IsZoomEnabled

    Methods

    OnHandlerChanged()

    Declaration
    protected override void OnHandlerChanged()
    Overrides
    Syncfusion.Maui.Toolkit.SfView.OnHandlerChanged()

    Reset()

    Method to reset the interactive viewer to its default state.

    Declaration
    public void Reset()
    Remarks

    Resets the content's zoom level, rotation, and pan position to their original values.

    Rotate()

    Method to rotate the content clockwise by 90 degrees.

    Declaration
    public void Rotate()
    Remarks

    This method applies a 90-degree clockwise rotation to the content displayed in the SfInteractiveViewer. Consecutive calls continue rotating the content in 90-degree increments.

    Events

    ScrollChanged

    Occurs when the pan position or zoom factor of the interactive viewer changes.

    Declaration
    public event EventHandler<InteractiveScrollChangedEventArgs> ScrollChanged
    Event Type
    Type
    System.EventHandler<InteractiveScrollChangedEventArgs>

    ZoomFactorChanged

    Occurs when the zoom factor of the interactive viewer changes.

    Declaration
    public event EventHandler<ZoomFactorChangedEventArgs> ZoomFactorChanged
    Event Type
    Type
    System.EventHandler<ZoomFactorChangedEventArgs>

    Implements

    IDrawableLayout
    Microsoft.Maui.Graphics.IDrawable
    Microsoft.Maui.IAbsoluteLayout
    Microsoft.Maui.ILayout
    Microsoft.Maui.IView
    Microsoft.Maui.IElement
    Microsoft.Maui.ITransform
    Microsoft.Maui.IContainer
    System.Collections.Generic.IList<>
    System.Collections.Generic.ICollection<>
    System.Collections.Generic.IEnumerable<>
    System.Collections.IEnumerable
    Microsoft.Maui.ISafeAreaView
    Microsoft.Maui.IPadding
    Microsoft.Maui.ICrossPlatformLayout
    Microsoft.Maui.IVisualTreeElement
    Back to top Generated by DocFX
    Copyright © 2001 - 2026 Syncfusion Inc. All Rights Reserved