You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何移除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

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.07 07:17:40