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

四会市城乡规划建设局网站wordpress原生相册

四会市城乡规划建设局网站,wordpress原生相册,中国建设工程信息网招标公告,模板网页制作文章目录 1、案例效果2、弹窗控件使用1.引入用户控件2、按钮命令实现 3、总结4、源代码获取 1、案例效果 2、弹窗控件使用 1.引入用户控件 打开 Wpf_Examples 项目#xff0c;在引用中添加用户控件库#xff0c;在 MainWindow.xaml 界面引用控件库#xff0c;代码如下在引用中添加用户控件库在 MainWindow.xaml 界面引用控件库代码如下示例 Window x:ClassWpf_Examples.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:converterclr-namespace:Wpf_Examples.Convertersxmlns:localclr-namespace:Wpf_Examplesxmlns:ccclr-namespace:CustomControlLib;assemblyCustomControlLibxmlns:ucclr-namespace:UserControlLib;assemblyUserControlLibDataContext{Binding Source{StaticResource Locator},PathMain}mc:IgnorabledTitleMainWindow Height450 Width800 WindowStartupLocationCenterScreenGridWrapPanelButton Width120 Height40 FontSize18 Content警告弹窗 Command{Binding ButtonClickCmd} CommandParameter{Binding RelativeSource{RelativeSource ModeSelf},PathContent} Margin8/Button Width120 Height40 FontSize18 Content错误弹窗 Command{Binding ButtonClickCmd} CommandParameter{Binding RelativeSource{RelativeSource ModeSelf},PathContent} Margin8/Button Width120 Height40 FontSize18 Content提示弹窗 Command{Binding ButtonClickCmd} CommandParameter{Binding RelativeSource{RelativeSource ModeSelf},PathContent} Margin8//WrapPanel/Grid /Window 这里我们引用三种状态的弹窗来做实验用 MessageBox 分别显示每种弹窗点击按钮的结果。 2、按钮命令实现 MainViewModel.cs 中按钮命令代码实现如下 public class MainViewModel : ObservableObject{public RelayCommandstring ButtonClickCmd { get; set; }public MainViewModel(){ButtonClickCmd new RelayCommandstring(FunMenu);}private void FunMenu(string obj){var mainWindowInstance App.Current.MainWindow; // 获取主窗口实例bool? result;//定义窗体点击的结果选项switch (obj){case 警告弹窗:var warningNotification new UserControlLib.SMessageBox(){Icon IconType.Warning,ButtonType ButtonType.OkCancel,Title 警告,Content 这是一条警告信息,};warningNotification.Owner mainWindowInstance; // 设置父窗口result warningNotification.ShowDialog();MessageBox.Show($点击窗体的结果是{result}, 提示, MessageBoxButton.OK);break;case 错误弹窗:var error new UserControlLib.SMessageBox(){Icon IconType.Error,ButtonType ButtonType.Ok,Title 错误,Content 这是一条错误信息,};error.Owner mainWindowInstance; // 设置父窗口result error.ShowDialog();MessageBox.Show($点击窗体的结果是{result}, 提示, MessageBoxButton.OK);break;case 提示弹窗:var info new UserControlLib.SMessageBox(){Icon IconType.Info,ButtonType ButtonType.Ok,Title 错误,Content 这是一条错误信息,};info.Owner mainWindowInstance; // 设置父窗口result info.ShowDialog();MessageBox.Show($点击窗体的结果是{result}, 提示, MessageBoxButton.OK);break;}}private void PopWindow(Window window){var mainWindowInstance App.Current.MainWindow; // 获取主窗口实例window.Owner mainWindowInstance;window.WindowStartupLocation WindowStartupLocation.CenterOwner;window.ShowDialog();}}Wpf_Examples 项目没有的同学可以看前面的章节。完成整个项目及MVVM框架的搭建WPFMVVM案例实战三- 动态数字卡片效果实现 3、总结 以上我们就已经实现了一个自定义弹窗控件的使用感谢大家的关注如果有想要其他WPF效果实现的小伙伴可以留言说明需求本人看到后会根据需求推出对应功能实现的文章。 4、源代码获取 CSDN 下载链接封装一个自定义消息弹窗控件
http://www.hkea.cn/news/14549733/

相关文章:

  • 如何申请网站com域名wordpress中文企业主题 下载地址
  • 韩国网站模板下载地址鞍山市住房和城乡建设网站
  • 茂名公司网站开发做网站的三个软件
  • 常州网站建设方案优化专业网站建设需要多少钱
  • 学校网站建设先进事迹网站建设的内部风险分析
  • 网站备案 做网站自己做网站卖视频
  • element ui做的网站wordpress iis php
  • 网站建设服务的会计处理seo关键词排优化软件
  • 网站与网络的区别淘宝客网站如何备案
  • asp网站开发国内外现状福州自适应网站建设
  • 网站建设数据库是什么八字排盘网站建设
  • 邢台做网站推广的地方手把手教你建网站
  • 免费国外网站做暧嗳xo小视频网站
  • ngrok做网站服务器商业展厅手绘设计图
  • 网站备案以后怎么做茂名专业网站制作公司
  • 外贸网站如何做的好处水产养殖畜禽饲料类网站前端模板
  • 昆山汽车网站建设电商网站系统
  • 老域名对做网站的win优化大师有用吗
  • 站长之家查询工具哈尔滨 网站开发
  • 企业网站项目流程顺德网站建设信息
  • 北京做兼职网站有哪些帮一个公司做网站多少钱
  • 网站被k十大原因企业门户账号是什么
  • 同一个网站可以同时做竞价和优化关东建设有限公司网站
  • 吉林省城乡建设部网站海南省海口市网站建设
  • 手机建站cms体验式营销
  • ps网站界面设计天津百度推广
  • 网站建设都包含哪些内容四川省建设厅网站证
  • 保险网站程序源码西安做网站的公司报价
  • 给宝宝做衣服网站湘潭网站建设的公司
  • 重庆做商城网站张家港建设局官方网站