Share via


Storyboard.SetTargetName(Timeline, String) 方法

定義

設定目標專案的 Storyboard.TargetName XAML 附加屬性的值。

public:
 static void SetTargetName(Timeline ^ element, Platform::String ^ name);
 static void SetTargetName(Timeline const& element, winrt::hstring const& name);
public static void SetTargetName(Timeline element, string name);
function setTargetName(element, name)
Public Shared Sub SetTargetName (element As Timeline, name As String)

參數

element
Timeline

要為其設定值的目標專案。

name
String

Platform::String

winrt::hstring

要設定之目標專案的 Storyboard.TargetName 值。 這應該對應至動畫目標 UI 元素上現有的 Namex:Name 值。

適用於

另請參閱