简体   繁体   中英

Custom Popup validation message in Mahapps

I'm creating a WPF application using Mahapps and I am trying to change the popup message when I enter a wrong value (like the photo below) I would like to change "Value 'e' could not be converted."

例

I don't know Mahapps.Metro to much but override a Metro Window style seems sufficient enough.

For example, one of this question answers

<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>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM