skip navigation
  • Product Bundles

    DevCraft

    All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:

    • AI Coding Assistants
    • Embedded Reporting
    • Document Processing Libraries
    • SSO Account Sign-in

    Web

    Kendo UI UI for Angular UI for Vue UI for jQuery KendoReact UI for Blazor UI for ASP.NET Core UI for ASP.NET MVC UI for ASP.NET AJAX

    Mobile

    UI for .NET MAUI

    Document Management

    Telerik Document Processing

    Desktop

    UI for .NET MAUI UI for WinUI UI for WinForms UI for WPF

    Reporting

    Telerik Reporting Telerik Report Server

    Testing & Mocking

    Test Studio Telerik JustMock

    CMS

    Sitefinity

    AI Productivity Tools

    AI Coding Assistants

    UI/UX Tools

    ThemeBuilder Design System Kit Templates and Building Blocks

    Debugging

    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Everywhere Reporter FiddlerCore

    Free Tools

    KendoReact Free VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
    • What's New
    • Roadmap
    • Release History
  • Support and Learning

    • Support and Learning Hub
    • First Steps
    • Docs
    • Demos
    • Virtual Classroom
    • Forums
    • Videos
    • Blogs
    • Accessibility
    • Submit a Ticket

    Productivity and Design Tools

    • Visual Studio Extensions
    • Visual Studio Templates
    • Embedded Reporting
  • Pricing
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Downloads
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now

Class RadPictureBox

A control that displays raster or vector images with advanced features including zooming, panning, and image editing capabilities.

Inheritance
System.Object
RadControl
RadPictureBox
Inherited Members
RadControl.isResizing2
RadControl.isDisposing2
RadControl.invalidResizeRect
RadControl.isAccessibilityRequested
RadControl.Dispose(Boolean)
RadControl.Construct()
RadControl.CreateBehavior()
RadControl.CreateRootElement()
RadControl.InitializeRootElement(RootRadElement)
RadControl.LoadElementTree()
RadControl.LoadElementTree(Size)
RadControl.SetIsInitializing(Boolean)
RadControl.ShouldSerializeBackColor()
RadControl.SetBackColorThemeOverrides()
RadControl.ResetBackColorThemeOverrides()
RadControl.ShouldSerializeForeColor()
RadControl.SetForeColorThemeOverrides()
RadControl.ResetForeColorThemeOverrides()
RadControl.ShouldSerializeFont()
RadControl.OnKeyDown(KeyEventArgs)
RadControl.OnKeyUp(KeyEventArgs)
RadControl.OnPreviewKeyDown(PreviewKeyDownEventArgs)
RadControl.OnKeyPress(KeyPressEventArgs)
RadControl.OnClick(EventArgs)
RadControl.OnDoubleClick(EventArgs)
RadControl.OnMouseDown(MouseEventArgs)
RadControl.OnMouseUp(MouseEventArgs)
RadControl.OnMouseEnter(EventArgs)
RadControl.OnMouseLeave(EventArgs)
RadControl.OnMouseMove(MouseEventArgs)
RadControl.OnMouseHover(EventArgs)
RadControl.OnMouseWheel(MouseEventArgs)
RadControl.OnMouseCaptureChanged(EventArgs)
RadControl.OnGotFocus(EventArgs)
RadControl.OnLostFocus(EventArgs)
RadControl.OnCreateControl()
RadControl.OnHandleDestroyed(EventArgs)
RadControl.OnParentChanged(EventArgs)
RadControl.OnVisibleChanged(EventArgs)
RadControl.OnFontChanged(EventArgs)
RadControl.OnForeColorChanged(EventArgs)
RadControl.OnBackColorChanged(EventArgs)
RadControl.OnEnabledChanged(EventArgs)
RadControl.OnBindingContextChanged(EventArgs)
RadControl.OnLocationChanged(EventArgs)
RadControl.OnPaddingChanged(EventArgs)
RadControl.OnRightToLeftChanged(EventArgs)
RadControl.OnPaint(PaintEventArgs)
RadControl.OnLayout(LayoutEventArgs)
RadControl.OnAutoSizeChanged(EventArgs)
RadControl.WndProc(Message)
RadControl.OnInvalidated(RadElement)
RadControl.OnCaptureLosing()
RadControl.OnThemeChanged()
RadControl.OnToolTipTextNeeded(Object, ToolTipTextNeededEventArgs)
RadControl.OnScreenTipNeeded(Object, ScreenTipNeededEventArgs)
RadControl.OnThemeNameChanged(ThemeNameChangedEventArgs)
RadControl.ProcessMnemonic(Char)
RadControl.ProcessFocusRequested(RadElement)
RadControl.ProcessCaptureChangeRequested(RadElement, Boolean)
RadControl.ProcessAutoSizeChanged(Boolean)
RadControl.CallOnMouseCaptureChanged(EventArgs)
RadControl.CallBaseOnGotFocus(EventArgs)
RadControl.CallBaseOnLostFocus(EventArgs)
RadControl.CallOnToolTipTextNeeded(Object, ToolTipTextNeededEventArgs)
RadControl.CallOnScreenTipNeeded(Object, ScreenTipNeededEventArgs)
RadControl.CallOnMouseUp(MouseEventArgs)
RadControl.CallOnMouseDown(MouseEventArgs)
RadControl.CallOnClick(EventArgs)
RadControl.CallOnDoubleClick(EventArgs)
RadControl.CallOnMouseEnter(EventArgs)
RadControl.CallOnMouseWheel(MouseEventArgs)
RadControl.CallOnMouseLeave(EventArgs)
RadControl.CallOnMouseMove(MouseEventArgs)
RadControl.CallOnMouseHover(EventArgs)
RadControl.CallOnPreviewKeyDown(PreviewKeyDownEventArgs)
RadControl.CallBaseOnKeyDown(KeyEventArgs)
RadControl.CallOnKeyDown(KeyEventArgs)
RadControl.CallBaseOnKeyPress(KeyPressEventArgs)
RadControl.CallOnKeyPress(KeyPressEventArgs)
RadControl.IsInputKey(Keys)
RadControl.GetInputElement()
RadControl.CallBaseOnKeyUp(KeyEventArgs)
RadControl.CallOnKeyUp(KeyEventArgs)
RadControl.CallOnThemeNameChanged(ThemeNameChangedEventArgs)
RadControl.CallOnVisibleChanged(EventArgs)
RadControl.BeginInit()
RadControl.EndInit()
RadControl.OnNotifyPropertyChanged(String)
RadControl.OnNotifyPropertyChanged(PropertyChangedEventArgs)
RadControl.IComponentTreeHandler.GetShowFocusCues()
RadControl.IComponentTreeHandler.CreateRootElement()
RadControl.IComponentTreeHandler.CreateChildItems(RadElement)
RadControl.IComponentTreeHandler.InitializeRootElement(RootRadElement)
RadControl.IComponentTreeHandler.InvalidateElement(RadElement)
RadControl.IComponentTreeHandler.InvalidateElement(RadElement, Rectangle)
RadControl.IComponentTreeHandler.InvalidateIfNotSuspended()
RadControl.IComponentTreeHandler.GetAmbientPropertyValue(RadProperty)
RadControl.IComponentTreeHandler.ControlThemeChangedCallback()
RadControl.IComponentTreeHandler.OnAmbientPropertyChanged(RadProperty)
RadControl.IComponentTreeHandler.OnFocusRequested(RadElement)
RadControl.IComponentTreeHandler.OnCaptureChangeRequested(RadElement, Boolean)
RadControl.IComponentTreeHandler.OnDisplayPropertyChanged(RadPropertyChangedEventArgs)
RadControl.IComponentTreeHandler.CallOnThemeNameChanged(ThemeNameChangedEventArgs)
RadControl.IComponentTreeHandler.CallOnMouseCaptureChanged(EventArgs)
RadControl.IComponentTreeHandler.CallOnToolTipTextNeeded(Object, ToolTipTextNeededEventArgs)
RadControl.IComponentTreeHandler.CallOnScreenTipNeeded(Object, ScreenTipNeededEventArgs)
RadControl.GetPreferredSize(Size)
RadControl.SetBoundsCore(Int32, Int32, Int32, Int32, BoundsSpecified)
RadControl.GetRootElementDesiredSize(Int32, Int32, Int32, Int32)
RadControl.OnZoomGesture(ZoomGestureEventArgs)
RadControl.OnRotateGesture(RotateGestureEventArgs)
RadControl.OnPanGesture(PanGestureEventArgs)
RadControl.OnTwoFingerTapGesture(GestureEventArgs)
RadControl.OnPressAndTapGesture(PressAndTapGestureEventArgs)
RadControl.OnGesture(GestureEventArgs)
RadControl.ProcessGesture(Message)
RadControl.EnableGesture(GestureType)
RadControl.DisableGesture(GestureType)
RadControl.Refresh()
RadControl.SuspendUpdate()
RadControl.ResumeUpdate()
RadControl.ResumeUpdate(Boolean)
RadControl.InvokeLayoutCallback(LayoutCallback)
RadControl.RegisterHostedControl(RadHostItem)
RadControl.UnregisterHostedControl(RadHostItem, Boolean)
RadControl.ControlDefinesThemeForElement(RadElement)
RadControl.ResolveStyleGroupForElement(StyleGroup, RadObject)
RadControl.GetPlainText()
RadControl.CanEditUIElement(RadElement)
RadControl.GetChildAt(Int32)
RadControl.ShouldSerializeProperty(RadProperty)
RadControl.ShouldSerializeProperty(RadProperty, RadObject)
RadControl.ResetProperty(RadProperty, RadObject)
RadControl.CanEditElementAtDesignTime(RadElement)
RadControl.GetControlDefaultSize()
RadControl.GetDpiScaledSize(Size)
RadControl.GetDpiScaledSize(SizeF)
RadControl.ProcessCodedUIMessage(IPCMessage)
RadControl.FindPropertyInChildren(RadControl, IPCMessage)
RadControl.CallAccessibilityNotifyClients(AccessibleEvents, Int32)
RadControl.IPCHost.ProcessMessage(IPCMessage)
RadControl.ScaleControl(SizeF, BoundsSpecified)
RadControl.PerformRadAutoScale(Nullable<BoundsSpecified>)
RadControl.SetRadAutoScale(Boolean)
RadControl.IComponentTreeHandler.get_Name()
RadControl.IComponentTreeHandler.set_Name(String)
RadControl.EnableDpiScaling
RadControl.EnableRadAutoScale
RadControl.EnableRadFormInitialDpiScaling
RadControl.EnableImageDpiScaling
RadControl.EnableSvgImages
RadControl.IsTrial
RadControl.IsLoaded
RadControl.LayoutManager
RadControl.ElementTree
RadControl.UseCompatibleTextRenderingDefaultValue
RadControl.Behavior
RadControl.RootElement
RadControl.Padding
RadControl.ThemeName
RadControl.EnableTheming
RadControl.ThemeClassName
RadControl.ImageList
RadControl.ImageScalingSize
RadControl.UseCompatibleTextRendering
RadControl.AutoSize
RadControl.MaximumSize
RadControl.MinimumSize
RadControl.Focusable
RadControl.Site
RadControl.CausesValidation
RadControl.IsInitializing
RadControl.SmallImageList
RadControl.SmallImageScalingSize
RadControl.IsDesignMode
RadControl.IsDisplayed
RadControl.FocusedElement
RadControl.AllowShowFocusCues
RadControl.ShowItemToolTips
RadControl.CommandBindings
RadControl.EnableKeyMap
RadControl.BackColor
RadControl.ForeColor
RadControl.Font
RadControl.ValidationCancel
RadControl.IComponentTreeHandler.IsDesignMode
RadControl.IComponentTreeHandler.ElementTree
RadControl.IComponentTreeHandler.Behavior
RadControl.IComponentTreeHandler.Initializing
RadControl.IComponentTreeHandler.ThemeClassName
RadControl.EnableGestures
RadControl.EnableAnalytics
RadControl.AnalyticsName
RadControl.EnableRadAccessibilityObjects
RadControl.AccessibilityRequested
RadControl.EnableCodedUITests
RadControl.EnableCodedUITestsDefaultValue
RadControl.EnableUIAutomation
RadControl.EnableUIAutomationDefaultValue
RadControl.IPCHost.Context
RadControl.ElementInvalidated
RadControl.ToolTipTextNeeded
RadControl.ScreenTipNeeded
RadControl.ThemeNameChanged
RadControl.Initialized
RadControl.PropertyChanged
RadControl.ZoomGesture
RadControl.RotateGesture
RadControl.PanGesture
RadControl.TwoFingerTapGesture
RadControl.PressAndTapGesture
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.UI.dll

Syntax

[TelerikToolboxCategory("Editors")]
public class RadPictureBox : RadControl, INotifyPropertyChanged, ISupportInitializeNotification, ISupportInitialize, IComponentTreeHandler, ILayoutHandler, IPCHost, IAnalyticsProvider

Constructors

RadPictureBox()

Initializes a new instance of the RadPictureBox class.

Declaration
public RadPictureBox()

Properties

AllowPanelAnimations

Gets or sets a value indicating whether to show animations when showing and hiding panels. Note that animations are applied only when PanelDisplayMode is set to OnMouseHover.

Declaration
public bool AllowPanelAnimations { get; set; }
Property Value
System.Boolean

BottomPanel

Gets the bottom panel element. This panel allows adding buttons label and other elements in three collections - left, center and right items.

Declaration
public PictureBoxHorizontalPanelElement BottomPanel { get; }
Property Value
PictureBoxHorizontalPanelElement

ContextMenuDropDown

Gets the context menu.

Declaration
public RadContextMenuDropDown ContextMenuDropDown { get; }
Property Value
RadContextMenuDropDown

ContextMenuEnabled

Gets or sets a value indicating whether to display context menu on right mouse click.

Declaration
public bool ContextMenuEnabled { get; set; }
Property Value
System.Boolean

ContextMenuProperties

Gets the context menu related properties.

Declaration
public PictureBoxContextMenuProperties ContextMenuProperties { get; }
Property Value
PictureBoxContextMenuProperties

DefaultImage

Gets or sets the raster image which is displayed when the Image and SvgImage properties are not specified.

Declaration
public Image DefaultImage { get; set; }
Property Value
System.Drawing.Image

DefaultSize

Gets the default size of the RadPictureBox when a new instance is initialized.

Declaration
protected override Size DefaultSize { get; }
Property Value
System.Drawing.Size

DefaultSvgImage

Gets or sets the vector (SVG) image displayed when no main image is specified.

Declaration
public RadSvgImage DefaultSvgImage { get; set; }
Property Value
RadSvgImage

The default RadSvgImage to display, or null if no default SVG image is set.

DefaultSvgImageXml

This property is not relevant for this class.

Declaration
public string DefaultSvgImageXml { get; set; }
Property Value
System.String

DefaultText

Gets or sets the text which is displayed when the Image and SvgImage properties are not specified.

Declaration
public string DefaultText { get; set; }
Property Value
System.String

Image

Gets or sets the raster image displayed in the control. Note: If both Image and SvgImage have values, the SvgImage will be displayed with higher precedence.

Declaration
public Image Image { get; set; }
Property Value
System.Drawing.Image

The System.Drawing.Image to display, or null if no image is set.

ImageAlignment

Gets or sets the alignment of the image on the drawing surface. Default is TopLeft. Note that this property is respected only when the ImageLayout is set to None.

Declaration
public ContentAlignment ImageAlignment { get; set; }
Property Value
System.Drawing.ContentAlignment

ImageEditorDialog

Gets or sets the dialog responsible for image editing.

Declaration
public PictureBoxImageEditorDialog ImageEditorDialog { get; set; }
Property Value
PictureBoxImageEditorDialog

ImageLayout

Specifies how the image is positioned on the control.

Declaration
public RadImageLayout ImageLayout { get; set; }
Property Value
RadImageLayout

LeftPanel

Gets the left panel element. This panel allows adding buttons label and other elements in three collections - top, center and bottom items.

Declaration
public PictureBoxVerticalPanelElement LeftPanel { get; }
Property Value
PictureBoxVerticalPanelElement

PanelDisplayMode

Gets or sets a value indicating how the panels are displayed. The possible options are: always or on mouse hover.

Declaration
public PictureBoxPanelDisplayMode PanelDisplayMode { get; set; }
Property Value
PictureBoxPanelDisplayMode

PanelOverflowMode

Gets or sets a value indicating how the panels are positioned.

Declaration
public PictureBoxPanelOverflowMode PanelOverflowMode { get; set; }
Property Value
PictureBoxPanelOverflowMode

PictureBoxElement

Gets the main element of the picture box control.

Declaration
public RadPictureBoxElement PictureBoxElement { get; }
Property Value
RadPictureBoxElement

The RadPictureBoxElement that contains the picture box functionality.

ReadOnly

Determines if users can only view the image with no interaction: zoom and context menu are not available when read only is true.

Declaration
public bool ReadOnly { get; set; }
Property Value
System.Boolean

RightPanel

Gets the right panel element. This panel allows adding buttons label and other elements in three collections - top, center and bottom items.

Declaration
public PictureBoxVerticalPanelElement RightPanel { get; }
Property Value
PictureBoxVerticalPanelElement

ShowBackground

Gets or sets a value indicating whether to display control background(fill).

Declaration
public bool ShowBackground { get; set; }
Property Value
System.Boolean

ShowBorder

Gets or sets a value indicating whether to display control border.

Declaration
public bool ShowBorder { get; set; }
Property Value
System.Boolean

ShowScrollBars

Gets or sets a value indicating whether to display scrollbars when the displayed image is larger than the control, or when the user zooms-in and the zoomed image size exceeds the size of the control.

Declaration
public bool ShowScrollBars { get; set; }
Property Value
System.Boolean

SvgImage

Gets or sets the vector (SVG) image displayed in the control. Note: If both Image and SvgImage have values, the SvgImage will be displayed with higher precedence.

Declaration
public RadSvgImage SvgImage { get; set; }
Property Value
RadSvgImage

The RadSvgImage to display, or null if no SVG image is set.

SvgImageXml

This property is not relevant for this class.

Declaration
public string SvgImageXml { get; set; }
Property Value
System.String

Text

This property is not relevant for this class.

Declaration
public override string Text { get; set; }
Property Value
System.String

Overrides
RadControl.Text

TopPanel

Gets the top panel element. This panel allows adding buttons label and other elements in three collections - left, center and right items.

Declaration
public PictureBoxHorizontalPanelElement TopPanel { get; }
Property Value
PictureBoxHorizontalPanelElement

ZoomProperties

Gets the properties responsible for the zoom operations.

Declaration
public PictureBoxZoomProperties ZoomProperties { get; }
Property Value
PictureBoxZoomProperties

Methods

ClearImage()

Removes the image and/or svg image.

Declaration
public void ClearImage()

CopyImage()

Copies the displayed image into the clipboard.

Declaration
public void CopyImage()

CreateChildItems(RadElement)

Creates the child elements by instantiating and adding the main picture box element.

Declaration
protected override void CreateChildItems(RadElement parent)
Parameters
RadElement parent

The parent RadElement to which child elements will be added.

Overrides
RadControl.CreateChildItems(RadElement)

CreateImageEditorElement()

This method is not relevant for this class.

Declaration
[Obsolete("Use CreatePictureBoxElement method instead.")]
protected virtual RadPictureBoxElement CreateImageEditorElement()
Returns
RadPictureBoxElement

A new instance of RadPictureBoxElement.

CreatePictureBoxElement()

Creates a new instance of the RadPictureBoxElement class used as main element.

Declaration
protected virtual RadPictureBoxElement CreatePictureBoxElement()
Returns
RadPictureBoxElement

A new instance of RadPictureBoxElement.

CutImage()

Copies the displayed image into the clipboard and clears the displayed image.

Declaration
public void CutImage()

LoadImage()

Opens an OpenFileDialog which allows the user to choose an image.

Declaration
public void LoadImage()

OnLoad(Size)

Handles the Load event by enabling gesture support for pan and zoom operations.

Declaration
protected override void OnLoad(Size desiredSize)
Parameters
System.Drawing.Size desiredSize

The desired size for the control.

Overrides
RadControl.OnLoad(Size)

PasteImage()

Pastes an image from the clipboard.

Declaration
public void PasteImage()

SaveImage()

Opens a SaveFileDialog which allows the user to save the displayed image.

Declaration
public void SaveImage()

Events

ContextMenuClosed

Occurs when the context menu is closed.

Declaration
public event EventHandler ContextMenuClosed
Event Type
System.EventHandler

ContextMenuClosing

Occurs when the context menu is closing.

Declaration
public event CancelEventHandler ContextMenuClosing
Event Type
System.ComponentModel.CancelEventHandler

ContextMenuItemClick

Occurs when an item in the context menu is clicked.

Declaration
public event HandledEventHandler ContextMenuItemClick
Event Type
System.ComponentModel.HandledEventHandler

ContextMenuOpened

Occurs when the context menu is opened.

Declaration
public event EventHandler ContextMenuOpened
Event Type
System.EventHandler

ContextMenuOpening

Occurs when the context menu is opening.

Declaration
public event CancelEventHandler ContextMenuOpening
Event Type
System.ComponentModel.CancelEventHandler

ImageEdited

Occurs when the image has been edited by the ImageEditorDialog and the user has accepted the changes. Can be handled. Note that this event fill be fired always when the user clicks the OK button of the dialog, even if there are no changes in the image.

Declaration
public event PictureBoxImageEditedEventHandler ImageEdited
Event Type
PictureBoxImageEditedEventHandler

ImageEditorOpening

Occurs when the image is about to be edited in the ImageEditorDialog. Cancellable.

Declaration
public event PictureBoxImageEditorOpeningEventHandler ImageEditorOpening
Event Type
PictureBoxImageEditorOpeningEventHandler

ImageLoaded

Occurs when a raster or vector(SVG) image has been loaded by the user.

Declaration
public event EventHandler ImageLoaded
Event Type
System.EventHandler

ImageSaved

Occurs when the displayed image has been saved by the user.

Declaration
public event EventHandler ImageSaved
Event Type
System.EventHandler

PanChanged

Occurs when the PositionOffset property of PictureBoxCanvasElement is changed.

Declaration
public event EventHandler PanChanged
Event Type
System.EventHandler

ZoomChanged

Occurs when the ZoomFactor has changed.

Declaration
public event EventHandler ZoomChanged
Event Type
System.EventHandler

Extension Methods

SvgExtentions.Traverse<T>(T, Func<T, IEnumerable<T>>)
SvgExtentions.TraverseDepthFirst<T>(T, Func<T, IEnumerable<T>>)
Getting Started
  • Install Now
  • Demos
  • Step-by-Step Tutorial
  • Sample Applications
  • SDK Samples
  • Visual Studio Extensions
Support Resources
  • Code Library
  • Knowledge Base
  • Videos
Community
  • Forums
  • Blogs
  • Feedback Portal
  • Document Processing Feedback Portal

Copyright © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.