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 RadFormBehavior

A standard behavior for RadForm.

Inheritance
System.Object
FormControlBehavior
ThemedFormBehavior
RadFormBehavior
Inherited Members
ThemedFormBehavior.GetMappedWindowPoint(Point)
ThemedFormBehavior.GetMaximumFormHeightAccordingToCurrentScreen()
ThemedFormBehavior.RefreshNC()
ThemedFormBehavior.InvalidateNC(Rectangle)
ThemedFormBehavior.OnGetMinMaxInfo(MinMaxInfo)
ThemedFormBehavior.OnNCPaint(Graphics)
ThemedFormBehavior.PaintElement(IGraphics, Rectangle, VisualElement)
ThemedFormBehavior.IsMaximized
ThemedFormBehavior.IsMinimized
ThemedFormBehavior.IsNormal
ThemedFormBehavior.CurrentFormState
ThemedFormBehavior.IsMdiChildMaximized
ThemedFormBehavior.FormMdiClient
ThemedFormBehavior.IsMenuInForm
ThemedFormBehavior.MainMenuInForm
ThemedFormBehavior.MaximizedMDIChild
ThemedFormBehavior.TopResizeFrame
ThemedFormBehavior.TopLeftResizeFrame
ThemedFormBehavior.LeftResizeFrame
ThemedFormBehavior.BottomLeftResizeFrame
ThemedFormBehavior.BottomResizeFrame
ThemedFormBehavior.BottomRightResizeFrame
ThemedFormBehavior.RightResizeFrame
ThemedFormBehavior.TopRightResizeFrame
ThemedFormBehavior.CaptionFrame
ThemedFormBehavior.LeftBorderFrame
ThemedFormBehavior.BottomBorderFrame
ThemedFormBehavior.RightBorderFrame
ThemedFormBehavior.ClientFrame
ThemedFormBehavior.CurrentFormParams
ThemedFormBehavior.Form
FormControlBehavior.targetHandler
FormControlBehavior.FormHandleCreated()
FormControlBehavior.CallBaseWndProc(Message)
FormControlBehavior.CallDefWndProc(Message)
FormControlBehavior.OnAssociatedFormPaint(PaintEventArgs)
FormControlBehavior.OnAssociatedFormPaintBackground(PaintEventArgs)
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.UI.dll

Syntax

public class RadFormBehavior : ThemedFormBehavior

Constructors

RadFormBehavior()

Creates an instance of the RadFormBehavior class. This instance has no Form associated with it.

Declaration
public RadFormBehavior()

RadFormBehavior(IComponentTreeHandler)

Creates an instance of the RadFormBehavior class.

Declaration
public RadFormBehavior(IComponentTreeHandler treeHandler)
Parameters
IComponentTreeHandler treeHandler

An IComponentTreeHandler instance.

RadFormBehavior(IComponentTreeHandler, Boolean)

Creates an instance of the RadFormBehavior class.

Declaration
public RadFormBehavior(IComponentTreeHandler treeHandler, bool shouldCreateChildren)
Parameters
IComponentTreeHandler treeHandler

An IComponentTreeHandler instance.

System.Boolean shouldCreateChildren

A flag that determines whether the CreateChildItems call is rerouted to the behavior.

Properties

AllowTheming

Gets or sets a boolean value indicating whether the behavior paints in the NC area of the Form when OS is Vista or later and Composition is enabled.

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

Overrides
ThemedFormBehavior.AllowTheming

BorderWidth

Gets the Border width of the Form.

Declaration
public override Padding BorderWidth { get; }
Property Value
System.Windows.Forms.Padding

Overrides
FormControlBehavior.BorderWidth

CaptionHeight

Gets the Caption Height of the Form.

Declaration
public override int CaptionHeight { get; }
Property Value
System.Int32

Overrides
FormControlBehavior.CaptionHeight

CaptionTextBounds

Declaration
public override Rectangle CaptionTextBounds { get; }
Property Value
System.Drawing.Rectangle

Overrides
ThemedFormBehavior.CaptionTextBounds

ClientMargin

Gets the margin that determines the position and size of the client area of the Form.

Declaration
public override Padding ClientMargin { get; }
Property Value
System.Windows.Forms.Padding

Overrides
FormControlBehavior.ClientMargin

FormElement

Declaration
public override RadElement FormElement { get; }
Property Value
RadElement

Overrides
FormControlBehavior.FormElement

HorizontalScrollbarBounds

Gets the bounding rectangle of the horizontal scrollbar. Returns an empty rectangle if the scrollbar is not visible.

Declaration
protected virtual Rectangle HorizontalScrollbarBounds { get; }
Property Value
System.Drawing.Rectangle

IconBounds

Declaration
public override Rectangle IconBounds { get; }
Property Value
System.Drawing.Rectangle

Overrides
ThemedFormBehavior.IconBounds

MenuBounds

Declaration
public override Rectangle MenuBounds { get; }
Property Value
System.Drawing.Rectangle

Overrides
ThemedFormBehavior.MenuBounds

ScrollbarSizingGripBounds

Gets the bounding rectangle of the sizing grip that appears when both scrollbars are visible.

Declaration
protected virtual Rectangle ScrollbarSizingGripBounds { get; }
Property Value
System.Drawing.Rectangle

SystemButtonsBounds

Declaration
public override Rectangle SystemButtonsBounds { get; }
Property Value
System.Drawing.Rectangle

Overrides
ThemedFormBehavior.SystemButtonsBounds

VerticalScrollbarBounds

Gets the bounding rectangle of the vertical scrollbar. Returns an empty rectangle if the scrollbar is not visible.

Declaration
protected virtual Rectangle VerticalScrollbarBounds { get; }
Property Value
System.Drawing.Rectangle

Methods

AdjustFormElementForCurrentStyles()

This method adjusts the FormElement according to the styles currently applied to the Form. For example, the MinimizeButton, MaximizeButton and CloseButton in the Title Bar are enabled/disabled according to whether the corresponding window style is applied.

Declaration
protected void AdjustFormElementForCurrentStyles()

AdjustFormElementForFormState(Nullable<Int32>)

Changes the visibility of the separate items within the RadFormElement's element tree according to the current Form state.

Declaration
protected void AdjustFormElementForFormState(int? formState)
Parameters
System.Nullable<System.Int32> formState

The state of the Form as it comes from the WM_SIZE message

CalculateDynamicClientMargin()

Calculates the client margin based on the current form and form element settings

Declaration
public virtual Padding CalculateDynamicClientMargin()
Returns
System.Windows.Forms.Padding

CreateChildItems(RadElement)

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

Overrides
FormControlBehavior.CreateChildItems(RadElement)

CreateFormElement()

Declaration
protected virtual RadFormElement CreateFormElement()
Returns
RadFormElement

CreateParams(CreateParams)

Declaration
public override CreateParams CreateParams(CreateParams parameters)
Parameters
System.Windows.Forms.CreateParams parameters

Returns
System.Windows.Forms.CreateParams

Overrides
ThemedFormBehavior.CreateParams(CreateParams)

Dispose(Boolean)

Declaration
protected override void Dispose(bool disposing)
Parameters
System.Boolean disposing

Overrides
ThemedFormBehavior.Dispose(Boolean)

GetDynamicCaptionHeight()

Gets the Caption Height according to the Styles applied and the current state of the form.

Declaration
protected virtual int GetDynamicCaptionHeight()
Returns
System.Int32

A value representing the height of the caption.

GetWindowRealNCMargin()

Gets a Padding object which represents the window NC margin according to the currently set styles.

Declaration
protected virtual Padding GetWindowRealNCMargin()
Returns
System.Windows.Forms.Padding

The form NC margin.

HandleWndProc(ref Message)

Declaration
public override bool HandleWndProc(ref Message m)
Parameters
System.Windows.Forms.Message m

Returns
System.Boolean

Overrides
ThemedFormBehavior.HandleWndProc(ref Message)

InvalidateElement(RadElement, Rectangle)

Declaration
public override void InvalidateElement(RadElement element, Rectangle bounds)
Parameters
RadElement element

System.Drawing.Rectangle bounds

Overrides
ThemedFormBehavior.InvalidateElement(RadElement, Rectangle)

NCFromClientCoordinates(Point)

This method translates a point which is in client coordinates to a point in NC coordinates. Used when the Form has captured the mouse and NC mouse events have to be processed.

Declaration
protected virtual Point NCFromClientCoordinates(Point clientCoordinates)
Parameters
System.Drawing.Point clientCoordinates

A point in client coordinates.

Returns
System.Drawing.Point

The point in NC coordinates.

OnActiveMDIChildTextChanged()

Declaration
protected override void OnActiveMDIChildTextChanged()
Overrides
ThemedFormBehavior.OnActiveMDIChildTextChanged()

OnFormAssociated()

Fires when a Form has been associated with the behavior.

Declaration
protected override void OnFormAssociated()
Overrides
ThemedFormBehavior.OnFormAssociated()

OnWindowStateChanged(Int32, Int32)

Declaration
protected override void OnWindowStateChanged(int currentFormState, int newFormState)
Parameters
System.Int32 currentFormState

System.Int32 newFormState

Overrides
ThemedFormBehavior.OnWindowStateChanged(Int32, Int32)

SynchronizeHorizontalScrollbarState()

Calculates the bounding rectangle of the horizontal scrollbar.

Declaration
protected virtual Rectangle SynchronizeHorizontalScrollbarState()
Returns
System.Drawing.Rectangle

An instance of the Rectangle struct that represents the position and the size of the horizontal scrollbar.

SynchronizeHorizontalScrollbarValues()

This method synchronizes the values of the standard horizontal scrollbar with the RadScrollBarElement in the Form's element hierarchy.

Declaration
protected virtual void SynchronizeHorizontalScrollbarValues()

SynchronizeScrollbarsValues()

Declaration
protected void SynchronizeScrollbarsValues()

SynchronizeVerticalScrollbarState()

Calculates the bounding rectangle of the vertical scrollbar.

Declaration
protected virtual Rectangle SynchronizeVerticalScrollbarState()
Returns
System.Drawing.Rectangle

An instance of the Rectangle struct that represents the position and the size of the vertical scrollbar

SynchronizeVerticalScrollbarValues()

This method synchronizes the values of the standard vertical scrollbar with the RadScrollBarElement in the Form's element hierarchy.

Declaration
protected virtual void SynchronizeVerticalScrollbarValues()

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.