Click here to Skip to main content
15,900,973 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi, i am trying to bind a validation rule class in textbox , but it throw this error.

{"A 'Binding' cannot be set on the 'Path' property of type 'Binding'. A 'Binding' can only be set on a DependencyProperty of a DependencyObject."}

my code is

XML
<TextBox x:Name="txtGTIN" Grid.Column="4" Grid.Row="1" Validation.ErrorTemplate="{StaticResource validationErrorTemplate}">
                  <TextBox.Text>
                  <Binding  Path="{Binding MetaData.GTIN}" Mode="TwoWay" UpdateSourceTrigger="PropertyChanged">
                          <Binding.ValidationRules>
                              <ExceptionValidationRule/>
                          <viewModel:NewECGConfigurationViewModel/>

                          </Binding.ValidationRules>
                      </Binding>
                  </TextBox.Text>
              </TextBox>


it throw error in Path
Posted
Updated 30-Dec-13 2:25am
v3

1 solution

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900