Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 837671
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T05:10:44+00:00 2026-05-15T05:10:44+00:00

In a property getter of a C# class I am doing a HTTP GET

  • 0

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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T05:10:45+00:00Added an answer on May 15, 2026 at 5:10 am

    I think it’s bad form to do something complex other than returning a value in a ‘get’ from a property. It’s unintuitive to the consumer of the object.

    The better idea would be to leave the binding as very dumb (just returning the value), and when the binding should be refreshed, you initiate a background thread to do the web request and then update the property you are using to bind. Then WPF doesn’t have to worry about doing a web request when updating it;s bound value.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have class with internal property: internal virtual StateEnum EnrolmentState { get { ..getter
In my ActionScript3 class, can I have a property with a getter and setter?
I have a class with a string property, having both a getter and a
Is it possible to create a catchall getter property in C#? class xyzFactory {
I'm quite new in JSF and I'm doing some basic things to get a
When a getter returns a property, such as returning a List of other related
I have essentially the same problem discussed here: http://khason.net/blog/dependency-property-getters-and-setters-in-multithreaded-environment/ public static readonly DependencyProperty MyPropertyProperty
I have a class property exposing an internal IList<> through System.Collections.ObjectModel.ReadOnlyCollection<> How can I
I'm using OCMock to mock some Core Data objects. Previously, I had the properties
I've got a class with some functions which realistically are just 'helper' methods that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.