Validation is only displayed on the first WizardPage
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 35/100
Línea de trabajo
Reproduce the issue with the provided XAML and MainWindow code-behind, navigating between WizardPage instances and returning to the first page. Start by inspecting the Wizard and WizardPage navigation and validation lifecycle. Done means validation messages appear on every page and are re-triggered when revisiting a page.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Validation is done correctly on the first page of a wizard the first time it is displayed. If you then go to the next page no validation is displayed on any of the following pages, also if you go back to the first page, it does not re-do the validation.
XAML
<Window x:Class="XceedWizardValidation.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:XceedWizardValidation" xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
mc:Ignorable="d"
Title="MainWindow" Height="450" Width="800" x:Name="window" DataContext="{Binding ElementName=window}">
<xctk:Wizard Name="Wizard">
<xctk:WizardPage x:Name="Page1" Title="Page1">
<StackPanel>
<TextBlock>This field is always wrong</TextBlock>
<TextBox Text="{Binding Path=MyTest, ValidatesOnDataErrors=True, NotifyOnValidationError=True}"/>
<TextBlock FontSize="15" Margin="0,50,0,0">Go to the next wizardpage, then come back to this one.</TextBlock>
<TextBlock FontSize="15">Bug: Validation is only performed on the first page of the wizard the first time it is seen.</TextBlock>
</StackPanel>
</xctk:WizardPage>
<xctk:WizardPage x:Name="Page2" Title="Page2">
<StackPanel>
<TextBlock>This field also has an error, but its never displayed.</TextBlock>
<TextBox Text="{Binding Path=MyOtherTest, ValidatesOnDataErrors=True, NotifyOnValidationError=True}"/>
</StackPanel>
</xctk:WizardPage>
</xctk:Wizard>
</Window>
Code behind
public partial class MainWindow : Window, IDataErrorInfo, INotifyPropertyChanged
{
private string _myTest = "Some Value";
private string _myOtherTest = "Some Value";
public MainWindow()
{
InitializeComponent();
}
public string MyTest
{
get { return _myTest; }
set
{
_myTest = value;
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(MyTest)));
}
}
public string MyOtherTest
{
get { return _myOtherTest; }
set
{
_myOtherTest = value;
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(MyOtherTest)));
}
}
#region IDataErrorInfo Implementation
public string Error { get { return ""; } }
public string this[string columnName]
{
get
{
if (columnName == nameof(MyTest))
return "Its all wrong, try harder.";
if (columnName == nameof(MyOtherTest))
return "Its all wrong, try harder.";
return "";
}
}
#endregion
public event PropertyChangedEventHandler? PropertyChanged;
}
After re-visiting the page
- Lenguaje dominante
- C#
- Estrellas
- 4.2k
- Forks
- 912
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de xceedsoftware/wpftoolkit
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
xceedsoftware/wpftoolkit#1808 · 1 comentario ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 48/100
xceedsoftware/wpftoolkit#1807 · 2 comentarios ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
xceedsoftware/wpftoolkit#1806 · 1 comentario ·
-
Plus Edition. Incorrect window position restoration after returning from the maximized state. Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 45/100
xceedsoftware/wpftoolkit#1804 · 1 comentario ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 45/100
xceedsoftware/wpftoolkit#1802 · 3 comentarios ·
Todos los issues de xceedsoftware/wpftoolkit
Issues similares
-
type/automation type/tech-debt
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
-
t/bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
-
ci-failure-cause test-failure
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
-
area:auth FE mvp P3
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
klasolsson81/jobbliggaren#1788 ·