Mahapps 中的自定义弹出验证消息
Custom Popup validation message in Mahapps
我正在使用 Mahapps 创建一个 WPF 应用程序,我试图在输入错误值时更改弹出消息(如下图所示)
我想改变 "Value 'e' could not be converted."
我不太了解 Mahapps.Metro
但 覆盖 Metro Window 风格 似乎足够了。
比如这道题之一
<Style x:Key="newDialogStyle" BasedOn="{StaticResource MetroDialogStyle}" TargetType="{x:Type Dialogs:BaseMetroDialog}">
<!-- ur design of Control Template -->
</Style>
<Dialogs:CustomDialog Style="{StaticResource newDialogStyle}" Title="Custom Dialog which is awaitable">
<StackPanel>
<TextBlock Height="30"
Text="This dialog allows arbitrary content. You have to close it yourself by clicking the close button below."
TextWrapping="Wrap"
Foreground="{DynamicResource AccentColorBrush}" />
<Button Content="Close Me!"/>
</StackPanel>
</Dialogs:CustomDialog>
我正在使用 Mahapps 创建一个 WPF 应用程序,我试图在输入错误值时更改弹出消息(如下图所示) 我想改变 "Value 'e' could not be converted."
我不太了解 Mahapps.Metro
但 覆盖 Metro Window 风格 似乎足够了。
比如这道题之一
<Style x:Key="newDialogStyle" BasedOn="{StaticResource MetroDialogStyle}" TargetType="{x:Type Dialogs:BaseMetroDialog}">
<!-- ur design of Control Template -->
</Style>
<Dialogs:CustomDialog Style="{StaticResource newDialogStyle}" Title="Custom Dialog which is awaitable">
<StackPanel>
<TextBlock Height="30"
Text="This dialog allows arbitrary content. You have to close it yourself by clicking the close button below."
TextWrapping="Wrap"
Foreground="{DynamicResource AccentColorBrush}" />
<Button Content="Close Me!"/>
</StackPanel>
</Dialogs:CustomDialog>