如何移除WorkflowElementDialog关闭按钮旁的问号?
如何移除WorkflowElementDialog关闭按钮旁的问号?
你遇到的这个问号其实是帮助按钮,WorkflowElementDialog默认会显示它。要移除的话,只需要在你的XAML里给WorkflowElementDialog添加ShowHelpButton="False"属性就行。
修改后的完整XAML代码如下:
<sap:WorkflowElementDialog x:Class="SqlEditorDialog" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:sap="clr-namespace:System.Activities.Presentation;assembly=System.Activities.Presentation" xmlns:sapc="clr-namespace:System.Activities.Presentation.Converters;assembly=System.Activities.Presentation" xmlns:sapv="clr-namespace:System.Activities.Presentation.View;assembly=System.Activities.Presentation" Title="{x:Static p:Resources.EditSql}" ShowHelpButton="False"> </sap:WorkflowElementDialog>
原理很简单:WorkflowElementDialog继承自DialogWindow,而ShowHelpButton是DialogWindow的属性,把它设为False就能直接隐藏那个问号按钮了,不需要额外修改模板或者写后台代码,非常方便。
内容的提问来源于stack exchange,提问作者madan
相关产品推荐
相关产品推荐

