Window type dialog RRS feed

All replies

  • You could create each of them as a usercontrol, so you can edit them that way, then on your main page, you could create them when you need them, or have them precreated and set their visibility to collapsed, or bind their visibility state to a bool property and use a converter.
    Monday, November 22, 2010 3:22 PM
  • Ah yes, that's a good idea. I just need to find some way to give the usercontrol context once I display it. In my case I need to display the usercontrol when someone clicks a button and the control would need to know the context. For example there's a button for each user on the main canvas - when the users button is pressed, I need to display the user control, but the control needs to know which "user" it now represents if it's say an information edit form. How would I do that?




    Monday, November 22, 2010 3:57 PM
  • You would probably need to introduce dependency properties on the usercontrol for each thing you want to use for data, then databind them. Maybe that isn't the easiest way to go in this case though. You could just work with them in Blend, and then when you have them they way you want them, set the visibility back to collapsed.
    Monday, November 22, 2010 4:09 PM
  • Thanks. I also just tried creating a new contructor for the user control and then when I create the control I pass in a ref. to the data - not sure how messy that's going to get though. This is pretty much where I normally end up though .. once you go the route of hiding or collapsing, things just hard to manage and I just can't help but think there's got to be a better way.
    Monday, November 22, 2010 4:19 PM
  • To add to the mess that you're now left with, VS 2010 does not seem to hide elements that are set to hidden?
    Tuesday, November 23, 2010 1:17 PM