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

帝国网站后台管理系统dw网页设计代码案例

帝国网站后台管理系统,dw网页设计代码案例,建筑设计和室内设计哪个好,房屋经纪人网站端口怎么做↑↑↑点击上方蓝字关注我一、概要本文将讲解基于WPF实现一个消息中心的功能#xff0c;比如常见的软件当中会经常收到服务端推送的“新闻”、“公告”等消息。这个时候就需要对这个需求进行分析了。功能分析如下#xff1a;•消息内容显示。•消息管理增、删、批量删除。•消… ↑↑↑点击上方蓝字关注我一、概要本文将讲解基于WPF实现一个消息中心的功能比如常见的软件当中会经常收到服务端推送的“新闻”、“公告”等消息。这个时候就需要对这个需求进行分析了。功能分析如下•消息内容显示。•消息管理增、删、批量删除。•消息分类通知类消息、交互类型消息例如可跳转到某个连接或程序内的模块•消息处理接受、删除、忽略二、实现1.消息内容显示这里考虑自定义的控件为Listbox消息本身是一个多项的内容且需要操作每一项。 ListBoxGrid.Row1MaxHeight335Background{x:Null}BorderThickness0ItemContainerStyle{DynamicResource ListBoxItemStyle}ItemsSource{Binding MessageItem}ScrollViewer.HorizontalScrollBarVisibilityHiddenListBox.ItemsPanelItemsPanelTemplateVirtualizingStackPanel OrientationVertical //ItemsPanelTemplate/ListBox.ItemsPanelListBox.ItemTemplateDataTemplate DataType{x:Type localModel:MessageItemModel}BorderHeight30BorderBrush#FFBDBDBDBorderThickness0,0,0,0.6GridGrid.ColumnDefinitionsColumnDefinition Width1* /ColumnDefinition Width40 //Grid.ColumnDefinitionsDockPanelLabelMaxWidth70Content{Binding PathName}ForegroundRedToolTip{Binding PathName} /LabelMaxWidth130Content{Binding PathContent}ForegroundWhiteToolTip{Binding PathContent} //DockPanelCheckBoxGrid.Column1FlowDirectionRightToLeftIsChecked{Binding PathCheckBoxState} //Grid/Border/DataTemplate/ListBox.ItemTemplate /ListBox 2.消息管理增、删、批量删除主要容器定下来之后那么接下来每一项消息就是自定义ListboxItem即可针对每一条消息要有具体的处理。例如1.通知类消息只需要确定按钮。2.交互类型消息需要确认、删除、忽略 DataTemplate x:KeySelectedTemplate DataType{x:Type localModel:MessageItemModel}Border BorderBrush#FFBDBDBD BorderThickness0,0,0,0.6StackPanelTextBoxMaxWidth240MaxHeight200Padding0,5,0,0HorizontalAlignmentCenterVerticalAlignmentCenterBackgroundTransparentBorderThickness0FontSize14ForegroundWhiteIsReadOnlyTrueText{Binding PathContent}TextAlignmentCenterTextWrappingWrapWithOverflowToolTip{Binding PathContent}VerticalScrollBarVisibilityAuto /StackPanelMargin5,5,5,9HorizontalAlignmentCenterVerticalAlignmentCenterOrientationHorizontalButtonWidth60Height25Margin5Command{Binding DataContext.ClickAcceptCommand, RelativeSource{RelativeSource AncestorTypeListBox}}CommandParameter{Binding}Content接受Style{StaticResource BlueButtonStyle}Visibility{Binding PathInvitationType, Converter{StaticResource BooleanToVisibilityConverter}} /ButtonWidth60Height25Margin5Command{Binding DataContext.ClickRefuseCommand, RelativeSource{RelativeSource AncestorTypeListBox}}CommandParameter{Binding}Content忽略Style{StaticResource BlueButtonStyle}Visibility{Binding PathInvitationType, Converter{StaticResource BooleanToVisibilityConverter}} /ButtonWidth60Height25Margin5Command{Binding DataContext.ClickAgreeCommand, RelativeSource{RelativeSource AncestorTypeListBox}}CommandParameter{Binding}Content确认Style{StaticResource BlueButtonStyle}Visibility{Binding PathNoticeType, Converter{StaticResource BooleanToVisibilityConverter}} //StackPanel/StackPanel/Border/DataTemplate 3.消息分类这里就是在Model层定义好具体的枚举即可。/// summary /// 消息处理结果 /// /summary public enum SysMessageResult {/// summary/// 未处理/// /summaryUnhandled 0,/// summary/// 同意/// /summaryProcessed 1 }/// summary /// 消息类型 /// /summary public enum SysMessageType {/// summary/// 通知类型/// /summaryNoticeType 0,/// summary/// 其他类型/// /summaryOtherType 1 } 4.消息处理消息处理指的是“确定”、“接受”、“忽略”这三个按钮对消息内容处理的逻辑如果小伙伴需要可根据自己的需要修改。我这里定义如下•确定通常处理通知消息处理仅仅是从消息列表中移除该项不做其他行为。•接受是处理交互类型的按钮处理从消息列表中移除该项且触发其他业务处理行为。•忽略处理所有类型消息只是不显示在UI中但还会存在于消息列表中下次或空闲时间处理消息。
http://wiki.neutronadmin.com/news/142633/

相关文章:

  • 重庆网站托管wordpress名站
  • 丹阳市住房和城乡建设局网站wordpress 调用文章
  • 张氏万家网站建设青岛网站建设哪个平台好
  • 怎么制作网站教程南昌网站开发公司哪家公司好
  • 手机百度关键词排名 seo网站优化软件前端学校网站开发视频教程
  • 网站建设太金手指六六二七wordpress 置顶标签
  • 免费网站建设免费咨询代做毕业设计网站家具设计
  • 维度网络网站建设二级域名怎么注册
  • 邯郸市建设局查中级职称网站嵌入式培训推荐
  • 做商城网站的流程商城网站设计企业
  • 印度做网站专业类搜题软件
  • 郑州网站建设哪家公司好网站 防止采集
  • 做水果网站行pro wordpress theme development
  • 做分类信息网站代码网站策划过程
  • 新手自学网站网站开发商品排序逻辑
  • 做刀模网站wordpress调用产品图片
  • 网站网页区别是什么意思杭州网站建设培训班
  • Wordpress微信支付接口神马快速排名优化工具
  • 图片外链上传网站一个人做网站的难度
  • 学校网站源码html网站seo推广排名
  • 网站建设手机字体大小诸城做网站
  • 厦门做网站的公司适合vue做的网站类型
  • 做外文翻译的网站网站开发拒绝通知书
  • 推荐网站建设服务话术网页制作与设计实训
  • 做网站年薪百万做app网站的软件叫什么名字吗
  • 有哪些建设网站的大公司推荐个2021能看的网站免费
  • 软件开发的职业规划1000免费智能seo收录工具
  • 卯兔科技网站建设网站建设大赛
  • 大良营销网站建设方案厦门集美网站建设
  • 网站开发找哪个怎么验证网站备案密码是否正确