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 ...
随机推荐
- matplotlib图表介绍
Matplotlib 是一个python 的绘图库,主要用于生成2D图表. 常用到的是matplotlib中的pyplot,导入方式import matplotlib.pyplot as plt 一. ...
- 一切皆组件的Flutter,安能辨我是雄雌
从一开始接触Flutter,相信读者都会铭记一句话,那就是--一切皆组件.今天我们就来体会一下这句话的神奇魔力,我们先从实际的产品需求说起. 我们先来看一个简化的运行图: 我们要实现如上图所示的日期选 ...
- C语言中的 “>>”与“<<”
1. ">>" int x = 16; printf("%d\n", x >> 1); 先将x转成二进制 10000, 不读最后一位, ...
- 微服务迁移记(五):WEB层搭建(3)-FreeMarker集成
一.redis搭建 二.WEB层主要依赖包 三.FeignClient通用接口 以上三项,参考<微服务迁移记(五):WEB层搭建(1)> 四.SpringSecurity集成 参考:< ...
- Sqlite3 实现学生信息增删改查
import sqlite3 conn = sqlite3.connect('studentsdb.db') # 连接数据库 cursor = conn.cursor( ) # 创建数据表 def c ...
- activiti7 获取流程定义的xml
RepositoryService repositoryService = ProcessEngines.getDefaultProcessEngine().getRepositoryService( ...
- Python os.read() 方法
概述 os.read() 方法用于从文件描述符 fd 中读取最多 n 个字节,返回包含读取字节的字符串,文件描述符 fd对应文件已达到结尾, 返回一个空字符串.高佣联盟 www.cgewang.com ...
- Dynamics365 Field Service Work Order Theory
Come from :https://neilparkhurst.com/2016/08/20/field-service-work-order-theory/ In this post I aim ...
- Linux的VMWare14中配置Centos7桥接网络环境(网络一)
1.查看当前初始环境如下:在windows端先查看本机ip ifconfig
- 求解最长递增子序列(LIS) | 动态规划(DP)+ 二分法
1.题目描述 给定数组arr,返回arr的最长递增子序列. 2.举例 arr={2,1,5,3,6,4,8,9,7},返回的最长递增子序列为{1,3,4,8,9}. 3.解答 ...