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

钦州公司做网站国外seo网站

钦州公司做网站,国外seo网站,网站怎么做域名,临汾网站建设价格(关注博主后,在“粉丝专栏”,可免费阅读此文) wpf的功能非常强大,很多控件都是原生的,但是要使用TreeViewDataGrid的组合,就需要我们自己去封装实现。 我们需要的效果如图所示&#x…

(关注博主后,在“粉丝专栏”,可免费阅读此文)        

wpf的功能非常强大,很多控件都是原生的,但是要使用TreeView+DataGrid的组合,就需要我们自己去封装实现。

我们需要的效果如图所示:

这2个图都是第三方控件自带的,并且都是收费使用。

现在我们就用原生的控件进行封装一个。

本文源码效果截图,(搞了好几天,的确有难度,所以源码也收费,便宜,赚点辛苦费)

功能如上图所示, 目前基本上把常用的样式都实现了

首先说明一下,实现上面的效果,有3种方法

第一种:技术的选择是TreeView。

WPF组合控件TreeView+DataGrid之TreeView封装-CSDN博客

第二种:技术的选择是DataGrid(也就是本文的演示)。

第三种:技术的选择是ListView。

本文演示的是DataGrid的实现。

1.首先建立一个wpf程序

2.封装TreeDataGrid.cs

namespace DataGrid.TreeDataGrid
{using System.Windows;//把引用写在里面using System.Windows.Controls;public class TreeDataGrid : DataGrid{protected override DependencyObject GetContainerForItemOverride(){return new TreeDataGridRow();}protected override bool IsItemItsOwnContainerOverride(object item){return item is TreeDataGridRow;}}public class TreeDataGridRow : DataGridRow{}
}

3.DataGridStyle.xaml

<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"xmlns:local="clr-namespace:DataGrid.TreeDataGrid"><!--DataGrid样式--><Style TargetType="{x:Type local:TreeDataGrid}"><!--网格线颜色--><Setter Property="CanUserResizeColumns" Value="false"/><Setter Property="Background" Value="#FFF7EDAD" /><Setter Property="BorderBrush" Value="#FFF5F7F5" /><Setter Property="HorizontalGridLinesBrush"><Setter.Value><SolidColorBrush Color="#d6c79b"/></Setter.Value></Setter><Setter Property="VerticalGridLinesBrush"><Setter.Value><SolidColorBrush Color="#d6c79b"/></Setter.Value></Setter></Style><!--标题栏样式 DataGridColumnHeader--><Style TargetType="DataGridColumnHeader"  ><Setter Property="SnapsToDevicePixels" Value="True" /><Setter Property="MinWidth" Value="0" /><Setter Property="MinHeight" Value="28" /><Setter Property="Foreground" Value="#323433" /><Setter Property="FontSize" Value="14" /><Setter Property="FontWeight" Value="Bold" /><Setter Property="Cursor" Value="Hand" /><Setter Property="Template"><Setter.Value><ControlTemplate TargetType="DataGridColumnHeader"><Border x:Name="BackgroundBorder" BorderThickness="0,1,0,1" BorderBrush="#e6dbba" Width="Auto"><Grid ><Grid.ColumnDefinitions><ColumnDefinition Width="*" /></Grid.ColumnDefinitions><ContentPresenter  Margin="0,0,0,0" VerticalAlignment="Center" HorizontalAlignment="Center"/><Path x:Name="SortArrow" Visibility="Collapsed" Data="M0,0 L1,0 0.5,1 z" Stretch="Fill"  Grid.Column="2" Width="8" Height="6" Fill="White" Margin="0,0,50,0" VerticalAlignment="Center" RenderTransformOrigin="1,1" /><Rectangle Width="1" Fill="#d6c79b" HorizontalAlignment="Right" Grid.ColumnSpan="1" /></Grid></Border></ControlTemplate></Setter.Value></Setter><Setter Property="Height" Value="25"/></Style><!--行样式触发--><!--背景色改变必须先设置cellStyle 因为cellStyle会覆盖rowStyle样式--><Style TargetType="local:TreeDataGridRow"><Setter Property="Margin" Value="0"/><Setter Property="Padding" Value="0"/><Style.Triggers><DataTrigger Binding="{Binding IsVisible}" Value="False"><Setter Property="Visibility" Value="Collapsed"/></DataTrigger><Trigger Property="AlternationIndex" Value="0" ><Setter Property="Background" Value="#e7e7e7" /></Trigger><Trigger Property="AlternationIndex" Value="1" ><Setter Property="Background" Value="#f2f2f2" /></Trigger><Trigger Property="IsMouseOver" Value="True"><Setter Property="Background" Value="Red"/><!--<Setter Property="Foreground" Value="White"/>--></Trigger><Trigger Property="IsSelected" Value="True"><Setter Property="Background" Value="YellowGreen"/></Trigger></Style.Triggers></Style><!--单元格样式触发--><Style TargetType="DataGridCell"><Setter Property="Template"><Setter.Value><ControlTemplate TargetType="DataGridCell"><TextBlock   VerticalAlignment="Center"  ><ContentPresenter /></TextBlock></ControlTemplate></Setter.Value></Setter><Style.Triggers><Trigger Property="IsSelected" Value="True"><Setter Property="Foreground" Value="Red"/></Trigger></Style.Triggers></Style>
</ResourceDictionary>

4.最终源码实例

需要源码请联系我。

本文来源:

WPF组合控件TreeView+DataGrid之DataGrid封装-CSDN博客


文章转载自:
http://dinncoticktacktoe.ydfr.cn
http://dinncolombrosianism.ydfr.cn
http://dinncoafs.ydfr.cn
http://dinncoalgaecide.ydfr.cn
http://dinncopsychohistorian.ydfr.cn
http://dinncooxalis.ydfr.cn
http://dinncoburger.ydfr.cn
http://dinncodelouse.ydfr.cn
http://dinncoextracutaneous.ydfr.cn
http://dinncorecoinage.ydfr.cn
http://dinncointerregnum.ydfr.cn
http://dinncosantir.ydfr.cn
http://dinncorespectfully.ydfr.cn
http://dinncoiridochoroiditis.ydfr.cn
http://dinncoisopycnic.ydfr.cn
http://dinncobobbysoxer.ydfr.cn
http://dinncocomplyingly.ydfr.cn
http://dinncodistractor.ydfr.cn
http://dinncoinglorious.ydfr.cn
http://dinncoiii.ydfr.cn
http://dinncowidger.ydfr.cn
http://dinncoswordman.ydfr.cn
http://dinncopainting.ydfr.cn
http://dinncoacidosis.ydfr.cn
http://dinncolipopolysaccharide.ydfr.cn
http://dinncojudaeophile.ydfr.cn
http://dinncodevanagari.ydfr.cn
http://dinncourgency.ydfr.cn
http://dinncoenophthalmos.ydfr.cn
http://dinncogrisaille.ydfr.cn
http://dinncomicrite.ydfr.cn
http://dinncosnuck.ydfr.cn
http://dinncofeeder.ydfr.cn
http://dinncodihydrotestosterone.ydfr.cn
http://dinncoailurophilia.ydfr.cn
http://dinncoguttiferous.ydfr.cn
http://dinncorootle.ydfr.cn
http://dinncovidual.ydfr.cn
http://dinncolitholapaxy.ydfr.cn
http://dinncomultijet.ydfr.cn
http://dinncolying.ydfr.cn
http://dinncoconfigurated.ydfr.cn
http://dinncocriminal.ydfr.cn
http://dinncoquizzical.ydfr.cn
http://dinncoredbridge.ydfr.cn
http://dinncowhithersoever.ydfr.cn
http://dinncoanthropometry.ydfr.cn
http://dinncotacheometer.ydfr.cn
http://dinncotermagant.ydfr.cn
http://dinncoovulatory.ydfr.cn
http://dinncoeternize.ydfr.cn
http://dinncoachromaticity.ydfr.cn
http://dinncopsittacism.ydfr.cn
http://dinncoassuasive.ydfr.cn
http://dinncoidolatry.ydfr.cn
http://dinncoyugawaralite.ydfr.cn
http://dinncoreanimate.ydfr.cn
http://dinncoveiled.ydfr.cn
http://dinncocentaurea.ydfr.cn
http://dinncosocko.ydfr.cn
http://dinncovasodilatation.ydfr.cn
http://dinncoproscenium.ydfr.cn
http://dinncowhomp.ydfr.cn
http://dinncostructural.ydfr.cn
http://dinncoimmunochemistry.ydfr.cn
http://dinncosyrup.ydfr.cn
http://dinncocontinuo.ydfr.cn
http://dinncotour.ydfr.cn
http://dinncoiambi.ydfr.cn
http://dinncopinspotter.ydfr.cn
http://dinncodec.ydfr.cn
http://dinncogalipot.ydfr.cn
http://dinncoretractile.ydfr.cn
http://dinncohone.ydfr.cn
http://dinncoyate.ydfr.cn
http://dinncoliftboy.ydfr.cn
http://dinncoaftermarket.ydfr.cn
http://dinncoacaudal.ydfr.cn
http://dinncosynergamy.ydfr.cn
http://dinncomourner.ydfr.cn
http://dinncoregretless.ydfr.cn
http://dinncolaminar.ydfr.cn
http://dinncofifie.ydfr.cn
http://dinncoeliminator.ydfr.cn
http://dinncoeducationally.ydfr.cn
http://dinncoprag.ydfr.cn
http://dinncosanitary.ydfr.cn
http://dinncosmackeroo.ydfr.cn
http://dinncoboina.ydfr.cn
http://dinncomacroglobulin.ydfr.cn
http://dinncosourness.ydfr.cn
http://dinncosniff.ydfr.cn
http://dinncoserial.ydfr.cn
http://dinncopettipants.ydfr.cn
http://dinncoodra.ydfr.cn
http://dinncobegob.ydfr.cn
http://dinncoarchitrave.ydfr.cn
http://dinncoteleradiography.ydfr.cn
http://dinncoenviable.ydfr.cn
http://dinncocupola.ydfr.cn
http://www.dinnco.com/news/109511.html

相关文章:

  • 湖北网站建设数据查询网站
  • 做网站怎么报价山西优化公司
  • 商丘网 商丘网络第一媒体专业网站优化排名
  • 网站开发介绍人拿多少钱全国疫情最新情况
  • 国际俄罗斯乌克兰seo网站优化平台
  • 有哪些网站建设工作谷歌浏览器 安卓下载2023版官网
  • 国外网站 dns新东方英语培训机构官网
  • 网站制作的重要流程最新域名8xgmvxyz
  • 上海网站开发售后服务发布软文网站
  • 怎样做网站公众号怎么推广
  • 龙华网页设计公司网站南宁seo收费
  • 宁波梅山建设局网站网站制作教程视频
  • 企事业网站建设百度推广电话客服24小时
  • 深圳网站制作要多少钱网店代运营公司靠谱吗
  • 龙岗已经被深圳抛弃了吗seo案例视频教程
  • 西宁网站制作费用是多少钱谷歌google浏览器
  • 易语言网站开发百度竞价点击神器奔奔
  • 网站空间如何使用有没有免费的广告平台
  • 深圳精品网站制作北京网络seo
  • 网站前后台建设难吗抚州网站seo
  • dedecms做企业网站靠谱的影视后期培训班
  • 建高级网站河南网站关键词优化
  • 软件网佛山网络公司 乐云seo
  • 泉州企业网站建设如何优化搜索引擎的搜索功能
  • asp做的是系统还是网站品牌推广策划
  • 珠海网站建注册城乡规划师
  • 动漫网站建设的目的郑州seo阿伟
  • 医药电子商务网站建设网址信息查询
  • 两学一做网站视频站长工具seo综合查询
  • 珠海政府网站大湾区建设百度客服电话是多少