本文整理汇总了C#中VisualOrientation类的典型用法代码示例。如果您正苦于以下问题:C# VisualOrientation类的具体用法?C# VisualOrientation怎么用?C# VisualOrientation使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
VisualOrientation类属于命名空间,在下文中一共展示了VisualOrientation类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: KryptonButton
/// <summary>
/// Initialize a new instance of the KryptonButton class.
/// </summary>
public KryptonButton()
{
// We generate click events manually, suppress default
// production of them by the base Control class
SetStyle(ControlStyles.StandardClick |
ControlStyles.StandardDoubleClick, false);
// Set default button properties
_style = ButtonStyle.Standalone;
_dialogResult = DialogResult.None;
_orientation = VisualOrientation.Top;
_useMnemonic = true;
// Create content storage
_buttonValues = CreateButtonValues(NeedPaintDelegate);
_buttonValues.TextChanged += new EventHandler(OnButtonTextChanged);
// Create the palette storage
_stateCommon = new PaletteTripleRedirect(Redirector, PaletteBackStyle.ButtonStandalone, PaletteBorderStyle.ButtonStandalone, PaletteContentStyle.ButtonStandalone, NeedPaintDelegate);
_stateDisabled = new PaletteTriple(_stateCommon, NeedPaintDelegate);
_stateNormal = new PaletteTriple(_stateCommon, NeedPaintDelegate);
_stateTracking = new PaletteTriple(_stateCommon, NeedPaintDelegate);
_statePressed = new PaletteTriple(_stateCommon, NeedPaintDelegate);
_stateDefault = new PaletteTripleRedirect(Redirector, PaletteBackStyle.ButtonStandalone, PaletteBorderStyle.ButtonStandalone, PaletteContentStyle.ButtonStandalone, NeedPaintDelegate);
_stateFocus = new PaletteTripleRedirect(Redirector, PaletteBackStyle.ButtonStandalone, PaletteBorderStyle.ButtonStandalone, PaletteContentStyle.ButtonStandalone, NeedPaintDelegate);
// Create the override handling classes
_overrideFocus = new PaletteTripleOverride(_stateFocus, _stateNormal, PaletteState.FocusOverride);
_overrideNormal = new PaletteTripleOverride(_stateDefault, _overrideFocus, PaletteState.NormalDefaultOverride);
_overrideTracking = new PaletteTripleOverride(_stateFocus, _stateTracking, PaletteState.FocusOverride);
_overridePressed = new PaletteTripleOverride(_stateFocus, _statePressed, PaletteState.FocusOverride);
// Create the view button instance
_drawButton = new ViewDrawButton(_stateDisabled,
_overrideNormal,
_overrideTracking,
_overridePressed,
new PaletteMetricRedirect(Redirector),
this,
Orientation,
UseMnemonic);
// Only draw a focus rectangle when focus cues are needed in the top level form
_drawButton.TestForFocusCues = true;
// Create a button controller to handle button style behaviour
_buttonController = new ButtonController(_drawButton, NeedPaintDelegate);
// Assign the controller to the view element to treat as a button
_drawButton.MouseController = _buttonController;
_drawButton.KeyController = _buttonController;
_drawButton.SourceController = _buttonController;
// Need to know when user clicks the button view or mouse selects it
_buttonController.Click += new MouseEventHandler(OnButtonClick);
_buttonController.MouseSelect += new MouseEventHandler(OnButtonSelect);
// Create the view manager instance
ViewManager = new ViewManager(this, _drawButton);
}
开发者ID:ComponentFactory,项目名称:Krypton,代码行数:63,代码来源:KryptonButton.cs
示例2: KryptonLabel
/// <summary>
/// Initialize a new instance of the KryptonLabel class.
/// </summary>
public KryptonLabel()
{
// The label cannot take the focus
SetStyle(ControlStyles.Selectable, false);
// Set default properties
_style = LabelStyle.NormalControl;
_useMnemonic = true;
_orientation = VisualOrientation.Top;
_target = null;
_enabledTarget = true;
// Create content storage
_labelValues = new LabelValues(NeedPaintDelegate);
_labelValues.TextChanged += new EventHandler(OnLabelTextChanged);
// Create palette redirector
_paletteCommonRedirect = new PaletteContentInheritRedirect(Redirector, PaletteContentStyle.LabelNormalControl);
// Create the palette provider
_stateCommon = new PaletteContent(_paletteCommonRedirect, NeedPaintDelegate);
_stateDisabled = new PaletteContent(_stateCommon, NeedPaintDelegate);
_stateNormal = new PaletteContent(_stateCommon, NeedPaintDelegate);
// Our view contains background and border with content inside
_drawContent = new ViewDrawContent(_stateNormal, this, VisualOrientation.Top);
_drawContent.UseMnemonic = _useMnemonic;
// Create the view manager instance
ViewManager = new ViewManager(this, _drawContent);
// We want to be auto sized by default, but not the property default!
AutoSize = true;
AutoSizeMode = AutoSizeMode.GrowAndShrink;
}
开发者ID:Cocotteseb,项目名称:Krypton,代码行数:38,代码来源:KryptonLabel.cs
示例3: ViewLayoutViewport
/// <summary>
/// Initialize a new instance of the ViewLayoutViewport class.
/// </summary>
/// <param name="paletteMetrics">Palette source for metrics.</param>
/// <param name="metricPadding">Metric used to get view padding.</param>
/// <param name="metricOvers">Metric used to get overposition.</param>
/// <param name="orientation">Orientation for the viewport children.</param>
/// <param name="alignment">Alignment of the children within the viewport.</param>
/// <param name="animateChange">Animate changes in the viewport.</param>
public ViewLayoutViewport(IPaletteMetric paletteMetrics,
PaletteMetricPadding metricPadding,
PaletteMetricInt metricOvers,
VisualOrientation orientation,
RelativePositionAlign alignment,
bool animateChange)
{
// Remember the source information
_paletteMetrics = paletteMetrics;
_metricPadding = metricPadding;
_metricOvers = metricOvers;
_orientation = orientation;
_alignment = alignment;
_animateChange = animateChange;
// Default other state
_offset = Point.Empty;
_extent = Size.Empty;
_rightToLeft = RightToLeft.No;
_rightToLeftLayout = false;
_fillSpace = false;
_counterAlignment = RelativePositionAlign.Far;
// Create a timer for animation effect
_animationTimer = new Timer();
_animationTimer.Interval = _animationInterval;
_animationTimer.Tick += new EventHandler(OnAnimationTick);
}
开发者ID:Cocotteseb,项目名称:Krypton,代码行数:37,代码来源:ViewLayoutViewport.cs
示例4: DragTargetControlEdge
/// <summary>
/// Initialize a new instance of the DragTargetControlEdge class.
/// </summary>
/// <param name="screenRect">Rectangle for screen area.</param>
/// <param name="hotRect">Rectangle for hot area.</param>
/// <param name="drawRect">Rectangle for draw area.</param>
/// <param name="hint">Target hint which should be one of the edges.</param>
/// <param name="controlElement">Workspace instance that contains cell.</param>
/// <param name="allowFlags">Only drop pages that have one of these flags defined.</param>
/// <param name="outsideEdge">Add to the outside edge (otherwise the inner edge).</param>
public DragTargetControlEdge(Rectangle screenRect,
Rectangle hotRect,
Rectangle drawRect,
DragTargetHint hint,
KryptonDockingControl controlElement,
KryptonPageFlags allowFlags,
bool outsideEdge)
: base(screenRect, hotRect, drawRect, hint, allowFlags)
{
_controlElement = controlElement;
_outsideEdge = outsideEdge;
// Find the orientation by looking for a matching hint (we need to exclude flags from the hint enum)
switch (hint & DragTargetHint.ExcludeFlags)
{
case DragTargetHint.Transfer:
case DragTargetHint.EdgeLeft:
_edge = VisualOrientation.Left;
break;
case DragTargetHint.EdgeRight:
_edge = VisualOrientation.Right;
break;
case DragTargetHint.EdgeTop:
_edge = VisualOrientation.Top;
break;
case DragTargetHint.EdgeBottom:
_edge = VisualOrientation.Bottom;
break;
default:
Debug.Assert(false);
throw new ArgumentOutOfRangeException("Hint must be an edge value.");
}
}
开发者ID:Cocotteseb,项目名称:Krypton,代码行数:43,代码来源:DragTargetControlEdge.cs
示例5: NavigatorBar
/// <summary>
/// Initialize a new instance of the NavigatorBar class.
/// </summary>
/// <param name="navigator">Reference to owning navigator instance.</param>
/// <param name="needPaint">Delegate for notifying paint requests.</param>
public NavigatorBar(KryptonNavigator navigator,
NeedPaintHandler needPaint)
{
Debug.Assert(navigator != null);
// Remember back reference
_navigator = navigator;
// Store the provided paint notification delegate
NeedPaint = needPaint;
// Default values
_barAnimation = true;
_barFirstItemInset = 0;
_barLastItemInset = 0;
_barOrientation = VisualOrientation.Top;
_barMinimumHeight = _defaultBarMinimumHeight;
_barMultiline = BarMultiline.Singleline;
_checkButtonStyle = ButtonStyle.Standalone;
_tabStyle = TabStyle.HighProfile;
_tabBorderStyle = TabBorderStyle.RoundedOutsizeMedium;
_itemAlignment = RelativePositionAlign.Near;
_itemMinimumSize = _defaultItemMinimumSize;
_itemMaximumSize = _defaultItemMaximumSize;
_itemOrientation = ButtonOrientation.Auto;
_itemSizing = BarItemSizing.SameHeight;
_barMapImage = MapKryptonPageImage.Small;
_barMapText = MapKryptonPageText.TextTitle;
_barMapExtraText = MapKryptonPageText.None;
}
开发者ID:Cocotteseb,项目名称:Krypton,代码行数:35,代码来源:NavigatorBar.cs
示例6: ViewDrawNavOutlookStack
/// <summary>
/// Initialize a new instance of the ViewDrawNavOutlookStack class.
/// </summary>
/// <param name="navigator">Owning navigator instance.</param>
/// <param name="page">Page this check button represents.</param>
/// <param name="orientation">Orientation for the check button.</param>
public ViewDrawNavOutlookStack(KryptonNavigator navigator,
KryptonPage page,
VisualOrientation orientation)
: base(navigator, page, orientation)
{
// Are we mapping for the full or the mini mode?
_full = (navigator.NavigatorMode == NavigatorMode.OutlookFull);
}
开发者ID:ComponentFactory,项目名称:Krypton,代码行数:14,代码来源:ViewDrawNavOutlookStack.cs
示例7: ViewDrawCanvas
/// <summary>
/// Initialize a new instance of the ViewDrawCanvas class.
/// </summary>
/// <param name="paletteBack">Palette source for the background.</param>
/// <param name="paletteBorder">Palette source for the border.</param>
/// <param name="orientation">Visual orientation of the content.</param>
public ViewDrawCanvas(IPaletteBack paletteBack,
IPaletteBorder paletteBorder,
VisualOrientation orientation)
: this(paletteBack,
paletteBorder,
null,
PaletteMetricPadding.HeaderGroupPaddingPrimary,
orientation)
{
}
开发者ID:Cocotteseb,项目名称:Krypton,代码行数:16,代码来源:ViewDrawCanvas.cs
示例8: ViewLayoutInsetOverlap
/// <summary>
/// Initialize a new instance of the ViewLayoutInsetOverlap class.
/// </summary>
public ViewLayoutInsetOverlap(ViewDrawCanvas drawCanvas)
{
Debug.Assert(drawCanvas != null);
// Remember source of the rounding values
_drawCanvas = drawCanvas;
// Default other state
_orientation = VisualOrientation.Top;
}
开发者ID:ComponentFactory,项目名称:Krypton,代码行数:13,代码来源:ViewLayoutInsetOverlap.cs
示例9: ViewDrawAutoHiddenTab
/// <summary>
/// Initialize a new instance of the ViewDrawAutoHiddenTab class.
/// </summary>
/// <param name="page">Reference to the page this tab represents.</param>
/// <param name="orientation">Visual orientation used for drawing the tab.</param>
public ViewDrawAutoHiddenTab(KryptonPage page,
VisualOrientation orientation)
: base(page.StateDisabled.CheckButton,
page.StateNormal.CheckButton,
page.StateTracking.CheckButton,
page.StatePressed.CheckButton,
null, null, orientation, false)
{
_page = page;
_orientation = orientation;
}
开发者ID:ComponentFactory,项目名称:Krypton,代码行数:16,代码来源:ViewDrawAutoHiddenTab.cs
示例10: ViewDrawNavCheckButtonTab
/// <summary>
/// Initialize a new instance of the ViewDrawNavCheckButtonTab class.
/// </summary>
/// <param name="navigator">Owning navigator instance.</param>
/// <param name="page">Page this check button represents.</param>
/// <param name="orientation">Orientation for the check button.</param>
public ViewDrawNavCheckButtonTab(KryptonNavigator navigator,
KryptonPage page,
VisualOrientation orientation)
: base(navigator, page, orientation,
page.StateDisabled.Tab,
page.StateNormal.Tab,
page.StateTracking.Tab,
page.StatePressed.Tab,
page.StateSelected.Tab,
page.OverrideFocus.Tab)
{
}
开发者ID:ComponentFactory,项目名称:Krypton,代码行数:18,代码来源:ViewDrawNavCheckButtonTab.cs
示例11: ViewDrawContent
/// <summary>
/// Initialize a new instance of the ViewDrawContent class.
/// </summary>
/// <param name="paletteContent">Palette source for the content.</param>
/// <param name="values">Reference to actual content values.</param>
/// <param name="orientation">Visual orientation of the content.</param>
public ViewDrawContent(IPaletteContent paletteContent,
IContentValues values,
VisualOrientation orientation)
{
// Cache the starting values
_paletteContent = paletteContent;
_values = values;
_orientation = orientation;
// Default other state
_drawOnComposition = false;
_testForFocusCues = false;
}
开发者ID:ComponentFactory,项目名称:Krypton,代码行数:19,代码来源:ViewDrawContent.cs
示例12: ViewLayoutCenter
/// <summary>
/// Initialize a new instance of the ViewLayoutCenter class.
/// </summary>
/// <param name="paletteMetric">Target for recovering metric values.</param>
/// <param name="metricPadding">Metric to use for border padding.</param>
/// <param name="orientation">Orientation of the element.</param>
/// <param name="childElement">Optional element to add as child.</param>
public ViewLayoutCenter(IPaletteMetric paletteMetric,
PaletteMetricPadding metricPadding,
VisualOrientation orientation,
ViewBase childElement)
{
// Remember provided values
_paletteMetric = paletteMetric;
_metricPadding = metricPadding;
_orientation = orientation;
if (childElement != null)
Add(childElement);
}
开发者ID:ComponentFactory,项目名称:Krypton,代码行数:20,代码来源:ViewLayoutCenter.cs
示例13: ViewDrawNavCheckButtonBase
/// <summary>
/// Initialize a new instance of the ViewDrawNavCheckButtonBase class.
/// </summary>
/// <param name="navigator">Owning navigator instance.</param>
/// <param name="page">Page this check button represents.</param>
/// <param name="orientation">Orientation for the check button.</param>
/// <param name="overflow">Button is used on the overflow bar.</param>
public ViewDrawNavCheckButtonBase(KryptonNavigator navigator,
KryptonPage page,
VisualOrientation orientation,
bool overflow)
: this(navigator, page, orientation,
page.StateDisabled.OverflowButton,
page.StateNormal.OverflowButton,
page.StateTracking.OverflowButton,
page.StatePressed.OverflowButton,
page.StateSelected.OverflowButton,
page.OverrideFocus.OverflowButton)
{
}
开发者ID:ComponentFactory,项目名称:Krypton,代码行数:20,代码来源:ViewDrawNavCheckButtonBase.cs
示例14: ViewDrawButton
/// <summary>
/// Initialize a new instance of the ViewDrawButton class.
/// </summary>
/// <param name="paletteDisabled">Palette source for the disabled state.</param>
/// <param name="paletteNormal">Palette source for the normal state.</param>
/// <param name="paletteTracking">Palette source for the tracking state.</param>
/// <param name="palettePressed">Palette source for the pressed state.</param>
/// <param name="paletteMetric">Palette source for metric values.</param>
/// <param name="buttonValues">Source for content values.</param>
/// <param name="orientation">Visual orientation of the content.</param>
/// <param name="useMnemonic">Use mnemonics.</param>
public ViewDrawButton(IPaletteTriple paletteDisabled,
IPaletteTriple paletteNormal,
IPaletteTriple paletteTracking,
IPaletteTriple palettePressed,
IPaletteMetric paletteMetric,
IContentValues buttonValues,
VisualOrientation orientation,
bool useMnemonic)
: this(paletteDisabled, paletteNormal, paletteTracking, palettePressed,
paletteNormal, paletteTracking, palettePressed, paletteMetric,
buttonValues, orientation, useMnemonic)
{
}
开发者ID:Cocotteseb,项目名称:Krypton,代码行数:24,代码来源:ViewDrawButton.cs
示例15: ViewLayoutDocker
/// <summary>
/// Initialize a new instance of the ViewLayoutDocker class.
/// </summary>
public ViewLayoutDocker()
{
// Create child to dock style lookup
_childDocking = new ViewDockStyleLookup();
// Default state
_fillRectangle = Rectangle.Empty;
_orientation = VisualOrientation.Top;
_maxBorderEdges = PaletteDrawBorders.All;
_preferredSizeAll = false;
_removeChildBorders = false;
_ignoreRightToLeftLayout = false;
_padding = Padding.Empty;
}
开发者ID:ComponentFactory,项目名称:Krypton,代码行数:17,代码来源:ViewLayoutDocker.cs
示例16: DrawBackExpertChecked
/// <summary>
/// Draw a background for an expert style button that is checked.
/// </summary>
/// <param name="context">Rendering context.</param>
/// <param name="rect">Rectangle to draw.</param>
/// <param name="backColor1">First color.</param>
/// <param name="backColor2">Second color.</param>
/// <param name="orientation">Drawing orientation.</param>
/// <param name="path">Clipping path.</param>
/// <param name="memento">Cache used for drawing.</param>
public static IDisposable DrawBackExpertChecked(RenderContext context,
Rectangle rect,
Color backColor1,
Color backColor2,
VisualOrientation orientation,
GraphicsPath path,
IDisposable memento)
{
using (Clipping clip = new Clipping(context.Graphics, path))
{
// Draw the expert background which is gradient with highlight at bottom
return DrawBackExpert(rect, backColor1, backColor2, orientation, context.Graphics, memento, true, false);
}
}
开发者ID:ComponentFactory,项目名称:Krypton,代码行数:24,代码来源:RenderExpertHelpers.cs
示例17: ViewDrawNavCheckButtonBar
/// <summary>
/// Initialize a new instance of the ViewDrawNavCheckButtonBar class.
/// </summary>
/// <param name="navigator">Owning navigator instance.</param>
/// <param name="page">Page this check button represents.</param>
/// <param name="orientation">Orientation for the check button.</param>
/// <param name="stateDisabled">Source for disabled state values.</param>
/// <param name="stateNormal">Source for normal state values.</param>
/// <param name="stateTracking">Source for tracking state values.</param>
/// <param name="statePressed">Source for pressed state values.</param>
/// <param name="stateSelected">Source for selected state values.</param>
/// <param name="stateFocused">Source for focused state values.</param>
public ViewDrawNavCheckButtonBar(KryptonNavigator navigator,
KryptonPage page,
VisualOrientation orientation,
IPaletteTriple stateDisabled,
IPaletteTriple stateNormal,
IPaletteTriple stateTracking,
IPaletteTriple statePressed,
IPaletteTriple stateSelected,
IPaletteTriple stateFocused)
: base(navigator, page, orientation, stateDisabled,
stateNormal, stateTracking, statePressed,
stateSelected, stateFocused)
{
}
开发者ID:Cocotteseb,项目名称:Krypton,代码行数:26,代码来源:ViewDrawNavCheckButtonBar.cs
示例18: ViewDrawNavOutlookMini
/// <summary>
/// Initialize a new instance of the ViewDrawNavOutlookSelected class.
/// </summary>
/// <param name="navigator">Owning navigator instance.</param>
/// <param name="page">Page this check button represents.</param>
/// <param name="orientation">Orientation for the check button.</param>
public ViewDrawNavOutlookMini(KryptonNavigator navigator,
KryptonPage page,
VisualOrientation orientation)
: base(navigator, page, orientation,
navigator.StateDisabled.MiniButton,
navigator.StateNormal.MiniButton,
navigator.StateTracking.MiniButton,
navigator.StatePressed.MiniButton,
navigator.StateSelected.MiniButton,
navigator.OverrideFocus.MiniButton)
{
// Create the finish handler for when popup is removed
_finishDelegate = new EventHandler(OnPopupFinished);
}
开发者ID:ComponentFactory,项目名称:Krypton,代码行数:20,代码来源:ViewDrawNavOutlookMini.cs
示例19: CreateCheckItem
/// <summary>
/// Create a new check item with initial settings.
/// </summary>
/// <param name="page">Page for which the check button is to be created.</param>
/// <param name="orientation">Initial orientation of the check button.</param>
protected override INavCheckItem CreateCheckItem(KryptonPage page,
VisualOrientation orientation)
{
// Create a check button view element
ViewDrawNavRibbonTab ribbonTab = new ViewDrawNavRibbonTab(Navigator, page);
// Convert the button orientation to the appropriate visual orientations
VisualOrientation orientBackBorder = ConvertButtonBorderBackOrientation();
VisualOrientation orientContent = ConvertButtonContentOrientation();
// Set the correct initial orientation of the button
ribbonTab.SetOrientation(orientBackBorder, orientContent);
return ribbonTab;
}
开发者ID:ComponentFactory,项目名称:Krypton,代码行数:20,代码来源:ViewBuilderBarRibbonTabBase.cs
示例20: ViewLayoutOutlookFull
/// <summary>
/// Initialize a new instance of the ViewLayoutOutlookFull class.
/// </summary>
/// <param name="viewBuilder">View builder reference.</param>
/// <param name="rootControl">Top level visual control.</param>
/// <param name="viewportFiller">View element to place inside viewport.</param>
/// <param name="paletteBorderEdge">Palette for use with the border edge.</param>
/// <param name="paletteMetrics">Palette source for metrics.</param>
/// <param name="metricPadding">Metric used to get view padding.</param>
/// <param name="metricOvers">Metric used to get overposition.</param>
/// <param name="orientation">Orientation for the viewport children.</param>
/// <param name="alignment">Alignment of the children within the viewport.</param>
/// <param name="animateChange">Animate changes in the viewport.</param>
/// <param name="vertical">Is the viewport vertical.</param>
/// <param name="needPaintDelegate">Delegate for notifying paint requests.</param>
public ViewLayoutOutlookFull(ViewBuilderOutlookBase viewBuilder,
VisualControl rootControl,
ViewBase viewportFiller,
PaletteBorderEdge paletteBorderEdge,
IPaletteMetric paletteMetrics,
PaletteMetricPadding metricPadding,
PaletteMetricInt metricOvers,
VisualOrientation orientation,
RelativePositionAlign alignment,
bool animateChange,
bool vertical,
NeedPaintHandler needPaintDelegate)
: base(rootControl, viewportFiller, paletteBorderEdge, paletteMetrics,
metricPadding, metricOvers, orientation, alignment, animateChange,
vertical, needPaintDelegate)
{
Debug.Assert(viewBuilder != null);
_viewBuilder = viewBuilder;
}
开发者ID:Cocotteseb,项目名称:Krypton,代码行数:34,代码来源:ViewLayoutOutlookFull.cs
注:本文中的VisualOrientation类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论