• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# FlowDirection类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: GetFontWidth

 public static double GetFontWidth(string text, CultureInfo cultureInfo, FontFamily fontFamily, double fontSize,
                            FlowDirection leftToRight)
 {
     return
         new FormattedText(text,
                           cultureInfo,
                           leftToRight,
                           new Typeface(fontFamily.ToString()),
                           fontSize,
                           Brushes.Black)
             .Width;
 }
开发者ID:forki,项目名称:AskMe,代码行数:12,代码来源:FontSizeCalculator.cs


示例17: ChangeLanguage

        public static void ChangeLanguage(string code, FlowDirection flowDirection)
        {
            var culture = new CultureInfo(code);
            Windows.Globalization.ApplicationLanguages.PrimaryLanguageOverride = culture.Name;
            CultureInfo.DefaultThreadCurrentCulture = culture;
            CultureInfo.DefaultThreadCurrentUICulture = culture;
            var frame = Window.Current.Content as Frame;
            if (frame != null)
                frame.FlowDirection = flowDirection;
            //var loader = new Windows.ApplicationModel.Resources.ResourceLoader();

            ResourceManager.Current.DefaultContext.Reset();
            Windows.ApplicationModel.Resources.Core.ResourceContext.GetForCurrentView().Reset();
            Windows.ApplicationModel.Resources.Core.ResourceContext.GetForViewIndependentUse().Reset();
        }
开发者ID:konradbartecki,项目名称:WP81-ResourceBug,代码行数:15,代码来源:LanguageSwitchHelper.cs


示例18: CreateContainerProxy

        private static ContainerProxy CreateContainerProxy(IArrangedElement container, FlowDirection flowDirection) {

            switch (flowDirection) {
                case FlowDirection.RightToLeft:
                    return new RightToLeftProxy(container);
                case FlowDirection.TopDown:
                    return new TopDownProxy(container);
                case FlowDirection.BottomUp:
                    return new BottomUpProxy(container);
                case FlowDirection.LeftToRight:
                default:
                    return new ContainerProxy(container);
            }
        
        }
开发者ID:krytht,项目名称:DotNetReferenceSource,代码行数:15,代码来源:FlowLayout.cs


示例19: FormattedText

 public FormattedText(
     string textToFormat,
     CultureInfo culture,
     FlowDirection flowDirection,
     Typeface typeface,
     double emSize,
     Brush foreground)
 {
     this.Foreground = foreground;
     this.PlatformImpl = PlatformInterface.Instance.CreateFormattedText(
         textToFormat, 
         typeface, 
         emSize);
     this.Text = textToFormat;
 }
开发者ID:modulexcite,项目名称:Avalonia,代码行数:15,代码来源:FormattedText.cs


示例20: GenericTextParagraphProperties

 public GenericTextParagraphProperties(FontRendering newRendering)
 {
     _flowDirection = FlowDirection.LeftToRight;
     _textAlignment = newRendering.TextAlignment;
     _firstLineInParagraph = false;
     _alwaysCollapsible = false;
     _defaultTextRunProperties = new GenericTextRunProperties(
        newRendering.Typeface, newRendering.FontSize, newRendering.FontSize,
        newRendering.TextDecorations, newRendering.TextColor, null,
        BaselineAlignment.Baseline, CultureInfo.CurrentUICulture);
     _textWrap = TextWrapping.Wrap;
     _lineHeight = 0;
     _indent = 0;
     _paragraphIndent = 0;
 }
开发者ID:abdulbaruwa,项目名称:GapBuffer,代码行数:15,代码来源:GenericTextProperties.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# FluentNHibernate类代码示例发布时间:2022-05-24
下一篇:
C# FlowControl类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap