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

全网网站建设设计网站文章排版工具

全网网站建设设计,网站文章排版工具,如何建微信微网站,网站设计步骤及流程概述上期我们概述了CMFodyHC#xff0c;如果之前没有阅读#xff0c;可以先了解下#xff1a;C# 为什么说CMFodyHC是WPF开发的最强组合#xff1f;今天基于最新的VS版本、最新的CM框架版本#xff0c;.NET基于6.0#xff0c;搭建了一个WPF入门学习项目实例#xff0c;关…概述上期我们概述了CMFodyHC如果之前没有阅读可以先了解下C# 为什么说CMFodyHC是WPF开发的最强组合今天基于最新的VS版本、最新的CM框架版本.NET基于6.0搭建了一个WPF入门学习项目实例关于库的nuget引用部分上节已经讲过了不懂的看上期.开发环境VS2022 WPF框架Caliburn.Micro 版本4.0.212HandyControl3.3.0.NET版本.NET6.0HC相关的用法网上资料很少我们直接下载源项目看示例是最快捷的方式地址https://github.com/AFei19911012/HandyControl项目创建步骤详述① 在NUGET上引用相关的库②接下来是搭建CM框架这里可以参考文章C# WPF MVVM开发框架Caliburn.Micro快速搭建③C# WPF框架Caliburn.Micro快速搭建以上文章对框架大家有详细描述这里不再详细介绍③接下里需要在App.xaml中添加HandyControl的资源最终代码如下Application x:ClassWpfApp5.Appxmlnshttp://schemas.microsoft.com/winfx/2006/xaml/presentationxmlns:xhttp://schemas.microsoft.com/winfx/2006/xamlxmlns:localclr-namespace:WpfApp5Application.ResourcesResourceDictionaryResourceDictionary.MergedDictionariesResourceDictionarylocal:MyBootstrapper x:Keybootstrapper//ResourceDictionaryResourceDictionary Sourcepack://application:,,,/HandyControl;component/Themes/SkinDefault.xaml/ResourceDictionary Sourcepack://application:,,,/HandyControl;component/Themes/Theme.xaml//ResourceDictionary.MergedDictionaries/ResourceDictionary/Application.Resources /Application然后在对应的XAML页面引用xmlns:hchttps://handyorg.github.io/handycontrol④ 在需要属性变更的类名称前标注[AddINotifyPropertyChangedInterface]然后就可以愉快的玩转CMFodyHC.项目实例代码前台XAML:Window x:ClassWpfApp5.StartViewxmlnshttp://schemas.microsoft.com/winfx/2006/xaml/presentationxmlns:xhttp://schemas.microsoft.com/winfx/2006/xamlxmlns:mchttp://schemas.openxmlformats.org/markup-compatibility/2006 xmlns:dhttp://schemas.microsoft.com/expression/blend/2008 xmlns:calhttp://www.caliburnproject.org xmlns:hchttps://handyorg.github.io/handycontrolxmlns:localclr-namespace:WpfApp5mc:IgnorabledTitleStartView Height500 Width600 WindowStartupLocationCenterScreenhc:TransitioningContentControlStackPanelTextBox Margin0,0,0,32 hc:InfoElement.TitleWidth70 hc:InfoElement.PlaceholderNecessary hc:InfoElement.TitlePlacementLeft hc:InfoElement.TitleLeft title hc:InfoElement.NecessaryTrue Style{StaticResource TextBoxExtend} NameTextContent/Button Height48 Width160 Margin3 NametestBtnBackground{DynamicResource PrimaryBrush}hc:BackgroundSwitchElement.MouseHoverBackground{DynamicResource MouseHoverBrush} hc:BackgroundSwitchElement.MouseDownBackground{DynamicResource MouseDownBrush}Button.ContentGridGrid.ColumnDefinitionsColumnDefinition Widthauto/ColumnDefinition//Grid.ColumnDefinitionsImage Sourcepack://application:,,,/Images/icon.ico/Label Grid.Column1 ContentCustom Button BorderThickness0 BackgroundTransparent Foreground{DynamicResource TextIconBrush}//Grid/Button.Content/ButtonListBox NameListBoxItems MinHeight230 BackgroundLightGraycal:Message.Attach[Event SelectionChanged] [Action ListBoxItems_SelectionChanged($source,$eventArgs)];[Event MouseUp][ListBoxItems_MouseUp($source,$eventArgs)] /RepeatButton Height48 Width160 ContentRepeat Button Margin3 Delay500 Style{StaticResource RepeatButtonPrimary} Background{DynamicResource PrimaryBrush} Foreground{DynamicResource TextIconBrush} hc:BorderElement.CornerRadius0 NameRepeatButton_Click//StackPanel/hc:TransitioningContentControl /Window后台ViewModel:using Caliburn.Micro; using PropertyChanged; using System.Collections.ObjectModel; using System.Windows; using System.Windows.Controls; using System.Windows.Input;namespace WpfApp5 {[AddINotifyPropertyChangedInterface]class StartViewModel : Screen{public StartViewModel(){ListBoxItems new ObservableCollectionstring() { };ListBoxItems.Add(dotNet编程大全);ListBoxItems.Add(Csharp编程大全);ListBoxItems.Add(dotnet工控上位机编程);}public ObservableCollectionstring ListBoxItems { get; set; }public string TextContent { get; set; }public void testBtn(){TextContent hello world!;NotifyOfPropertyChange(() TextContent);}public void ListBoxItems_MouseUp(object sender, MouseButtonEventArgs e){ListBox listbox sender as ListBox;MessageBox.Show(当前操作的控件名称是: listbox.Name);}public void ListBoxItems_SelectionChanged(object sender, SelectionChangedEventArgs e){TextContent (sender as ListBox).SelectedItem.ToString();NotifyOfPropertyChange(TextContent);}public void RepeatButton_Click(object sender, RoutedEventArgs e){MessageBox.Show(你点击了按钮RepeatButton);}} }CM框架引导程序using Caliburn.Micro; using System.Windows;namespace WpfApp5 {class MyBootstrapper : BootstrapperBase{public MyBootstrapper(){Initialize();//初始化框架}protected override void OnStartup(object sender, StartupEventArgs e){DisplayRootViewForAsyncStartViewModel();//显示界面}} }运行演示源代码链接https://pan.baidu.com/s/1zuFpe-gv6h2L0pCJ_u8JoA提取码6666
http://www.pierceye.com/news/147101/

相关文章:

  • 做购物网站哪个cms好用网络规划与设计就业前景
  • wordpress仿站工具网站建设jw100
  • 网站推广过程叙述关键词歌词
  • vip影视网站如何做appwordpress centos查看目录
  • 网站怎么套模板山西seo博客
  • 好看的手机网站推荐新建的网站 找不到
  • 网站站内搜索怎么做seo搜索优化
  • 建设部网站 测绘规章pc网站手机网站
  • 建网站如何赚钱vs哪个版本做网站好
  • 新衡阳网站游戏软件开发公司简介
  • 湖南基础建设投资集团网站做体育最好的网站
  • 上海php网站开发公司wordpress 邮件认证
  • 教做香肠的网站张家港专业网站建设
  • 园林建设网站营销型网站的建站步骤是什么意思
  • 招聘求职网站html模板正规的创业商机网
  • 预付网站建设费会计处理哪里建网站好
  • 做免费网站艺术学院网站建设管理办法
  • 做网站贵吗手机网站wap
  • linux建立网站做网站的应该怎么发广告
  • wordpress使用端口百度seo排名软
  • 用英文字母做网站关键词个人网站的设计与实现专业论文图像处理工具
  • 重庆企业网站推广流程php网站开发技术训练心得
  • 汽车销售网站学校建网站
  • 两台电脑一台做服务器 网站潍坊专业网站建设多少钱
  • 青岛科技街网站建设安徽 网站开发
  • 黑糖不苦建设的网站wordpress获取文章图片不显示
  • 美食网站建设的功能免费做简历的网站
  • 网站建设公司谁管手机如何创建网站
  • 可以自己做网站优化吗最好用的wordpress主题
  • 瓜子二手车网站开发智慧团建注册登记入口