John Grove
John Grove

Reputation: 33

How to pass a custom class Property as an argument to a validation rule in WPF (TextBox)

I have the following code for my textbox

<TextBox
    ....>
  <TextBox.Text>
    <Binding Path="Latitude" UpdateSourceTrigger="PropertyChanged">
      <Binding.ValidationRules>
        <c:LatitudeValidator>
      </Binding.ValidationRules>
    </Binding>
  </TextBox.Text>
</Text>

But I need an ISession property (of the View) to be passed to the property of the validation rule

Upvotes: 0

Views: 36

Answers (0)

Related Questions