Two windows with glue
I want to show in my application two windows, which are glu开发者_C百科ed, that means, if I move one window, the other will move the same vector too. The behaviour like in winamp, where we have playlist and track control as a separate "windows", but when glued they move as one. Can't figure how to name it shortly, so I hope you'll understand me:)
One easy solution that I tried once was this -
- Instead of creating Windows create UserControls.
- Put the usercontrols in a StackPanel with Orientation=Horizontal
- Moving the window which contains these 2 usercontrols in a stackpanel will move both the usercontrols at the same time giving a Glue effect
- If for any condition you do not want to glue them, put the usercontrols in seperate windows.
精彩评论