New to Telerik UI for WinForms? Start a free 30-day trial

Hosts a CommandBarStripElement after it is detached from a RadCommandBar, and supports docking the strip back into a command bar.

Definition

Namespace:Telerik.WinControls.UI

Assembly:Telerik.WinControls.UI.dll

Syntax:

C#
public class CommandBarFloatingForm : RadForm, IDropTarget, ISynchronizeInvoke, IWin32Window, IBindableComponent, IComponent, IDisposable, IContainerControl, IComponentTreeHandler, ILayoutHandler, ISupportInitializeNotification, ISupportInitialize, INotifyPropertyChanged, IAnalyticsProvider, ISupportRootUIAutomation

Inheritance: objectMarshalByRefObjectComponentControlScrollableControlContainerControlFormRadFormControlBaseRadFormCommandBarFloatingForm...

Implements: IAnalyticsProviderIBindableComponentIComponentIComponentTreeHandlerIContainerControlIDisposableIDropTargetILayoutHandlerINotifyPropertyChangedISupportInitializeISupportInitializeNotificationISupportRootUIAutomationISynchronizeInvokeIWin32Window...

Inherited Members RadForm.ScrollToControl(Control)RadForm.EndInit()RadForm.OnLoad(EventArgs)RadForm.ProcessCaptureChangeRequested(RadElement, bool)RadForm.InitializeFormBehavior()RadForm.SetIconPrimitiveVisibility(bool)RadForm.EnableUIAutomationRadForm.TextRadForm.ThemeClassNameRadForm.FormElementRadForm.IconScalingRadForm.AllowThemingRadForm.ShowIconRadFormControlBase.newBoundsRadFormControlBase.oldDpiRadFormControlBase.currentDpiRadFormControlBase.isBehaviorPreparedRadFormControlBase.controlIsInitializingRootComponentRadFormControlBase.isPaintingRadFormControlBase.Construct()RadFormControlBase.OnCreateControl()RadFormControlBase.LoadElementTree()RadFormControlBase.LoadElementTree(Size)RadFormControlBase.OnLoad(Size)RadFormControlBase.OnShown(EventArgs)RadFormControlBase.OnPaint(PaintEventArgs)RadFormControlBase.OnPaintBackground(PaintEventArgs)RadFormControlBase.ProcessDialogKey(Keys)RadFormControlBase.UpdateDefaultButton()RadFormControlBase.OnBackColorChanged(EventArgs)RadFormControlBase.OnForeColorChanged(EventArgs)RadFormControlBase.OnFontChanged(EventArgs)RadFormControlBase.OnParentChanged(EventArgs)RadFormControlBase.ShouldSerializeProperty(RadProperty)RadFormControlBase.ResetFormBehavior(bool)RadFormControlBase.PerformDesignModeLocationCorrection(ref Message)RadFormControlBase.CallBaseWndProc(ref Message)RadFormControlBase.ProcessFocusRequested(RadElement)RadFormControlBase.OnNotifyPropertyChanged(string)RadFormControlBase.OnNotifyPropertyChanged(PropertyChangedEventArgs)RadFormControlBase.CreateChildItems(RadElement)RadFormControlBase.CreateRootElement()RadFormControlBase.OnThemeNameChanged(ThemeNameChangedEventArgs)RadFormControlBase.OnThemeChanged()RadFormControlBase.OnDisplayPropertyChanged(RadPropertyChangedEventArgs)RadFormControlBase.OnToolTipTextNeeded(object, ToolTipTextNeededEventArgs)RadFormControlBase.OnHandleCreated(EventArgs)RadFormControlBase.OnVisibleChanged(EventArgs)RadFormControlBase.OnAutoSizeChanged(EventArgs)RadFormControlBase.OnLayout(LayoutEventArgs)RadFormControlBase.CreateHandle()RadFormControlBase.SetClientSizeCore(int, int)RadFormControlBase.SetBoundsCore(int, int, int, int, BoundsSpecified)RadFormControlBase.GetPreferredSize(Size)RadFormControlBase.InvalidateIfNotSuspended()RadFormControlBase.InvalidateElement(RadElement)RadFormControlBase.InvalidateElement(RadElement, Rectangle)RadFormControlBase.AddInvalidatedRect(Rectangle)RadFormControlBase.SuspendUpdate()RadFormControlBase.ResumeUpdate()RadFormControlBase.ResumeUpdate(bool)RadFormControlBase.RegisterHostedControl(RadHostItem)RadFormControlBase.UnregisterHostedControl(RadHostItem, bool)RadFormControlBase.OnScreenTipNeeded(object, ScreenTipNeededEventArgs)RadFormControlBase.ControlThemeChangedCallback()RadFormControlBase.InvokeLayoutCallback(LayoutCallback)RadFormControlBase.BeginInit()RadFormControlBase.HandleDpiChanged()RadFormControlBase.ScaleControl(SizeF, BoundsSpecified)RadFormControlBase.SuspendDpiScaling()RadFormControlBase.ResumeDpiScaling()RadFormControlBase.OnWm_SettingChange(Message)RadFormControlBase.SiteRadFormControlBase.EnableAnalyticsRadFormControlBase.IsLoadedRadFormControlBase.MaximumSizeRadFormControlBase.MinimumSizeRadFormControlBase.FormBorderStyleRadFormControlBase.FormBehaviorRadFormControlBase.BehaviorRadFormControlBase.SmallImageListRadFormControlBase.FocusedElementRadFormControlBase.AllowShowFocusCuesRadFormControlBase.ShowItemToolTipsRadFormControlBase.CommandBindingsRadFormControlBase.EnableKeyMapRadFormControlBase.WindowsSettingsRadFormControlBase.BackColorRadFormControlBase.ForeColorRadFormControlBase.FontRadFormControlBase.IsDesignModeRadFormControlBase.ElementTreeRadFormControlBase.ThemeNameRadFormControlBase.RootElementRadFormControlBase.IsUpdateSuspendedRadFormControlBase.ImageListRadFormControlBase.SmallImageScalingSizeRadFormControlBase.ImageScalingSizeRadFormControlBase.IsInitializedRadFormControlBase.IsPerformingScaleRadFormControlBase.HasOwnToolbarRadFormControlBase.IsDpiScalingSuspendedRadFormControlBase.ThemeNameChangedRadFormControlBase.ToolTipTextNeededRadFormControlBase.ScreenTipNeededRadFormControlBase.InitializedRadFormControlBase.PropertyChangedRadFormControlBase.WindowsThemeChangedForm.SetVisibleCore(bool)Form.Activate()Form.ActivateMdiChild(Form)Form.AddOwnedForm(Form)Form.AdjustFormScrollbars(bool)Form.Close()Form.CreateControlsInstance()Form.DefWndProc(ref Message)Form.ProcessMnemonic(char)Form.CenterToParent()Form.CenterToScreen()Form.LayoutMdi(MdiLayout)Form.OnActivated(EventArgs)Form.OnBackgroundImageChanged(EventArgs)Form.OnBackgroundImageLayoutChanged(EventArgs)Form.OnClosing(CancelEventArgs)Form.OnClosed(EventArgs)Form.OnFormClosed(FormClosedEventArgs)Form.OnDeactivate(EventArgs)Form.OnEnabledChanged(EventArgs)Form.OnEnter(EventArgs)Form.OnHandleDestroyed(EventArgs)Form.OnHelpButtonClicked(CancelEventArgs)Form.OnMaximizedBoundsChanged(EventArgs)Form.OnMaximumSizeChanged(EventArgs)Form.OnMinimumSizeChanged(EventArgs)Form.OnInputLanguageChanged(InputLanguageChangedEventArgs)Form.OnInputLanguageChanging(InputLanguageChangingEventArgs)Form.OnMdiChildActivate(EventArgs)Form.OnMenuStart(EventArgs)Form.OnMenuComplete(EventArgs)Form.OnResize(EventArgs)Form.OnDpiChanged(DpiChangedEventArgs)Form.OnGetDpiScaledSize(int, int, ref Size)Form.OnRightToLeftLayoutChanged(EventArgs)Form.OnTextChanged(EventArgs)Form.ProcessCmdKey(ref Message, Keys)Form.ProcessDialogChar(char)Form.ProcessKeyPreview(ref Message)Form.ProcessTabKey(bool)Form.RemoveOwnedForm(Form)Form.Select(bool, bool)Form.GetScaledBounds(Rectangle, SizeF, BoundsSpecified)Form.SetDesktopBounds(int, int, int, int)Form.SetDesktopLocation(int, int)Form.Show(IWin32Window)Form.ShowDialog()Form.ShowDialog(IWin32Window)Form.ToString()Form.OnResizeBegin(EventArgs)Form.OnResizeEnd(EventArgs)Form.OnStyleChanged(EventArgs)Form.ValidateChildren()Form.ValidateChildren(ValidationConstraints)Form.AcceptButtonForm.ActiveFormForm.ActiveMdiChildForm.AllowTransparencyForm.AutoScrollForm.AutoSizeForm.AutoSizeModeForm.AutoValidateForm.CancelButtonForm.ClientSizeForm.ControlBoxForm.DefaultImeModeForm.DefaultSizeForm.DesktopBoundsForm.DesktopLocationForm.DialogResultForm.HelpButtonForm.IconForm.IsMdiChildForm.IsMdiContainerForm.IsRestrictedWindowForm.KeyPreviewForm.LocationForm.MaximizedBoundsForm.MainMenuStripForm.MenuForm.MaximizeBoxForm.MdiChildrenForm.MdiParentForm.MergedMenuForm.MinimizeBoxForm.ModalForm.OpacityForm.OwnedFormsForm.OwnerForm.RestoreBoundsForm.RightToLeftLayoutForm.ShowInTaskbarForm.ShowWithoutActivationForm.SizeForm.SizeGripStyleForm.StartPositionForm.TopLevelForm.TopMostForm.TransparencyKeyForm.WindowStateForm.AutoSizeChangedForm.AutoValidateChangedForm.HelpButtonClickedForm.MaximizedBoundsChangedForm.MaximumSizeChangedForm.MinimumSizeChangedForm.ActivatedForm.DeactivateForm.FormClosingForm.FormClosedForm.LoadForm.MdiChildActivateForm.MenuCompleteForm.MenuStartForm.InputLanguageChangedForm.InputLanguageChangingForm.RightToLeftLayoutChangedForm.ShownForm.DpiChangedForm.ResizeBeginForm.ResizeEnd...

Constructors

Creates a floating form and initializes its item host and title-bar customization button.

C#
public CommandBarFloatingForm()

Fields

Opens the hosted strip's overflow customization menu from the title bar.

C#
protected RadImageButtonElement customizeMenuButtonElement
C#
protected RadDropDownMenu dropDownMenuElement

Hosts the floating strip's items and provides their layout surface.

C#
protected RadCommandBarOverflowPanelHostContol hostControl

Properties

Adds tool-window and no-activation extended styles to the form.

C#
protected override CreateParams CreateParams { get; }

Overrides: RadFormControlBase.CreateParams

Gets the control that hosts the floating items.

C#
public RadCommandBarOverflowPanelHostContol ItemsHostControl { get; }

Gets or sets the parent control of the RadCommandBar to which this floating strip belongs. Setting a non-null value also copies its BindingContext to the floating form.

C#
public Control ParentControl { get; set; }

Gets or sets the hosted CommandBarStripElement. Assigning a strip redirects its item layout to the floating host and moves its overflow items into that host. When the strip belongs to a command-bar row, the host also adopts the owner's theme, image list, and strip-info holder. Setting it to null clears the form's strip reference and strip-info holder, but does not perform the item-layout or floating-form cleanup performed during docking.

C#
public CommandBarStripElement StripElement { get; set; }

Gets the CommandBarStripInfoHolder that contains information about the floating strip.

C#
public CommandBarStripInfoHolder StripInfoHolder { get; }

Methods

Creates, configures, and adds the control that hosts the floating strip's items. The constructor calls this method; overrides must initialize hostControl for later form operations.

C#
protected virtual void CreateHostControl()

Clean up any resources being used.

C#
protected override void Dispose(bool disposing)
Parameters:disposingbool

true if managed resources should be disposed; otherwise, false.

Overrides: RadForm.Dispose(bool)

Prevents closing the form while a strip is attached; instead hides the strip and the form.

C#
protected override void OnFormClosing(FormClosingEventArgs e)
Parameters:eFormClosingEventArgs

The form-closing event data.

Overrides: Form.OnFormClosing(FormClosingEventArgs)

Moves the floating form while its title bar is being dragged and attempts docking beneath the pointer.

C#
protected override void OnMouseMove(MouseEventArgs e)
Parameters:eMouseEventArgs

The pointer position and button state.

Overrides: Control.OnMouseMove(MouseEventArgs)

Attempts to dock the floating strip into a command bar found at the specified screen location. Does nothing if ParentControl is not set or the point is not over a command bar.

C#
public void TryDocking(Point screenLocation)
Parameters:screenLocationPoint

The location in screen coordinates where the strip should try to dock.

Attempts to dock the floating strip in the specified RadCommandBar. If docking is canceled or commandBar is null, the form remains floating. Otherwise, the strip is moved to the command bar's first row and the floating form is closed. ParentControl must be set so the strip's position can be translated back to its parent.

C#
public void TryDocking(RadCommandBar commandBar)
Parameters:commandBarRadCommandBar

The command bar into which the strip should be docked.

Adjusts the form's minimum width and content-based height while the user resizes it.

C#
protected override void WndProc(ref Message m)
Parameters:mMessage

The Windows message being processed.

Overrides: RadForm.WndProc(ref Message)