共用方式為


WindowHelperService.TrySetWindowOwner(DependencyObject, Window) 方法

定義

將視窗指派為指定之視窗的擁有者。

public:
 bool TrySetWindowOwner(System::Windows::DependencyObject ^ source, System::Windows::Window ^ target);
public bool TrySetWindowOwner (System.Windows.DependencyObject source, System.Windows.Window target);
member this.TrySetWindowOwner : System.Windows.DependencyObject * System.Windows.Window -> bool
Public Function TrySetWindowOwner (source As DependencyObject, target As Window) As Boolean

參數

source
DependencyObject

target 的擁有者。

target
Window

source 所擁有的視窗。

傳回

如果作業成功,則為 true,否則為 false

適用於