C# Class Microsoft.Windows.Controls.Ribbon.RibbonDropDownHelper

A static class which defines various helper methods for DropDown Resizing in Ribbon controls.
Exibir arquivo Open project: kasicass/kasicass

Public Methods

Method Description
ClearLocalValues ( FrameworkElement itemsPresenter, System.Windows.Controls.Primitives.Popup popup ) : void
GetMinDropDownSize ( RibbonMenuItemsPanel itemsHost, System.Windows.Controls.Primitives.Popup popup, System.Windows.Thickness borderThickness ) : Size
GetScreenBounds ( FrameworkElement targetElement, System.Windows.Controls.Primitives.Popup popup ) : Rect

Cache the screen bounds of the monitor in which the targetElement is rendered.

OnPopupResizeStarted ( FrameworkElement itemsPresenter ) : void
ResizePopup ( FrameworkElement itemsPresenter, Size minDropDownSize, bool canUserResizeHorizontally, bool canUserResizeVertically, bool isDropDownPositionedLeft, bool isDropDownPositionedAbove, Rect screenBounds, UIElement popupRoot, double horizontalDelta, double verticalDelta ) : bool

Private Methods

Method Description
ResizePopupActual ( FrameworkElement itemsPresenter, Size minDropDownSize, bool canUserResizeHorizontally, bool canUserResizeVertically, double newWidth, double newHeight ) : bool

Method Details

ClearLocalValues() public static method

public static ClearLocalValues ( FrameworkElement itemsPresenter, System.Windows.Controls.Primitives.Popup popup ) : void
itemsPresenter System.Windows.FrameworkElement
popup System.Windows.Controls.Primitives.Popup
return void

GetMinDropDownSize() public static method

public static GetMinDropDownSize ( RibbonMenuItemsPanel itemsHost, System.Windows.Controls.Primitives.Popup popup, System.Windows.Thickness borderThickness ) : Size
itemsHost Microsoft.Windows.Controls.Ribbon.Primitives.RibbonMenuItemsPanel
popup System.Windows.Controls.Primitives.Popup
borderThickness System.Windows.Thickness
return System.Windows.Size

GetScreenBounds() public static method

Cache the screen bounds of the monitor in which the targetElement is rendered.
public static GetScreenBounds ( FrameworkElement targetElement, System.Windows.Controls.Primitives.Popup popup ) : Rect
targetElement System.Windows.FrameworkElement
popup System.Windows.Controls.Primitives.Popup
return System.Windows.Rect

OnPopupResizeStarted() public static method

public static OnPopupResizeStarted ( FrameworkElement itemsPresenter ) : void
itemsPresenter System.Windows.FrameworkElement
return void

ResizePopup() public static method

public static ResizePopup ( FrameworkElement itemsPresenter, Size minDropDownSize, bool canUserResizeHorizontally, bool canUserResizeVertically, bool isDropDownPositionedLeft, bool isDropDownPositionedAbove, Rect screenBounds, UIElement popupRoot, double horizontalDelta, double verticalDelta ) : bool
itemsPresenter System.Windows.FrameworkElement
minDropDownSize System.Windows.Size
canUserResizeHorizontally bool
canUserResizeVertically bool
isDropDownPositionedLeft bool
isDropDownPositionedAbove bool
screenBounds System.Windows.Rect
popupRoot UIElement
horizontalDelta double
verticalDelta double
return bool