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


C# Italic构造函数代码示例

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


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

示例1: Run

// A child Inline element for the new Italic element.
Run runx = new Run("Text to make italic.");

// After this line executes, the new element "italx"
// contains the specified Inline element, "runx".
Italic italx = new Italic(runx);
开发者ID:.NET开发者,项目名称:System.Windows.Documents,代码行数:6,代码来源:Italic

示例2: Run

// A child Inline element for the new Italic element.
Run runx = new Run("Text to make italic.");

// An empty paragraph will serve as the container for the new Italic element.
Paragraph parx = new Paragraph();

// After this line executes, the new element "italx"
// contains the specified Inline element, "runx".  Also, "italx" is
// inserted at the point indicated by the insertionPosition parameter, 
// which in this case indicates the content start position in the Paragraph 
// element "parx".
Italic italx = new Italic(runx, parx.ContentStart);
开发者ID:.NET开发者,项目名称:System.Windows.Documents,代码行数:12,代码来源:Italic

示例3: Paragraph

// Create a paragraph and three text runs to serve as example content.  
Paragraph parx = new Paragraph();
Run run1 = new Run("Text run 1.");
Run run2 = new Run("Text run 2, make italic.");
Run run3 = new Run("Text run 3.");

// Add the three text runs to the paragraph, separated by linebreaks.
parx.Inlines.Add(run1);
parx.Inlines.Add(new LineBreak());
parx.Inlines.Add(run2);
parx.Inlines.Add(new LineBreak());
parx.Inlines.Add(run3);

// After this line executes, the selection of content
// indicated by the "start" and "end" parameters will be
// enclosed by the new Italic.  In this case, the new Italic
// will enclose the second text run, "run2".
Italic italx = new Italic(run2.ContentStart, run2.ContentEnd);
开发者ID:.NET开发者,项目名称:System.Windows.Documents,代码行数:18,代码来源:Italic


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