当前位置: 首页 > news >正文

网站建设时 网站信息可以边建设边组织国家企业注册信息网

网站建设时 网站信息可以边建设边组织,国家企业注册信息网,辽宁千山科技做网站怎么样,通州北苑网站建设一.设计首页导航条 导航条的样式#xff0c;主要是从Material DesignThemes UI 拷贝过来修改的,项目用了这个UI组件库#xff0c;就看自己需要什么#xff0c;就去拷过来使用#xff0c;界面布局或其他组件使用#xff0c;不做介绍。 直接下载源码#xff0c;编译运行就可…一.设计首页导航条 导航条的样式主要是从Material DesignThemes UI 拷贝过来修改的,项目用了这个UI组件库就看自己需要什么就去拷过来使用界面布局或其他组件使用不做介绍。 直接下载源码编译运行就可以看到Demo 了 反正我下载完且编译后是能正常跑起来没有办法跑起来的找找自己的问题是不是工作不努力了。接下来是要把圈红色那块拷出来做为主界面的导航条 1.最终导航栏效果图 2. MainWindow.xaml 源码 Window x:ClassMyToDo.MainWindowxmlnshttp://schemas.microsoft.com/winfx/2006/xaml/presentationxmlns:xhttp://schemas.microsoft.com/winfx/2006/xamlxmlns:dhttp://schemas.microsoft.com/expression/blend/2008xmlns:mchttp://schemas.openxmlformats.org/markup-compatibility/2006xmlns:localclr-namespace:MyToDoWindowStyleNone WindowStartupLocationCenterScreen AllowsTransparencyTrueStyle{StaticResource MaterialDesignWindow}TextElement.Foreground{DynamicResource MaterialDesignBody}Background{DynamicResource MaterialDesignPaper}TextElement.FontWeightMediumTextElement.FontSize14FontFamily{materialDesign:MaterialDesignFont}mc:Ignorabledxmlns:materialDesignhttp://materialdesigninxaml.net/winfx/xaml/themesTitleMainWindow Height768 Width1280materialDesign:DialogHost DialogThemeInheritIdentifierRootDialogSnackbarMessageQueue{Binding ElementNameMainSnackbar, PathMessageQueue}materialDesign:DrawerHost IsLeftDrawerOpen{Binding ElementNameMenuToggleButton, PathIsChecked}!--左边菜单--materialDesign:DrawerHost.LeftDrawerContentDockPanel MinWidth220/DockPanel/materialDesign:DrawerHost.LeftDrawerContentDockPanel !--导航条色块--materialDesign:ColorZone Padding16 x:NameColorZonematerialDesign:ElevationAssist.ElevationDp4DockPanel.DockTopModePrimaryMidDockPanel LastChildFillFalse!--上左边内容--StackPanel OrientationHorizontalToggleButton x:NameMenuToggleButtonAutomationProperties.NameHamburgerToggleButtonIsCheckedFalseStyle{StaticResource MaterialDesignHamburgerToggleButton} /Button Margin24,0,0,0materialDesign:RippleAssist.Feedback{Binding RelativeSource{RelativeSource Self}, PathForeground, Converter{StaticResource BrushRoundConverter}}Command{Binding MovePrevCommand}Content{materialDesign:PackIcon KindArrowLeft,Size24}Foreground{Binding RelativeSource{RelativeSource AncestorType{x:Type FrameworkElement}}, Path(TextElement.Foreground)}Style{StaticResource MaterialDesignToolButton}ToolTipPrevious Item /Button Margin16,0,0,0materialDesign:RippleAssist.Feedback{Binding RelativeSource{RelativeSource Self}, PathForeground, Converter{StaticResource BrushRoundConverter}}Command{Binding MoveNextCommand}Content{materialDesign:PackIcon KindArrowRight,Size24}Foreground{Binding RelativeSource{RelativeSource AncestorType{x:Type FrameworkElement}}, Path(TextElement.Foreground)}Style{StaticResource MaterialDesignToolButton}ToolTipNext Item /TextBlock Margin16,0,0,0HorizontalAlignmentCenterVerticalAlignmentCenterAutomationProperties.NameMaterial Design In XAML ToolkitFontSize22Text笔记本 //StackPanel!--上右边图标--StackPanel DockPanel.DockRight OrientationHorizontalImage Source/Images/user.jpg Width25 Height25Image.ClipEllipseGeometry Center12.5,12.5 RadiusX12.5 RadiusY12.5 //Image.Clip/ImageButton x:NamebtnMin Style{StaticResource MaterialDesignFlatMidBgButton}materialDesign:PackIcon KindMoveResizeVariant //ButtonButton x:NamebtnMax Style{StaticResource MaterialDesignFlatMidBgButton}materialDesign:PackIcon KindCardMultipleOutline //ButtonButton x:NamebtnClose Style{StaticResource MaterialDesignFlatMidBgButton} CursorHandmaterialDesign:PackIcon KindWindowClose //Button/StackPanel/DockPanel/materialDesign:ColorZone/DockPanel/materialDesign:DrawerHost/materialDesign:DialogHost /Window3.MainWindow.xaml.cs 源码 namespace MyToDo {/// summary/// Interaction logic for MainWindow.xaml/// /summarypublic partial class MainWindow : Window{public MainWindow(){InitializeComponent();//最小化btnMin.Click (s, e) {this.WindowState WindowState.Minimized;//窗口设置最小};//最大化btnMax.Click (s, e) {//判断窗口是否是最小化状态if (this.WindowState WindowState.Maximized){this.WindowState WindowState.Normal; //改成正常状态}else{this.WindowState WindowState.Maximized;//最大化}};//关闭btnClose.Click (s, e) {this.Close();};//鼠标拖动事件ColorZone.MouseMove (s, e) {//如果鼠标在拖动if (e.LeftButton MouseButtonState.Pressed){this.DragMove();//让窗口移动}};//导航栏双击事件ColorZone.MouseDoubleClick (s, e) {//双击时如果是窗口是正常形态就变成最大化if (this.WindowState WindowState.Normal){this.WindowState WindowState.Maximized; }else{this.WindowState WindowState.Normal;//否则就变成正常的}};}} }用法简介 1. 主界面MainWindow.xaml 引入 Material DesignThemes UI 命名空间如下 xmlns:materialDesignhttp://materialdesigninxaml.net/winfx/xaml/themes  MainWindow 窗口设置以下几个属性 隐藏原窗口的边框 WindowStyleNone主窗口启动时居中 WindowStartupLocationCenterScreen 设置窗口属性为透明用于隐藏窗口出现白边 AllowsTransparencyTrue DockPanel 属性用的到列一下说明而已 取消最后一个元素填充LastChildFillFalse 往右停靠DockPanel.DockRight Material DesignThemes UI 样式用来隐藏原生按钮边框 Style{StaticResource MaterialDesignFlatMidBgButton} 未隐藏前后对比 图标可以使用UI 框架提供的 Image 属性用来放置头像并且使用裁剪属性使头像变成圆角 Image.Clip 剪裁绝对定位元素EllipseGeometry 用来绘制一个椭圆或者圆形的图形RadiusX      X轴半径RadiusY      Y轴半径 例如 Image Source/Images/user.jpg Width25 Height25Image.ClipEllipseGeometry Center12.5,12.5 RadiusX12.5 RadiusY12.5 //Image.Clip /Image 效果 对上面我的理解就是使用Image 时要设置高度和宽度并且在用到裁剪属性的时候X轴半径和Y轴半径就设置成 Image 高宽值的一半。所以就变成12.5 二.实现导航条右侧最小化最大化关闭窗口功能 1. 通过事件的形式来实现最小化最大化及关闭的功能点 在 MainWindow.xaml.cs 构造函数中抄上以下代码。我也是抄过来的 //最小化 btnMin.Click (s, e) {this.WindowState WindowState.Minimized;//窗口设置最小 }; //最大化 btnMax.Click (s, e) {//判断窗口是否是最小化状态if (this.WindowState WindowState.Maximized){this.WindowState WindowState.Normal; //改成正常状态}else{this.WindowState WindowState.Maximized;//最大化} }; //关闭 btnClose.Click (s, e) {this.Close(); }; 突然长知识了没有想到还有这样的写法。之前都是在前端界面绑定一个事件3个按钮就要绑定3个例如像下面这样写法每个按钮一个事件代码就有点多且不好看。 2. 让导航栏头部支持鼠标按住时拖动窗口 在 MainWindow.xaml.cs 构造函数中抄上以下代码。 //鼠标拖动事件ColorZone.MouseMove (s, e) {//如果鼠标在拖动if (e.LeftButton MouseButtonState.Pressed){this.DragMove();//让窗口移动}}; 3. 双击导航栏时让窗口变大或恢复正常 在 MainWindow.xaml.cs 构造函数中抄上以下代码。 //导航栏双击事件 ColorZone.MouseDoubleClick (s, e) {//双击时如果是窗口是正常形态就变成最大化if (this.WindowState WindowState.Normal){this.WindowState WindowState.Maximized; }else{this.WindowState WindowState.Normal;//否则就变成正常的形态} }; ColorZonebtnMinbtnMaxbtnClose 都是前端xaml 页面定义的名称!  仅供自己学习记录不做任何教程提供不喜欢也请别喷我。这个是从b 站看视频学习wpf就想记录一下。写的水平有限也并不是写出来误导别人毕竟你有没有基础我不知道反正我看的懂就ok方便我以后用的上时可以回来翻下笔记。仅此而已!!!
http://www.dnsts.com.cn/news/225152.html

相关文章:

  • 网站 公众号 建设方案十堰网络销售
  • 工艺品网站建设super cache wordpress
  • 深圳网站建设公司团队高并发电商网站开发
  • 优秀网站案例欣赏a做爰视频免费网站
  • 手机壳定制网站制作网上商城推广
  • 十天学会网站建设尚层别墅装饰
  • 威海+网站建设wordpress透明插件
  • 网站建设忄金手指花总重庆模板网站建站
  • 单页网站源码wordpress 全局字段
  • 做PPT哪个网站的素材多点杭州有哪些做网站的公司好
  • 做网站自己买域名怎么免费申请网站域名
  • 自己网站的登录api怎么做烟台城乡建设学校官方网站
  • 石家庄建工科技学院石家庄做网站wordpress背景板
  • 外贸网站建设费用多少济南网站seo优化
  • php怎么做网站教程做视频网站注意什么软件
  • 苏州网站制作及推广wordpress文章显示不全
  • 网站不能批量上传图片襄阳路桥建设集团有限公司网站
  • 中文儿童网站模板千锋教育和达内哪个好
  • 做购物网站广告推广方案范文
  • 企业网站报价适合美工的网站
  • 网站建设范文wordpress游客怎么发表文章
  • 广西建设部投诉网站国外网站内容去哪些平台做
  • 微网站 微信网站 建设 维护 公司
  • 南宁百度 - 网站正在建设中wordpress 前台刷新
  • 企业网站建设的流程html5网页设计作品
  • 衣柜东莞网站建设技术支持上海官网建设费用
  • 中国移动官方网站登录入口南通经济开发区城乡建设局网站
  • 网站如何屏蔽ip国际新闻 军事
  • 网站正在建设源码北京学会网站建设
  • 怎么做微网站网页免费制作网站