使用指定选项初始化 TextFormattingRunProperties 的新实例。
命名空间: Microsoft.VisualStudio.Text.Formatting
程序集: Microsoft.VisualStudio.Text.UI.Wpf(在 Microsoft.VisualStudio.Text.UI.Wpf.dll 中)
语法
声明
Public Shared Function CreateTextFormattingRunProperties ( _
foreground As Brush, _
background As Brush, _
typeface As Typeface, _
size As Nullable(Of Double), _
hintingSize As Nullable(Of Double), _
textDecorations As TextDecorationCollection, _
textEffects As TextEffectCollection, _
cultureInfo As CultureInfo _
) As TextFormattingRunProperties
public static TextFormattingRunProperties CreateTextFormattingRunProperties(
Brush foreground,
Brush background,
Typeface typeface,
Nullable<double> size,
Nullable<double> hintingSize,
TextDecorationCollection textDecorations,
TextEffectCollection textEffects,
CultureInfo cultureInfo
)
public:
static TextFormattingRunProperties^ CreateTextFormattingRunProperties(
Brush^ foreground,
Brush^ background,
Typeface^ typeface,
Nullable<double> size,
Nullable<double> hintingSize,
TextDecorationCollection^ textDecorations,
TextEffectCollection^ textEffects,
CultureInfo^ cultureInfo
)
static member CreateTextFormattingRunProperties :
foreground:Brush *
background:Brush *
typeface:Typeface *
size:Nullable<float> *
hintingSize:Nullable<float> *
textDecorations:TextDecorationCollection *
textEffects:TextEffectCollection *
cultureInfo:CultureInfo -> TextFormattingRunProperties
public static function CreateTextFormattingRunProperties(
foreground : Brush,
background : Brush,
typeface : Typeface,
size : Nullable<double>,
hintingSize : Nullable<double>,
textDecorations : TextDecorationCollection,
textEffects : TextEffectCollection,
cultureInfo : CultureInfo
) : TextFormattingRunProperties
参数
foreground
类型:Brush文本的前景画笔。
background
类型:Brush文本的背景画笔。
typeface
类型:Typeface文本的字样。
size
类型:Nullable<Double>文本的大小。
hintingSize
类型:Nullable<Double>文本的提示大小。
textDecorations
类型:TextDecorationCollection文本上的文本修饰。
textEffects
类型:TextEffectCollection文本上的文本效果。
cultureInfo
类型:CultureInfo区域性信息。
返回值
类型:Microsoft.VisualStudio.Text.Formatting.TextFormattingRunProperties
具有所请求属性的 TextFormattingRunProperties 对象。
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关详细信息,请参阅通过部分受信任的代码使用库。