c# - How to refresh / update the wpf window after adorner has been added / enabled -


i having troubles adorner of wpf. adorner ok, don't displayed @ moment want to.

i like:

    public void myaction()     {         // property bound adorner visibiltyproperty         // happen refresh         // (code wired correct, if finish method here, adorner drawn)         this.isadornerenabled = true;          try         {            ... doing long lasting things cannot async cause depends on lot of objects owned main thread...         }                 {             // adorner removed ui             this.isadornerenabled = false;         }     } 

the isadornerenabled property correct bound adorner , makes notification it. in code adorner painted , removed split second when method terminates.

how possible rendered before ui thread blocked?

any appreciated.

explanation: use adorner create non-clickable, half transparent pane on main tab text "loading module" on it. while mainthread navigating magellan, resolving dependencies castle , creating lof of devexpress controls, show pane. remove again. can create adorner, that's no problem. adorner works in prototyping project, don't other things.

try this.

    public void myaction() {     // property bound adorner visibiltyproperty     // happen refresh     // (code wired correct, if finish method here, adorner drawn)     this.isadornerenabled = true;      try     {         this.dispatcher.invoke( (action)(() =>          {              // work here,                  this.isadornerenabled = false;         }));      }catch {     }  } 

Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -