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


C# List.AsReadOnly方法代码示例

本文整理汇总了C#中System.Windows.Documents.List.AsReadOnly方法的典型用法代码示例。如果您正苦于以下问题:C# List.AsReadOnly方法的具体用法?C# List.AsReadOnly怎么用?C# List.AsReadOnly使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Windows.Documents.List的用法示例。


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

示例1: WpfRichTextBoxTarget

        static WpfRichTextBoxTarget()
        {
            var rules = new List<WpfRichTextBoxRowColoringRule>()
            {
                new WpfRichTextBoxRowColoringRule("level == LogLevel.Fatal", "Black", "Red", FontStyles.Normal, FontWeights.Bold),
                new WpfRichTextBoxRowColoringRule("level == LogLevel.Error", "Black", "Empty", FontStyles.Italic, FontWeights.Bold),
                new WpfRichTextBoxRowColoringRule("level == LogLevel.Warn", "Black", "Empty"),
                new WpfRichTextBoxRowColoringRule("level == LogLevel.Info", "Black", "Empty"),
                new WpfRichTextBoxRowColoringRule("level == LogLevel.Debug", "Black", "Empty"),
                new WpfRichTextBoxRowColoringRule("level == LogLevel.Trace", "Black", "Empty"),
            };

            DefaultRowColoringRules = rules.AsReadOnly();
        }
开发者ID:WinMustDie,项目名称:TradingStation,代码行数:14,代码来源:WpfRichTextBoxTarget.cs

示例2: SetTextLines

 internal void SetTextLines(List<TextLine> textLines)
 {
     this.textLines = textLines.AsReadOnly();
     Height = 0;
     foreach (TextLine line in textLines)
         Height += line.Height;
 }
开发者ID:eolandezhang,项目名称:Diagram,代码行数:7,代码来源:VisualLine.cs

示例3: ConstructVisualElements

        internal void ConstructVisualElements(ITextRunConstructionContext context, VisualLineElementGenerator[] generators)
        {
            Debug.Assert(phase == LifetimePhase.Generating);
            foreach (VisualLineElementGenerator g in generators) {
                g.StartGeneration(context);
            }
            elements = new List<VisualLineElement>();
            PerformVisualElementConstruction(generators);
            foreach (VisualLineElementGenerator g in generators) {
                g.FinishGeneration();
            }

            var globalTextRunProperties = context.GlobalTextRunProperties;
            foreach (var element in elements) {
                element.SetTextRunProperties(new VisualLineElementTextRunProperties(globalTextRunProperties));
            }
            this.Elements = elements.AsReadOnly();
            CalculateOffsets();
            phase = LifetimePhase.Transforming;
        }
开发者ID:eolandezhang,项目名称:Diagram,代码行数:20,代码来源:VisualLine.cs

示例4: ConstructVisualElements

        internal void ConstructVisualElements(ITextRunConstructionContext context, VisualLineElementGenerator[] generators)
        {
            foreach (VisualLineElementGenerator g in generators) {
                g.StartGeneration(context);
            }
            elements = new List<VisualLineElement>();
            PerformVisualElementConstruction(generators);
            foreach (VisualLineElementGenerator g in generators) {
                g.FinishGeneration();
            }

            this.Elements = elements.AsReadOnly();
            CalculateOffsets(context.GlobalTextRunProperties);
        }
开发者ID:g4idrijs,项目名称:UltraDemo,代码行数:14,代码来源:VisualLine.cs

示例5: ConstructVisualElements

		internal void ConstructVisualElements(ITextRunConstructionContext context, VisualLineElementGenerator[] generators)
		{
			foreach (VisualLineElementGenerator g in generators) {
				g.StartGeneration(context);
			}
			elements = new List<VisualLineElement>();
			PerformVisualElementConstruction(generators);
			foreach (VisualLineElementGenerator g in generators) {
				g.FinishGeneration();
			}
			
//			if (FirstDocumentLine.Length != 0)
//				elements.Add(new VisualLineText(FirstDocumentLine.Text, FirstDocumentLine.Length));
//			//elements.Add(new VisualNewLine(VisualNewLine.NewLineType.Lf));
			this.Elements = elements.AsReadOnly();
			CalculateOffsets(context.GlobalTextRunProperties);
		}
开发者ID:tiwariritesh7,项目名称:devdefined-tools,代码行数:17,代码来源:VisualLine.cs


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