Validation is only displayed on the first WizardPage
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
Research direction
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.
Written by the indexing model from the issue text.
Description
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
- Dominant language
- C#
- Stars
- 4.2k
- Forks
- 912
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from xceedsoftware/wpftoolkit
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
xceedsoftware/wpftoolkit#1808 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
xceedsoftware/wpftoolkit#1807 · 2 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
xceedsoftware/wpftoolkit#1806 · 1 comment ·
-
Difficulty 1/5 Under an hour Newbie friendliness 45/100
xceedsoftware/wpftoolkit#1804 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
xceedsoftware/wpftoolkit#1802 · 3 comments ·
All issues in xceedsoftware/wpftoolkit
Similar issues
-
type/automation type/tech-debt
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
t/bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
ci-failure-cause test-failure
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
area:auth FE mvp P3
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
klasolsson81/jobbliggaren#1788 ·