[英]Resizing frames in WPF
I am creating a WPF application where I have 4 frames like the next image: 我正在创建一个WPF应用程序,其中有4个帧,如下图所示:
(I couldn't post an image because I need 10 reputation =/ ) (我无法发布图片,因为我需要10个信誉= /)
Each frame would load a page.xaml, so what I want to do is the next: 每帧都将加载page.xaml,所以我要做的是下一个:
When I click on a frame I would like to resize the frame to the size of the window and when I click again resize backwards to the original size. 当我单击一个框架时,我想将框架的大小调整为窗口的大小,当我再次单击该框架时,请向后调整为原始大小。
Well I'll try to show the design of my window, this would be the main window with 4 frames: 好吧,我将尝试展示我的窗口的设计,这将是具有4帧的主窗口:
| | F1 | F1 | | | F2 | F2 |
| | F3 | F3 | | | F4 | F4 |
And when I click one frame it resizes: 当我单击一帧时,它会调整大小:
|-----F1-----| | ----- ----- F1 |
I am kinda new using WPF so I am not sure how can I accomplish this effect, maybe using an event or just changing the size and position of the frame. 我是使用WPF的新手,所以我不确定如何实现此效果,例如使用事件或仅更改框架的大小和位置。
Regards, 问候,
Juan Alberto 胡安·阿尔贝托
如果您不遵循MVVM并只是执行所有操作,则可以在单击F1并将其大小设置为布局大小时简单地隐藏其他3个帧,再次单击时再次切换回去
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.