In the past I have been using a style snippet I found on this forum to help get rid of the default cell highlighting in my gridviews. I just upgraded to Q2 2010, and the code does not compile any more - it appears AlignmentContentPresenter has been marked obsolete and removed. How can I achieve the same functionality with this new version? Here is the code I use in my styles.xaml:
<
LinearGradientBrush
x:Key
=
"GridViewRowSelectedCell"
EndPoint
=
"0.5,1"
StartPoint
=
"0.5,0"
>
<
GradientStop
Color
=
"#FFFFFDF9"
Offset
=
"0"
/>
<
GradientStop
Color
=
"#FFFFEDC7"
Offset
=
"1"
/>
</
LinearGradientBrush
>
<
SolidColorBrush
x:Key
=
"GridViewDisabledBackground"
Color
=
"#FFEEEEEE"
/>
<
SolidColorBrush
x:Key
=
"GridViewDisabledBorderBrush"
Color
=
"#FFBBBBBB"
/>
<
ControlTemplate
x:Key
=
"GridViewCellTemplate"
TargetType
=
"RadGrid:GridViewCell"
>
<
Border
x:Name
=
"PART_CellBorder"
Background
=
"{TemplateBinding Background}"
BorderBrush
=
"{TemplateBinding BorderBrush}"
BorderThickness
=
"{TemplateBinding BorderThickness}"
>
<
VisualStateManager.VisualStateGroups
>
<
VisualStateGroup
x:Name
=
"CommonStates"
>
<
VisualState
x:Name
=
"Normal"
/>
<
VisualState
x:Name
=
"Current"
>
<
Storyboard
>
<
ObjectAnimationUsingKeyFrames
Storyboard.TargetName
=
"PART_CellBorder"
Storyboard.TargetProperty
=
"Background"
>
<
DiscreteObjectKeyFrame
KeyTime
=
"0:0:0"
>
<
DiscreteObjectKeyFrame.Value
>
<
LinearGradientBrush
EndPoint
=
"0.5,1"
StartPoint
=
"0.5,0"
>
<
GradientStop
Color
=
"#00FFFDF9"
Offset
=
"0"
/>
<
GradientStop
Color
=
"#00FFEDC7"
Offset
=
"1"
/>
</
LinearGradientBrush
>
</
DiscreteObjectKeyFrame.Value
>
</
DiscreteObjectKeyFrame
>
</
ObjectAnimationUsingKeyFrames
>
</
Storyboard
>
</
VisualState
>
</
VisualStateGroup
>
<
VisualStateGroup
x:Name
=
"EditingStates"
>
<
VisualState
x:Name
=
"Edited"
>
<
Storyboard
>
<
ObjectAnimationUsingKeyFrames
Storyboard.TargetName
=
"PART_ContentPresenter"
Storyboard.TargetProperty
=
"Margin"
>
<
DiscreteObjectKeyFrame
KeyTime
=
"0:0:0"
Value
=
"0"
/>
</
ObjectAnimationUsingKeyFrames
>
<
ObjectAnimationUsingKeyFrames
Storyboard.TargetName
=
"PART_ContentPresenter"
Storyboard.TargetProperty
=
"VerticalAlignment"
>
<
DiscreteObjectKeyFrame
KeyTime
=
"0:0:0"
Value
=
"Stretch"
/>
</
ObjectAnimationUsingKeyFrames
>
</
Storyboard
>
</
VisualState
>
<
VisualState
x:Name
=
"Display"
/>
</
VisualStateGroup
>
<
VisualStateGroup
x:Name
=
"DisabledStates"
>
<
VisualState
x:Name
=
"Enabled"
/>
<
VisualState
x:Name
=
"Disabled"
>
<
Storyboard
>
<
ObjectAnimationUsingKeyFrames
Storyboard.TargetName
=
"PART_CellBorder"
Storyboard.TargetProperty
=
"Background"
>
<
DiscreteObjectKeyFrame
KeyTime
=
"0"
Value
=
"{StaticResource GridViewDisabledBackground}"
/>
</
ObjectAnimationUsingKeyFrames
>
<
ObjectAnimationUsingKeyFrames
Storyboard.TargetName
=
"PART_CellBorder"
Storyboard.TargetProperty
=
"BorderBrush"
>
<
DiscreteObjectKeyFrame
KeyTime
=
"0"
Value
=
"{StaticResource GridViewDisabledBorderBrush}"
/>
</
ObjectAnimationUsingKeyFrames
>
</
Storyboard
>
</
VisualState
>
</
VisualStateGroup
>
</
VisualStateManager.VisualStateGroups
>
<
RadGrid:AlignmentContentPresenter
x:Name
=
"PART_ContentPresenter"
HorizontalAlignment
=
"{TemplateBinding HorizontalContentAlignment}"
Margin
=
"{TemplateBinding Padding}"
VerticalAlignment
=
"{TemplateBinding VerticalContentAlignment}"
Visibility
=
"Visible"
Foreground
=
"{TemplateBinding Foreground}"
TextAlignment
=
"{TemplateBinding TextAlignment}"
TextDecorations
=
"{TemplateBinding TextDecorations}"
TextWrapping
=
"{TemplateBinding TextWrapping}"
Content
=
"{TemplateBinding Content}"
ContentTemplate
=
"{TemplateBinding ContentTemplate}"
/>
</
Border
>
</
ControlTemplate
>
<
SolidColorBrush
x:Key
=
"GridLinesFill"
Color
=
"#FFB3B3B3"
/>
<
Style
x:Key
=
"GridViewCellStyle"
TargetType
=
"RadGrid:GridViewCell"
>
<
Setter
Property
=
"Template"
Value
=
"{StaticResource GridViewCellTemplate}"
/>
<
Setter
Property
=
"Padding"
Value
=
"5,0,3,0"
/>
<
Setter
Property
=
"BorderBrush"
Value
=
"{StaticResource GridLinesFill}"
/>
<
Setter
Property
=
"BorderThickness"
Value
=
"0,0,1,0"
/>
<
Setter
Property
=
"VerticalContentAlignment"
Value
=
"Center"
/>
<
Setter
Property
=
"HorizontalContentAlignment"
Value
=
"Stretch"
/>
<
Setter
Property
=
"Background"
Value
=
"Transparent"
/>
</
Style
>
Thanks in advance for your help.