当前位置: 首页>>代码示例>>C#>>正文


C# FlowDirection类代码示例

本文整理汇总了C#中FlowDirection的典型用法代码示例。如果您正苦于以下问题:C# FlowDirection类的具体用法?C# FlowDirection怎么用?C# FlowDirection使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


FlowDirection类属于命名空间,在下文中一共展示了FlowDirection类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: VirtualKey

        public VirtualKey(VirtualKeyboard keyboard, KeySet keySet, KeySetRow row, Key key)
        {
            _keyboard = keyboard;
            _keySet = keySet;
            _key = key;

            if (row.IndexOf(key) < row.Count/2)
                _popupFlowDirection = FlowDirection.LeftToRight;
            else
                _popupFlowDirection = FlowDirection.RightToLeft;

            PrimaryAction = new VirtualKeyAction(keyboard, keySet, key.DefaultAction, key.Width);
            Loaded += (s, e) =>
            {
                if (AlternativesPopup != null)
                {
                    if (_popupFlowDirection == FlowDirection.LeftToRight)
                    {
                        AlternativesPopup.HorizontalOffset = -ActualWidth;
                        AlternativesPopup.Placement = PlacementMode.Right;
                    }
                    else
                    {
                        AlternativesPopup.HorizontalOffset = ActualWidth;
                        AlternativesPopup.Placement = PlacementMode.Left;
                    }
                }
            };
        }
开发者ID:Rainking720,项目名称:MediaBrowser.Theater,代码行数:29,代码来源:VirtualKey.cs

示例2: UpdateItemsSource

        private void UpdateItemsSource(List<ApplicationBarIconButton> buttons, FlowDirection flowDirection)
        {
            try
            {
                if (buttons != null || buttons.Count == 0)
                {
                        if (flowDirection == FlowDirection.RightToLeft)
                            buttons.Reverse();

                        Buttons.Dettach(SysAppBar);
                        Buttons.Clear();
                        foreach (ApplicationBarIconButton button in buttons)
                        {
                            Buttons.Add(button);
                        }

                        Buttons.Attach(DataContext, SysAppBar);
                }
                else
                {
                    Buttons.Dettach(SysAppBar);
                    Buttons.Clear();
                    Buttons.Attach(DataContext, SysAppBar);
                }
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
开发者ID:arielbh,项目名称:SuiteValue.UI,代码行数:30,代码来源:ApplicationBar.cs

示例3: UpdateItemsSource

        private void UpdateItemsSource(List<ApplicationBarIconButton> buttons, FlowDirection flowDirection)
        {
            if (buttons != null)
            {
                if (buttons.Count > 0)
                {
                    if (flowDirection == FlowDirection.RightToLeft)
                        buttons.Reverse();

                    Buttons.Dettach(SysAppBar);
                    Buttons.Clear();
                    foreach (ApplicationBarIconButton button in buttons)
                    {
                        Buttons.Add(button);
                    }

                    Buttons.Attach(DataContext, SysAppBar);
                }
            }
            else
            {
                Buttons.Dettach(SysAppBar);
                Buttons.Clear();
                Buttons.Attach(DataContext, SysAppBar);
            }
        }
开发者ID:solingen,项目名称:SuiteValue.UI,代码行数:26,代码来源:ApplicationBar.cs

示例4: FluentMenu

 public FluentMenu(Action<IMenuRegister> completionAction, IMenuRegister parentMenu, string name)
 {
     _completionAction = completionAction;
     _parentMenu = parentMenu;
     _name = name;
     _flowDirection = FlowDirection.LeftToRight;
 }
开发者ID:a-wall,项目名称:radar,代码行数:7,代码来源:FluentMenu.cs

示例5: WpfTextStringFormat

 public WpfTextStringFormat(FlowDirection direction, TextTrimming trimming,
     WpfTextAnchor anchor)
 {
     this.Direction = direction;
     this.Trimming = trimming;
     this.Anchor = anchor;
 }
开发者ID:udayanroy,项目名称:SvgSharp,代码行数:7,代码来源:WpfTextStringFormat.cs

示例6: FlowLayoutSettings

		internal FlowLayoutSettings (Control owner)
		{
			flow_breaks = new Dictionary<object, bool> ();
			wrap_contents = true;
			flow_direction = FlowDirection.LeftToRight;
			this.owner = owner;
		}
开发者ID:nlhepler,项目名称:mono,代码行数:7,代码来源:FlowLayoutSettings.cs

示例7: RenderToBitmap

        public static BitmapSource RenderToBitmap(
            this Visual visual,
            PixelFormat pixelFormat,
            FlowDirection flowDirection = FlowDirection.LeftToRight,
            double dpiX = 96.0,
            double dpiY = 96.0)
        {
            if (visual == null)
                throw new ArgumentException("visual");

            var cv = visual as ContainerVisual;
            if (cv != null)
            {
                var bounds = cv.DescendantBounds;

                var size = new Size(bounds.Right, bounds.Bottom);

                return visual.RenderToBitmap(size, bounds.Location, bounds.Size, pixelFormat);
            }
            else
            {
                var bounds = VisualTreeHelper.GetDescendantBounds(visual);

                var size = new Size(bounds.Right, bounds.Bottom);

                return visual.RenderToBitmap(size, bounds.Location, bounds.Size, pixelFormat);
            }
        }
开发者ID:squaredinfinity,项目名称:Foundation,代码行数:28,代码来源:Visual.extensions.cs

示例8: SetFlowDirection

        /// <summary>
        /// Sets the selectors and title flow direction.
        /// </summary>
        /// <param name="flowDirection">Flow direction to set.</param>
        internal void SetFlowDirection(FlowDirection flowDirection)
        {
            HeaderTitle.FlowDirection = flowDirection;

            PrimarySelector.FlowDirection = flowDirection;
            SecondarySelector.FlowDirection = flowDirection;
            TertiarySelector.FlowDirection = flowDirection;
        }
开发者ID:jeremejevs,项目名称:milk-manager,代码行数:12,代码来源:DatePickerPage.xaml.cs

示例9: SetFlowDirection

        /// <summary>
        /// Sets the selectors and title flow direction.
        /// </summary>
        /// <param name="flowDirection">Flow direction to set.</param>
        public override void SetFlowDirection(FlowDirection flowDirection)
        {
            HeaderTitle.FlowDirection = flowDirection;

            PrimarySelector.FlowDirection = flowDirection;
            SecondarySelector.FlowDirection = flowDirection;
            TertiarySelector.FlowDirection = flowDirection;
        }
开发者ID:JanJoris,项目名称:VikingApp,代码行数:12,代码来源:DatePickerPage.xaml.cs

示例10: PlacementHelper

 public PlacementHelper(Rect placementRect, Size popupSize, double horizontalOffset, double verticalOffset, Size viewPortSize, FlowDirection flowDirection)
 {
     this.popupSize = popupSize;
     this.placementRect = placementRect;
     this.viewPortRect = new Rect(0, 0, viewPortSize.Width, viewPortSize.Height);
     this.offset = new Point(horizontalOffset, verticalOffset);
     this.flowDirection = flowDirection;
 }
开发者ID:mparsin,项目名称:Elements,代码行数:8,代码来源:PlacementHelper.cs

示例11: Read

        public static IGeometry Read(string text, Typeface font, double size, Point origin, FlowDirection flowDirection, IGeometryFactory geomFact)
        {
            var formattedText = new FormattedText(text, System.Globalization.CultureInfo.CurrentUICulture,
                                                  flowDirection, font, size, Brushes.Black);

            var geom = formattedText.BuildGeometry(origin);
            return WpfGeometryReader.Read(geom.GetFlattenedPathGeometry(FlatnessFactor, ToleranceType.Relative), geomFact);
        }
开发者ID:ste10k41,项目名称:nettopologysuite,代码行数:8,代码来源:FontGlyphReader.cs

示例12: SupportedCulture

 public SupportedCulture(string cultureId, EventHandler isSelectedChangEventHandler)
 {
     CultureInfo = CultureInfo.GetCultureInfo(cultureId);
     Flag = (ImageSource) App.Current.FindResource(cultureId);
     XmlLanguage = XmlLanguage.GetLanguage(CultureInfo.Name);
     FlowDirection = CultureInfo.TextInfo.IsRightToLeft ? FlowDirection.RightToLeft : FlowDirection.LeftToRight;
     IsSelectedChanged += isSelectedChangEventHandler;
 }
开发者ID:Slesa,项目名称:Poseidon,代码行数:8,代码来源:SupportedCulture.cs

示例13: SetFlowDirection

 public static void SetFlowDirection(IArrangedElement container, FlowDirection value)
 {
     if (!System.Windows.Forms.ClientUtils.IsEnumValid(value, (int) value, 0, 3))
     {
         throw new InvalidEnumArgumentException("value", (int) value, typeof(FlowDirection));
     }
     container.Properties.SetInteger(_flowDirectionProperty, (int) value);
     LayoutTransaction.DoLayout(container, container, PropertyNames.FlowDirection);
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:9,代码来源:FlowLayout.cs

示例14: TextBounds

 /// <summary>
 /// Constructing TextBounds object
 /// </summary>
 internal TextBounds(
     Rect                    bounds,
     FlowDirection           flowDirection,
     IList<TextRunBounds>    runBounds
     )
 {
     _bounds = bounds;
     _flowDirection = flowDirection;
     _runBounds = runBounds;
 }
开发者ID:JianwenSun,项目名称:cc,代码行数:13,代码来源:TextBounds.cs

示例15: TextImageWidget

		public TextImageWidget(string label, RGBA_Bytes fillColor, RGBA_Bytes borderColor, RGBA_Bytes textColor, double borderWidth, BorderDouble margin, ImageBuffer image = null, double fontSize = 12, FlowDirection flowDirection = FlowDirection.LeftToRight, double height = 40, double width = 0, bool centerText = false, double imageSpacing = 0)
			: base()
		{
			this.image = image;
			this.fillColor = fillColor;
			this.borderColor = borderColor;
			this.borderWidth = borderWidth;
			this.Margin = new BorderDouble(0);
			this.Padding = new BorderDouble(0);

			TextWidget textWidget = new TextWidget(label, pointSize: fontSize);
			ImageWidget imageWidget;

			FlowLayoutWidget container = new FlowLayoutWidget(flowDirection);

			if (centerText)
			{
				// make sure the contents are centered
				GuiWidget leftSpace = new GuiWidget(0, 1);
				leftSpace.HAnchor = Agg.UI.HAnchor.ParentLeftRight;
				container.AddChild(leftSpace);
			}

			if (image != null && image.Width > 0)
			{
				imageWidget = new ImageWidget(image);
				imageWidget.VAnchor = VAnchor.ParentCenter;
				imageWidget.Margin = new BorderDouble(right: imageSpacing);
				container.AddChild(imageWidget);
			}

			if (label != "")
			{
				textWidget.VAnchor = VAnchor.ParentCenter;
				textWidget.TextColor = textColor;
				textWidget.Padding = new BorderDouble(3, 0);
				container.AddChild(textWidget);
			}

			if (centerText)
			{
				GuiWidget rightSpace = new GuiWidget(0, 1);
				rightSpace.HAnchor = Agg.UI.HAnchor.ParentLeftRight;
				container.AddChild(rightSpace);

				container.HAnchor = Agg.UI.HAnchor.ParentLeftRight | Agg.UI.HAnchor.FitToChildren;
			}
			container.VAnchor = Agg.UI.VAnchor.ParentCenter;

			container.MinimumSize = new Vector2(width, height);
			container.Margin = margin;
			this.AddChild(container);
			HAnchor = HAnchor.ParentLeftRight | HAnchor.FitToChildren;
			VAnchor = VAnchor.ParentCenter | Agg.UI.VAnchor.FitToChildren;
		}
开发者ID:broettge,项目名称:MatterControl,代码行数:55,代码来源:TextImageButtonFactory.cs


注:本文中的FlowDirection类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。