当前位置:网站首页>WPF效果第一百九十四篇之伸缩面板
WPF效果第一百九十四篇之伸缩面板
2022-08-09 16:09:00 【dotNET跨平台】
前面一篇玩耍了一下登录实现效果;今天在原来的基础上来玩耍一下伸缩面板的效果;闲话不多扯直接看效果:
1、关于前台简单布局:

2、左侧面板伸缩动画:
<Storyboard x:Key="ShowConfigSb">
<ThicknessAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Margin)" Storyboard.TargetName="LeftTreeViewUc">
<EasingThicknessKeyFrame KeyTime="0" Value="-301,0,0,0"/>
<EasingThicknessKeyFrame KeyTime="0:0:0.8" Value="0,0,0,0"/>
</ThicknessAnimationUsingKeyFrames>
</Storyboard>
<Storyboard x:Key="HideConfigSb">
<ThicknessAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Margin)" Storyboard.TargetName="LeftTreeViewUc">
<EasingThicknessKeyFrame KeyTime="0" Value="0,0,0,0"/>
<EasingThicknessKeyFrame KeyTime="0:0:0.8" Value="-301,0,0,0"/>
</ThicknessAnimationUsingKeyFrames>
</Storyboard>3、右侧面板伸缩动画:
//展开
<EasingThicknessKeyFrame KeyTime="0:0:0.8" Value="0,0,0,0"/>
//收缩
<EasingThicknessKeyFrame KeyTime="0:0:0.8" Value="0,0,-301,0"/>4、底部面板伸缩动画:
//展开
<EasingThicknessKeyFrame KeyTime="0:0:0.8" Value="-40,0,-40,0"/>
//收缩
<EasingThicknessKeyFrame KeyTime="0:0:0.8" Value="-40,0,-40,-301"/>5、注意的就是布局最外层Grid的属性:
ClipToBounds="True"6、来看看如果不设置会出现什么惊喜:

最终简单的效果先这样吧
;以后有时间的话,可以再去摸索一下更复杂的效果
;编程不息、Bug不止、无Bug、无生活
;改bug的冷静、编码的激情、完成后的喜悦、挖坑的激动 、填坑的兴奋;这也许就是屌丝程序员的乐趣吧;今天就到这里吧;希望自己有动力一步一步坚持下去;生命不息,代码不止;大家抽空可以看看今天分享的效果,有好的意见和想法,可以在留言板随意留言;我看到后会第一时间回复大家,多谢大家的一直默默的关注和支持!如果觉得不错,那就伸出您的小手点个赞并关注一下!
边栏推荐
- A40 - 基于51单片机的GSM模块优化设计
- MySQL 5.5系列安装步骤教程(图解版)
- vr虚拟仿真样板间极大节省出样成本-深圳华锐视点
- A51 - 基于STM32的DHT11和LCD显示串口通信仿真
- What you should know about futures account opening
- 1.1、VIFB: A Visible and Infrared Image Fusion Benchmark(一个可见光与红外图像融合Benchmark)文章阅读
- 成为CTO,6个月被老板干死,我损失了1000万
- SQL trill interview: send you a universal template, to?(key, each user to log on to the maximum number of consecutive monthly)
- Sigrity PowerSI Characteristic Impedance and Coupling Simulation
- Video chat source code - how to improve the quality of one-to-one live broadcast?
猜你喜欢
随机推荐
2022小米运维开发笔试1
QuickSort(快速排序)&&MergeSort(归并排序)的效率比较[搭配LeetCode例题]
How to create DataFrame with feature importance from XGBClassifier made by GridSearchCV?
<IDEA using tricks & & combined operation of common keys>
dichotomy
shopee引流方式有哪些,商家如何为自己店铺做引流?
B44 - Based on stm32 bluetooth intelligent voice recognition classification broadcast trash
2019强网杯高明的黑客
快捷键修改typora字体----自制脚本
OpenCV 图像变换之 —— 直方图均衡化
聊聊基于docker部署的mysql如何进行数据恢复
@AllArgsConstructor 和 @NoArgsConstructor
2.1, pay attention to the network based on parallel context scenario text image super-resolution
Reasons for slow startup of IDEA (1)
A50 - 基于51单片机的太阳能充电路灯设计
3种特征分箱方法!
Insert a number and sort "Suggested Favorites"
HR to get the entry date RP_GET_HIRE_DATE
对象模型-虚指针虚表
2022国赛Ezpop









