C# 中怎么利用WPF自定义菜单切换动画
发表于:2024-09-22 作者:千家信息网编辑
千家信息网最后更新 2024年09月22日,本篇文章给大家分享的是有关C# 中怎么利用WPF自定义菜单切换动画,小编觉得挺实用的,因此分享给大家学习,希望大家阅读完这篇文章后可以有所收获,话不多说,跟着小编一起来看看吧。添加Nuget库使用 .
千家信息网最后更新 2024年09月22日C# 中怎么利用WPF自定义菜单切换动画
本篇文章给大家分享的是有关C# 中怎么利用WPF自定义菜单切换动画,小编觉得挺实用的,因此分享给大家学习,希望大家阅读完这篇文章后可以有所收获,话不多说,跟着小编一起来看看吧。
添加Nuget库
使用 .Net Core 3.1 创建名为"CustomMenu"的WPF解决方案,添加两个Nuget库:MaterialDesignThemes和MaterialDesignColors。
3.2 工程结构
只修改了App.xaml(添加MD控件样式)和MainWindow.xaml(主窗口实现效果)。
3.3 App.xaml引入MD控件样式
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:CustomMenu"
StartupUri="MainWindow.xaml">
3.4 主窗体 MainWindow.xaml
添加菜单、设置菜单项切换动画等:
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:CustomMenu"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
mc:Ignorable="d"
Title="MainWindow" Height="600" Width="1080" Background="#FF292929" ResizeMode="NoResize" WindowStyle="None"
WindowStartupLocation="CenterScreen">
Storyboard.TargetName="ellipse">
Storyboard.TargetName="ellipse">
Storyboard.TargetName="ellipse">
RenderTransformOrigin="0.5 0.5">
以上就是C# 中怎么利用WPF自定义菜单切换动画,小编相信有部分知识点可能是我们日常工作会见到或用到的。希望你能通过这篇文章学到更多知识。更多详情敬请关注行业资讯频道。
菜单
动画
切换
控件
C#
更多
样式
知识
篇文章
实用
两个
就是
工作会
工程
效果
文章
方案
看吧
知识点
窗体
数据库的安全要保护哪些东西
数据库安全各自的含义是什么
生产安全数据库录入
数据库的安全性及管理
数据库安全策略包含哪些
海淀数据库安全审计系统
建立农村房屋安全信息数据库
易用的数据库客户端支持安全管理
连接数据库失败ssl安全错误
数据库的锁怎样保障安全
中国网络安全法律缺失
中央监控服务器
徐汇区专业网络技术哪家好
局域网中找不到plex 服务器
ar与哪种软件开发有联系
安云服务器
软件开发成本构成科目
数据库做好发给别人怎么会乱码
四个字的软件开发品牌
mac服务器管理员密码
如何取消服务器管理
陕西医保动态数据库
java服务器开发工程师
网络安全泡泡堂
当今社会网络安全现状
个人服务器需要安装dns吗
网络安全双百工程
深圳服务器电子厂
数据库安全测试过程包括
软件开发合同是保密吗
合肥方便网络技术咨询哪家好
小程序获取数据库数据而不能显示
网络安全配置思维导图
上海沁爵网络技术
dell服务器操作系统
出租云服务器如何管理
手机本地服务器
数据库类简历
东莞市易特软件开发
gdc服务器硬盘