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 拥有的窗口。

返回

Boolean

如果操作成功,则为 true;否则为 false

适用于