共用方式為


TextAttributesExtensions.GetEnumAttribute<T> 方法

定義

public:
generic <typename T>
 where T : value class[System::Runtime::CompilerServices::Extension]
 static T GetEnumAttribute(Microsoft::Maui::Graphics::Text::ITextAttributes ^ attributes, Microsoft::Maui::Graphics::Text::TextAttribute type, T defaultValue);
public static T GetEnumAttribute<T> (this Microsoft.Maui.Graphics.Text.ITextAttributes attributes, Microsoft.Maui.Graphics.Text.TextAttribute type, T defaultValue) where T : struct;
static member GetEnumAttribute : Microsoft.Maui.Graphics.Text.ITextAttributes * Microsoft.Maui.Graphics.Text.TextAttribute * 'T -> 'T (requires 'T : struct)
<Extension()>
Public Function GetEnumAttribute(Of T As Structure) (attributes As ITextAttributes, type As TextAttribute, defaultValue As T) As T

類型參數

T

參數

attributes
ITextAttributes
defaultValue
T

傳回

T

適用於