DialogPropertyValueEditor.ShowDialog 方法
更新:2007 年 11 月
当 DialogEditorTemplate 为 nullnull 引用(在 Visual Basic 中为 Nothing) 并且用户已经调用对话框时调用。
命名空间: Microsoft.Windows.Design.PropertyEditing
程序集: Microsoft.Windows.Design(在 Microsoft.Windows.Design.dll 中)
语法
声明
Public Overridable Sub ShowDialog ( _
propertyValue As PropertyValue, _
commandSource As IInputElement _
)
用法
Dim instance As DialogPropertyValueEditor
Dim propertyValue As PropertyValue
Dim commandSource As IInputElement
instance.ShowDialog(propertyValue, commandSource)
public virtual void ShowDialog(
PropertyValue propertyValue,
IInputElement commandSource
)
public:
virtual void ShowDialog(
PropertyValue^ propertyValue,
IInputElement^ commandSource
)
public function ShowDialog(
propertyValue : PropertyValue,
commandSource : IInputElement
)
参数
propertyValue
类型:Microsoft.Windows.Design.PropertyEditing.PropertyValue正在编辑的属性的 PropertyValue
commandSource
类型:System.Windows.IInputElement一个 IInputElement,它可用作执行 PropertyValueEditorCommands 的源。
备注
重写此方法可以实现任何自定义对话框逻辑,例如调用现有系统对话框。
因为 PropertyValueEditorCommands 由宿主处理并且因为自定义对话框不是可视化树的一部分,所以 commandSource 将公开属于宿主的可视化树一部分的 IInputElement。它可以用于执行属性编辑命令,以便这些命令得到正确处理。
权限
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关更多信息,请参见通过部分受信任的代码使用库。
另请参见
参考
Microsoft.Windows.Design.PropertyEditing 命名空间