MahApps.Metro icon indicating copy to clipboard operation
MahApps.Metro copied to clipboard

ShowInputAsync miss a validateCallback

Open TheCamel opened this issue 1 year ago • 1 comments

Describe the feature

need to add a validation callback to be able to check if the input value is compliant

TheCamel avatar Oct 30 '24 15:10 TheCamel

Hi! You can try the Minimal MVVM framework for MahApps.Metro:

        <minimal:DialogCoordinatorService x:Name="DialogCoordinatorService"/>
        <minimal:MetroDialogService DialogCoordinator="{Binding Source={x:Reference DialogCoordinatorService}}"
                                    MessageBoxButtonLocalizer="{StaticResource MessageBoxButtonLocalizer}"
                                    DialogContentMargin="*" DialogContentWidth="9*"
                                    ValidatesOnDataErrors="True" ValidatesOnNotifyDataErrors="True"/>

Validation can be achieved via the ValidatesOnDataErrors and/or ValidatesOnNotifyDataErrors properties of the MetroDialogService for custom dialogs.

Sample that demonstrates validation using ValidatesOnDataErrors.

IvanGit avatar Dec 04 '24 04:12 IvanGit