效果图

<UserControl x:Class="SilverlightApplication7.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
xmlns:vsm="clr-namespace:System.Windows;assembly=System.Windows"
mc:Ignorable="d"
d:DesignHeight="" d:DesignWidth=""> <UserControl.Resources> <Style x:Key="TextBlockHeaderCellStyle" TargetType="telerik:GridViewHeaderCell">
<Setter Property="Background" Value="#EAEFF0" />
<Setter Property="BorderBrush" Value="#D8E5EC" />
<Setter Property="BorderThickness" Value="" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
<Setter Property="Padding" Value="5,0,3,0" />
<Setter Property="Foreground" Value="Black" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="telerik:GridViewHeaderCell">
<Grid x:Name="PART_HeaderCellGrid"> <Border x:Name="GridViewHeaderCell" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}">
<Border BorderBrush="Transparent" Background="{TemplateBinding Background}" BorderThickness="" />
</Border> <ContentControl x:Name="ContentPresenter" Foreground="{TemplateBinding Foreground}"
Margin="{TemplateBinding Padding}" IsTabStop="{TemplateBinding IsTabStop}"
Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalContentAlignment="Stretch" HorizontalContentAlignment="Stretch"/>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style> </UserControl.Resources> <Grid Background="White" Margin="">
<telerik:RadGridView x:Name="gridUser" FontWeight="Bold" Height="Auto" ShowGroupPanel="False" Background="#FFFFFF" BorderBrush="#FFFFFF"
CanUserReorderColumns="False" CanUserSortColumns="False" CanUserFreezeColumns="False" AutoGenerateColumns="False"
AreRowDetailsFrozen="False" SelectionMode="Single" RowIndicatorVisibility="Collapsed" IsReadOnly="True"
HorizontalAlignment="Stretch" VerticalAlignment="Top">
<telerik:RadGridView.Columns> <telerik:GridViewDataColumn Header="用 户" DataMemberBinding="{Binding userName}" HeaderCellStyle="{StaticResource TextBlockHeaderCellStyle}" HeaderTextAlignment="Center" TextAlignment="Left" Width="1*" /> <telerik:GridViewDataColumn Header="地 址" DataMemberBinding="{Binding userAdd}" HeaderCellStyle="{StaticResource TextBlockHeaderCellStyle}" HeaderTextAlignment="Center" TextAlignment="Left" Width="1*" /> </telerik:RadGridView.Columns>
</telerik:RadGridView>
</Grid>
</UserControl>

Silverlight RadGridView的HeaderCellStyle样式的更多相关文章

  1. WPF,SilverLight中直线的样式示例

    原文:WPF,SilverLight中直线的样式示例 XAML代码:// LineStyle.xaml<Viewbox Width="600" Height="50 ...

  2. Silverlight button 图片切换样式

    之前一直做WPF现在开始接触Slilverlight感触很多. 今天做一个Button要求 有两个图片,button默认有一个图片,鼠标over时用另一个图片, 用wpf做的时候写一个template ...

  3. silverlight RadGridView总结二(转载)

    系列二    实现RadGridView行中添加不同控件,并在控件中绑定不同的数据源    先上一段前台代码 <telerik:RadGridView Grid.Row="2" ...

  4. Silverlight C#动态设置样式

    1.从页面资源中获取样式并应用 btnTest.Style = (Style)this.Resources["BigButtonStyle"] 2.从项目中单独分开的资源字典文件( ...

  5. silverlight 控件自定义样式 实现方法

    1:在app.xaml中加入需实现的样式,如: <Application.Resources> <Style x:Key="NodeStyle" TargetTy ...

  6. silverlight RadGridView总结三(转载)

    在RadGridView中进行分组以及导出 分组 主要是在前台进行分组的定义: 前台代码: <telerik:RadGridView x:Name="RadGridView1" ...

  7. silverlight RadGridView总结系列(转载)

    系列一. RadGridView常用属性总结    1.不可编辑----IsReadOnly="True".    2.不自动增加行----AutoGenerateColumns= ...

  8. 非常精彩的Silverlight 2控件样式

    概述 大家是否觉的现在Silverlight 2提供的默认的控件不能满足自己的要求?好在Silverlight的控件可以运用皮肤,微软Silverlight控件的设计者的主管Corrina开发了几套非 ...

  9. silverlight RadGridView 动态添加数据列

    public void BindFaultGridInfo(IList<HealthStatusApp.Web.Models.FaultMajorModel> list) { rg_Fau ...

随机推荐

  1. [Flex] PopUpButton系列 —— 打开和关闭弹出菜单

    <?xml version="1.0" encoding="utf-8"?><!--响应打开和关闭弹出菜单的例子 PopUpButtonOpe ...

  2. [Flex] ButtonBar系列——皮肤和外观设置

    <?xml version="1.0" encoding="utf-8"?> <s:Application xmlns:fx="ht ...

  3. JAVA中集合输出的四种方式

    在JAVA中Collection输出有四种方式,分别如下: 一) Iterator输出. 该方式适用于Collection的所有子类. public class Hello { public stat ...

  4. SQL游标 更新

    --定义游标 DECLARE cur_getaddress CURSOR FOR SELECT new_a ,new_b ,new_c ,new_d FROM table WHERE (new_a i ...

  5. http://host:8399/arcgis/rest/services/ 访问不了

    一.问题: 安装完arvserver后,rest服务http://host:8399/arcgis/rest/services/访问不了 二.问题原因: 查看了一下manager日志,其中记录了几个r ...

  6. C Primer Plus(第五版)7

    第 7 章 C 控制语句:分支和跳转 在本章中你将学习下列内容: · 关键字:if(如果),else(否则),switch(切换),continue(继续),break(中断), case(情况),d ...

  7. Configure apt-get / git/ curl to use a proxy (Ubuntu)

    http://technoblog.org/2009/07/configure-apt-get-to-use-a-proxy-ubuntu/ Open the following configurat ...

  8. GoldenGate: Extract Abend with Detect Inconsistency in Pdata (文档 ID 1355067.1)

    APPLIES TO: Oracle GoldenGate - Version 10.4.0.0 and laterInformation in this document applies to an ...

  9. 使用Kinect2.0获取点云以在GLUT中显示

    这篇文章用来记录Kinect2.0如何生成点云. 以下示例源自Kinect提供的example修改完成,其名称会在小标题下方注解. 首先,要获取点云需要获取图像的深度数据和颜色数据.最后再将深度数据与 ...

  10. Laxcus大数据管理系统2.0(2)- 第一章 基础概述 1.1 基于现状的一些思考

    第一章 基础概述 1.1 基于现状的一些思考 在过去十几年里,随着互联网产业的普及和高速发展,各种格式的互联网数据也呈现爆炸性增长之势.与此同时,在数据应用的另一个重要领域:商业和科学计算,在各种新兴 ...