LogicalTreeHelper.BringIntoView(DependencyObject) 方法

定義

嘗試將所要求的 UI 項目帶入檢視,同時對目標引發 RequestBringIntoView 事件以報告結果。

public:
 static void BringIntoView(System::Windows::DependencyObject ^ current);
public static void BringIntoView (System.Windows.DependencyObject current);
static member BringIntoView : System.Windows.DependencyObject -> unit
Public Shared Sub BringIntoView (current As DependencyObject)

參數

current
DependencyObject

要帶入檢視的 UI 項目。

備註

呼叫實例方法 FrameworkElement.BringIntoViewFrameworkContentElement.BringIntoView 而不是這個靜態公用程式方法通常更方便。 實例方法的行為相當於靜態方法的行為。

即使 current 提供的 UI 元素是 FrameworkContentElement ,產生的事件仍為相同的 FrameworkElement.RequestBringIntoView 事件,並藉由檢查事件的事件資料來識別原始 FrameworkContentElement 事件。

適用於

另請參閱