Visibility issues again


Hi guys,

So I’m having issues with visibility states sometimes not propagating again. I haven’t been able to determine exact repro steps, but it’s pretty common.

I have some icons (picture boxes) that I turn on and off in code depending on whether or not an item is selected. Some are becoming visible and some are not. There is only one point in the code where the visibility state changes, and I’ve breakpoint-debugged to make sure the state was coming through, no exceptions were being thrown, etc.

bool IsVis = (this._selected != null);
 btnRemove.Visible = IsVis;
 pbMaskEditor.Visible = IsVis;
 tbImageScale.Visible = IsVis;
 lblAdjustSize.Visible = IsVis;
 lblAdjustAngle.Visible = IsVis;
 tblSizeAndRotate.Visible = IsVis;
 pbMoveBack.Visible = (IsVis && MainPanel.Controls.Count>2);
 pbMoveFront.Visible = (IsVis && MainPanel.Controls.Count > 2);

What can I do to make absolutely certain the visibility state gets propagated to the client?










  • John Nagle
    Update: I seem to have a work-around. If I bring one of the elements to the front, all of them display (or not) correctly.
  • You must to post comments

Hi John,

Can you send a small sample so we can reproduce the problem? Thanks.

  • John Nagle
    Hi Tiago…I’m knee deep in dev right now, but I will try to do this soon. I can tell you that this is happening within a custom User Control that I’ve made. I’ve tried to do call Refresh on the User Control after I set the visibility flags, but it doesn’t work. Forcing one of the images to the front seems to work reliably so far. -John
  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.