开发者

Two windows with glue

开发者 https://www.devze.com 2023-03-08 19:07 出处:网络
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 playli

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.
0

精彩评论

暂无评论...
验证码 换一张
取 消