DataGrid添加进度条列
DataGridColumn类型的继承树 DataGridColumn的派生类: 一般情况下DataGridBoundColumn和DataGridComboBoxColumn足以满足多数列的样式,如果需要自定义列样式,则可以使用DataGridTemplateColumn类型
<DataGrid x:Name="mygrid" VerticalAlignment="Top" AutoGenerateColumns="False" Foreground="White" Background="Transparent" Margin="0,20,0,0"
RowBackground="Transparent" GridLinesVisibility="All" HorizontalGridLinesBrush="Transparent" VerticalGridLinesBrush="Transparent" BorderBrush="Transparent"
VerticalContentAlignment="Center" HorizontalContentAlignment="Center" FontSize="14.5" RowHeaderWidth="0" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden"
EnableColumnVirtualization="True" EnableRowVirtualization="True" ItemsSource="{Binding UnitHost}" ColumnHeaderStyle="{StaticResource ParkColumnHeader}">
<DataGrid.Resources>
<SolidColorBrush x:Key="{x:Static SystemColors.InactiveSelectionHighlightBrushKey}" Color="Yellow"/>
</DataGrid.Resources>
<DataGrid.RowStyle>
<Style TargetType="DataGridRow">
<Setter Property="Height" Value="40"></Setter>
</Style>
</DataGrid.RowStyle>
<DataGrid.Columns>
<DataGridTextColumn Header="停车场名称" Width="200" Binding="{Binding name}" ElementStyle="{StaticResource ResourceKey=DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn Header="已使用" Width="110" Binding="{Binding used}" ElementStyle="{StaticResource ResourceKey=DataGridTextColumnCenterSytle}"/>
<DataGridTextColumn Header="未使用" Width="110" Binding="{Binding notused}" ElementStyle="{StaticResource ResourceKey=DataGridTextColumnCenterSytle}"/>
<DataGridTemplateColumn Header="使用占比" Width="200" >
<DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<ProgressBar Value="{Binding ratio}" Background="#4C717171" BorderBrush="Transparent" Height="20"/>
</DataTemplate>
</DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
<DataGridTextColumn Header=" " Width="80" Binding="{Binding ratioValue}" Foreground="#ec6941" ElementStyle="{StaticResource ResourceKey=DataGridTextColumnCenterSytle}"/>
</DataGrid.Columns>
</DataGrid>
DataGrid添加进度条列的更多相关文章
- QTableView 添加进度条
记录一下QTableView添加进度条 例子很小,仅供学习 使用QItemDelegate做的实现 有自动更新进度 要在.pro文件里添加 CONFIG += c++ ProgressBarDeleg ...
- struts2上传文件添加进度条
给文件上传添加进度条,整了两天终于成功了. 想要添加一个上传的进度条,通过分析,应该是需要不断的去访问服务器,询问上传文件的大小.通过已上传文件的大小, 和上传文件的总长度来评估上传的进度. 实现监听 ...
- Flex DataGrid 添加控件
哈喽,又和大家见面了.今天要写的东西是关于Flex DataGrid添加“编辑”或“删除”按钮. 下面是部分代码: <mx:DataGrid id="dgShow" x=&q ...
- easyui datagrid显示进度条控制操作
在当我们需要控制时间前台实际项目页面datagrid显示进度条的数据加载时运行,和datagrid默认情况下只在有url加载运行时的数据显示方式的进度条.下面的代码手动控制: 打开一个进度条: $(' ...
- EasyUI DataGrid 添加 Footer
做后台管理界面时,EasyUI 的 DataGrid 经常会被用到,有时候一些总的统计数据不合适放在数据表格里,需要单独显示,这时候就可以放在Footer中显示而不必另外布局. 该怎么给 DataGr ...
- datagrid 添加、修改、删除(转载)
原链接:JQueryEasyUI学习笔记(十)datagrid 添加.修改.删除 基于datagrid框架的删除.添加与修改: 主要是批量删除,双击表单修改.选中行修改,增加行修改,再有就是扩展edi ...
- EasyUI添加进度条
EasyUI添加进度条 添加进度条重点只有一个,如何合理安排进度刷新与异步调用逻辑,假如我们在javascript代码中通过ajax或者第三方框架dwr等对远程服务进行异步调用,实现进度条就需要做到以 ...
- WPF DataGrid添加编号列
WPF DataGrid添加编号列? 第一步:<DataGridTemplateColumn Header="编号" Width="50" MinWidt ...
- c#devexpress GridContorl添加进度条
demo 的实现图 下边是步骤和代码 1定义 时钟事件,定时的增加进度条的增量. 2: 添加进度条 3;定义字段属性 using System; using System.Collections.G ...
随机推荐
- MacOS 键盘符号和修饰键说明
原文链接:https://www.cnblogs.com/exmyth/p/5949192.html Mac键盘符号和修饰键说明 ⌘ Command ⇧ Shift ⌥ Option ⌃ Cont ...
- PHP prev() 函数
实例 输出数组中的当前元素.下一个元素和上一个元素的值: <?php$people = array("Peter", "Joe", "Glenn ...
- PHP mysqli_select_db() 函数
更改连接的默认数据库: 删除数据库 <?php高佣联盟 www.cgewang.com // 假定数据库用户名:root,密码:123456,数据库:RUNOOB $con=mysqli_con ...
- Codeforces Round #649 (Div. 2) E. X-OR 交互 二进制 随机 期望
LINK:X-OR 本来是应该昨天晚上发的 可是昨天晚上 做这道题 写了一个分治做法 一直wa 然后查错 查不出来 心态崩了 想写对拍 发现交互库自己写不出来. 一系列sb操作 == 我都醉了. 今天 ...
- Typora + PicGo-Core + Custom Command 实现上传图片到图床
教程参考 Typora+PicGo-Core(command line)+Gitee实现图片上传到图床 主要借鉴 picgo 操作命令 Typora + PicGo + Gitee 实现图片自动上传到 ...
- linux的用户扩充权限管理acl和用户使用系统资源的限制
用户扩充权限管理 acl 1.扩充权限的方式 文件扩充权限 ACL 磁盘配额 2.文件扩充权限 1.安全位 安全位 ---set位 SUID SGID set仅可以加给 u.g, 如: ...
- Spring学习总结(3)-了解Spring框架
Spring的核心Jar包 在Spring4的官方文档里,提到了Sping的核心包是:spring-context,只要引用了这个jar包,就可以实现Spring90%的基础功能.maven引用如下: ...
- Centos7 如何通过win10 的远程桌面连接进行远程访问
首先,如果安装测centos7是已经安装了GNOME 或者 KDE 桌面, 则只需要再安装xrdp就可以了. 直接通过yum install xrdp 是不行的,因为xrdp 不在默认源中 先配置 ...
- CentOS 7.0防火墙设置
CentOS 7.0默认使用的是firewall作为防火墙,这里改为iptables防火墙.1.关闭firewall:systemctl stop firewalld.servicesystemctl ...
- JavaScript的continue、break和return的区别
1. continue.break和return的区别 循环遍历. for(let i = 0; i < 5; i++){ console.log(i); // 0 1 2 3 4 } 使用co ...