共用方式為


Block.SetTextAlignment(DependencyObject, TextAlignment) 方法

定義

設定所指定相依性物件的 TextAlignment 附加屬性值。

public:
 static void SetTextAlignment(System::Windows::DependencyObject ^ element, System::Windows::TextAlignment value);
public static void SetTextAlignment (System.Windows.DependencyObject element, System.Windows.TextAlignment value);
static member SetTextAlignment : System.Windows.DependencyObject * System.Windows.TextAlignment -> unit
Public Shared Sub SetTextAlignment (element As DependencyObject, value As TextAlignment)

參數

element
DependencyObject

要設定 TextAlignment 屬性值的相依性物件。

value
TextAlignment

要設定屬性的目標新值。

例外狀況

elementnull

範例

GetTextAlignment

適用於