Xceed DataGrid for Silverlight Documentation
ColumnBackgroundControlStyle Property (DataGridControl)
Example 


Gets or sets the style that will be applied to all column-background controls.
Syntax
'Declaration
 
Public Property ColumnBackgroundControlStyle As Style
'Usage
 
Dim instance As DataGridControl
Dim value As Style
 
instance.ColumnBackgroundControlStyle = value
 
value = instance.ColumnBackgroundControlStyle
public Style ColumnBackgroundControlStyle {get; set;}

Property Value

The Style that will be applied to all column-background controls. The specified style must target the ColumnBackgroundControl type (see TargetType property of Style class) otherwise an exception will be thrown.
Example
<Style TargetType="sldg:ColumnBackgroundControl" >
   <Style.Setters>
      <Setter Property="Background"
              Value="Red"/>
   </Style.Setters>
</Style>
<!--Add the Column's title vertically in background-->
<Style TargetType="sldg:ColumnBackgroundControl">
   <Style.Setters>
      <Setter Property="Template">
         <Setter.Value>
            <ControlTemplate TargetType="sldg:ColumnBackgroundControl">
               <Grid>
                  <Canvas VerticalAlignment="Bottom">
                     <TextBlock Text="{Binding Title}"
                                FontSize="55"
                                Opacity="0.2"
                                Padding="20,0,0,0">
                        <TextBlock.RenderTransform>
                           <RotateTransform Angle="-90"/>
                        </TextBlock.RenderTransform>
                     </TextBlock>
                  </Canvas>
               </Grid>
            </ControlTemplate>
         </Setter.Value>
      </Setter>
   </Style.Setters>
</Style>
Requirements

Target Platforms: Windows 7, Windows Vista, Windows XP SP3, Windows Server 2008 family

See Also

Reference

DataGridControl Class
DataGridControl Members

Send Feedback