HttpWebRequest socket operation during WPF binding in a property getter
- by wpfwannabe
In a property getter of a C# class I am doing a HTTP GET using HttpWebRequest to some https address. WPF's property binding seems to choke on this. If I try to access the property in a simple method e.g. Button_Clicked, it works perfectly. If I use WPF binding to access the same property, the app seems to be blocked on a socket's recv() method indefinitely.
Is it a no-no to do this sort of thing during binding? Is app in some special state during binding?
Is there an easy way for me to overcome this limitation and still maintain the same basic idea?