0

I am wondering if there is a way to spawn a window inside a canvas, setting it's movable boundaries to be inside the Canvas. I figured out how to contain a window's movable range within a window but I cannot figure it out for a panel. If you can use this towards a solution, I'm all ears for that too.

Also, is there a way to grab a canvas' Left and Top coordinates?

Thanks in advance!

mikemags1
  • 797
  • 6
  • 13
  • I don't think you're using terminology properly. There are ways to have movable contains in a canvas, but putting a window inside a canvas makes no sense. Maybe you're looking for something like this: http://stackoverflow.com/questions/2831040/making-a-moveable-control-in-wpf – N_A Mar 11 '13 at 18:53
  • 2
    @mydogisbox I think the OP is trying to hack his way into MDI, which is the worst UI idea ever, and that's why WPF doesn't support it out of the box. – Federico Berasategui Mar 11 '13 at 19:26
  • @HighCore I think you're right. My link is still the right way to implement that in WPF. – N_A Mar 11 '13 at 21:01
  • Here's an example WPF application which uses MVVM and TabControls to show multiple workspaces simultaneously. Not exactly MDI, but might be useful? http://msdn.microsoft.com/en-us/magazine/dd419663.aspx – failedprogramming Mar 11 '13 at 22:42
  • @HighCore You can't make statements like that and not back it up. Plus you don't know the context that I am working around so rather than being unhelpful, try saying something substantial please. In any case, it's hacky, but it works. I have the location changed event listening and repositioning the window if the window leaves the movable boundaries. – mikemags1 Mar 12 '13 at 20:46
  • @user1984344 Thank Goodness Im not an end user of your software. If I were you, I'd go with the link posted by failedprogramming on MVVM and Tabs. – Federico Berasategui Mar 12 '13 at 20:48
  • To give a bit of context, I have a window with a grid. ~1/6 of the grid is allowed to be drawn on with annotations and I am trying to have a **movable** toolbar for the current drawing attributes contained within that 1/6 of the main window. This toolbar is used elsewhere and it is already implemented as a window. – mikemags1 Mar 12 '13 at 20:49
  • And, unfortunately you probably are as much as I don't like it either. – mikemags1 Mar 12 '13 at 20:50
  • @user1984344 At least you're not trying to MDI. – Federico Berasategui Mar 12 '13 at 20:52

0 Answers0