How to declare a namespace in WPF XAML?

前端 未结 1 713
情歌与酒
情歌与酒 2020-12-16 10:33

I am trying to use in WPF a validating input of databound controls with validation rules. In the code behind file of a wpf window I have a class:

public clas         


        
相关标签:
1条回答
  • 2020-12-16 10:50

    At the top of your XAML file, you need to declare what your "local" namespace is; alongside the default Microsoft XAML stuff. Something like this:

    xmlns:local="clr-namespace:YourApplication"
    

    Note this assumes that "posintValidationRule" is defined at the root namespace in "YourApplication".

    0 讨论(0)
提交回复
热议问题