Silverlight Controls and Silverlight Toolkithttp://forums.silverlight.net//35.aspx/1?Silverlight+Controls+and+Silverlight+ToolkitDiscussions around using and developing Silverlight controls and the Silverlight ToolkitMon, 01 Jan 0001 00:00:00 -050035111391http://forums.silverlight.net//p/38706/111391.aspx/1?DataGrid+ColumnStyle+questionDataGrid ColumnStyle question <p>Hi folks,</p> <p>&nbsp;I have problem with the DataGrid styling because I couldn't find the place where I can style the remaining space after the last colums in the header. Just have a look at my screenshot and you can easily see what the problem is. </p> <p><u><font color="#800080"><a href="http://pvrzqw.bay.livefilestore.com/y1pdJj04Jgsd-17o9fp6UfAU3F8uAGcnYzQGYqQkatZVkyI8Y6D_MjfrthBoi5cyGVTJZiob9_q10o/DataGridStyling.JPG">http://pvrzqw.bay.livefilestore.com/y1pdJj04Jgsd-17o9fp6UfAU3F8uAGcnYzQGYqQkatZVkyI8Y6D_MjfrthBoi5cyGVTJZiob9_q10o/DataGridStyling.JPG</a></font></u><a href="http://cid-d9969a7a68650af6.skydrive.live.com/embedrowdetail.aspx/%c3%96ffentlich/DataGridStyling.JPG"></a></p> <p><img title="DataGridStyle" alt="DataGridStyle" src="http://pvrzqw.bay.livefilestore.com/y1pdJj04Jgsd-17o9fp6UfAU3F8uAGcnYzQGYqQkatZVkyI8Y6D_MjfrthBoi5cyGVTJZiob9_q10o/DataGridStyling.JPG" align="middle" style="width:754px; height:616px"></p> <p>&nbsp;</p> 2008-10-16T23:32:31-04:00112454http://forums.silverlight.net//p/38706/112454.aspx/1?Re+DataGrid+ColumnStyle+questionRe: DataGrid ColumnStyle question <p>Hi,</p> <p>Is this RC0?&nbsp; This bug has been fixed in RTW build.&nbsp; Please give it a try.</p> 2008-10-18T12:54:07-04:00112642http://forums.silverlight.net//p/38706/112642.aspx/1?Re+Re+DataGrid+ColumnStyle+questionRe: Re: DataGrid ColumnStyle question <p>I thought I have the RTW version. Here is the version number of my &nbsp;SL installation&nbsp;: 2.0.31005.0</p> <p>&nbsp;</p> <p>Cheers </p> <p>Jan</p> <p>&nbsp;</p> <p>&nbsp;</p> 2008-10-18T22:48:03-04:00112667http://forums.silverlight.net//p/38706/112667.aspx/1?Re+Re+DataGrid+ColumnStyle+questionRe: Re: DataGrid ColumnStyle question <p>Yes.&nbsp; This should be the RTW version.&nbsp; Do you mind to post your style?&nbsp; Did you restyle it by using the ColumnHeaderStyle?</p> <p>&nbsp;</p> 2008-10-19T01:08:37-04:00112713http://forums.silverlight.net//p/38706/112713.aspx/1?Re+Re+Re+DataGrid+ColumnStyle+questionRe: Re: Re: DataGrid ColumnStyle question <p>Yes I'm using a ColumnHeaderStyle.</p> <p>Here the code:&nbsp;</p> <p>&nbsp;</p> <p>Style x:Key=&quot;DarkDataGridColumnHeaderStyle&quot; TargetType=&quot;System_Windows_Controls_Primitives:DataGridColumnHeader&quot;&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&lt;Setter Property=&quot;Foreground&quot; Value=&quot;#FFE2E2E2&quot;/&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&lt;Setter Property=&quot;HorizontalContentAlignment&quot; Value=&quot;Center&quot;/&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&lt;Setter Property=&quot;VerticalContentAlignment&quot; Value=&quot;Center&quot;/&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&lt;Setter Property=&quot;FontSize&quot; Value=&quot;10.5&quot;/&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&lt;Setter Property=&quot;FontWeight&quot; Value=&quot;Bold&quot;/&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&lt;Setter Property=&quot;IsTabStop&quot; Value=&quot;False&quot;/&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&lt;Setter Property=&quot;SeparatorBrush&quot; Value=&quot;#FFC5C5C5&quot;/&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&lt;Setter Property=&quot;Padding&quot; Value=&quot;4,4,5,4&quot;/&gt;<br> &nbsp;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&lt;Setter Property=&quot;Template&quot;&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&lt;Setter.Value&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&lt;ControlTemplate TargetType=&quot;System_Windows_Controls_Primitives:DataGridColumnHeader&quot;&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;Grid x:Name=&quot;Root&quot;&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;Grid.ColumnDefinitions&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;ColumnDefinition Width=&quot;Auto&quot;/&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;ColumnDefinition Width=&quot;*&quot;/&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;ColumnDefinition Width=&quot;Auto&quot;/&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/Grid.ColumnDefinitions&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;Grid.RowDefinitions&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;RowDefinition Height=&quot;*&quot;/&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;RowDefinition Height=&quot;*&quot;/&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;RowDefinition Height=&quot;Auto&quot;/&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/Grid.RowDefinitions&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;VisualStateManager.VisualStateGroups&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;VisualStateGroup x:Name=&quot;CommonStates&quot;&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;VisualStateGroup.Transitions&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;VisualTransition GeneratedDuration=&quot;00:00:0.1&quot;/&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/VisualStateGroup.Transitions&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;VisualState x:Name=&quot;Normal&quot;/&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;VisualState x:Name=&quot;MouseOver&quot;&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;Storyboard&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;ColorAnimationUsingKeyFrames BeginTime=&quot;0&quot; Duration=&quot;0&quot; Storyboard.TargetName=&quot;BackgroundRectangle&quot; Storyboard.TargetProperty=&quot;(Shape.Fill).(SolidColorBrush.Color)&quot;&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;SplineColorKeyFrame KeyTime=&quot;0&quot; Value=&quot;#FF448DCA&quot;/&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/ColorAnimationUsingKeyFrames&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;ColorAnimationUsingKeyFrames BeginTime=&quot;0&quot; Duration=&quot;0&quot; Storyboard.TargetName=&quot;BackgroundGradient&quot; Storyboard.TargetProperty=&quot;(Shape.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)&quot;&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;SplineColorKeyFrame KeyTime=&quot;0&quot; Value=&quot;#7FFFFFFF&quot;/&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/ColorAnimationUsingKeyFrames&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;ColorAnimationUsingKeyFrames BeginTime=&quot;0&quot; Duration=&quot;0&quot; Storyboard.TargetName=&quot;BackgroundGradient&quot; Storyboard.TargetProperty=&quot;(Shape.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)&quot;&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;SplineColorKeyFrame KeyTime=&quot;0&quot; Value=&quot;#CCFFFFFF&quot;/&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/ColorAnimationUsingKeyFrames&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;ColorAnimationUsingKeyFrames BeginTime=&quot;0&quot; Duration=&quot;0&quot; Storyboard.TargetName=&quot;BackgroundGradient&quot; Storyboard.TargetProperty=&quot;(Shape.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)&quot;&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;SplineColorKeyFrame KeyTime=&quot;0&quot; Value=&quot;#F2FFFFFF&quot;/&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/ColorAnimationUsingKeyFrames&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/Storyboard&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/VisualState&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/VisualStateGroup&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;VisualStateGroup x:Name=&quot;SortStates&quot;&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;VisualStateGroup.Transitions&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;VisualTransition GeneratedDuration=&quot;00:00:0.1&quot;/&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/VisualStateGroup.Transitions&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;VisualState x:Name=&quot;Unsorted&quot;/&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;VisualState x:Name=&quot;SortAscending&quot;&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;Storyboard&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;DoubleAnimationUsingKeyFrames Storyboard.TargetName=&quot;SortIcon&quot; Storyboard.TargetProperty=&quot;Opacity&quot;&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;SplineDoubleKeyFrame KeyTime=&quot;0&quot; Value=&quot;1.0&quot;/&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/DoubleAnimationUsingKeyFrames&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/Storyboard&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/VisualState&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;VisualState x:Name=&quot;SortDescending&quot;&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;Storyboard&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;DoubleAnimationUsingKeyFrames Storyboard.TargetName=&quot;SortIcon&quot; Storyboard.TargetProperty=&quot;Opacity&quot;&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;SplineDoubleKeyFrame KeyTime=&quot;0&quot; Value=&quot;1.0&quot;/&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/DoubleAnimationUsingKeyFrames&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;DoubleAnimationUsingKeyFrames Storyboard.TargetName=&quot;SortIconTransform&quot; Storyboard.TargetProperty=&quot;ScaleY&quot;&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;SplineDoubleKeyFrame KeyTime=&quot;0&quot; Value=&quot;-.9&quot;/&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/DoubleAnimationUsingKeyFrames&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/Storyboard&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/VisualState&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/VisualStateGroup&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/VisualStateManager.VisualStateGroups&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;Rectangle x:Name=&quot;BackgroundRectangle&quot; Grid.ColumnSpan=&quot;2&quot; Grid.RowSpan=&quot;2&quot; Fill=&quot;Black&quot; Stretch=&quot;Fill&quot;/&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;Rectangle x:Name=&quot;BackgroundGradient&quot; Grid.ColumnSpan=&quot;2&quot; Grid.RowSpan=&quot;2&quot; Stretch=&quot;Fill&quot;&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;Rectangle.Fill&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;!--&lt;LinearGradientBrush EndPoint=&quot;.7,1&quot; StartPoint=&quot;.7,0&quot;&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;GradientStop Color=&quot;#A1FFFFFF&quot; Offset=&quot;0.015&quot;/&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;GradientStop Color=&quot;#F9FFFFFF&quot; Offset=&quot;0.375&quot;/&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;GradientStop Color=&quot;#E5FFFFFF&quot; Offset=&quot;0.6&quot;/&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;GradientStop Color=&quot;#C6FFFFFF&quot; Offset=&quot;1&quot;/&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/LinearGradientBrush&gt;--&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;LinearGradientBrush EndPoint=&quot;0.7,1&quot; StartPoint=&quot;0.7,0&quot;&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp;&lt;GradientStop Color=&quot;#FFA3AEB9&quot;/&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp;&lt;GradientStop Color=&quot;#FF8399A9&quot; Offset=&quot;0.375&quot;/&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp;&lt;GradientStop Color=&quot;#FF718597&quot; Offset=&quot;0.375&quot;/&gt;<br> &nbsp;&nbsp;&nbsp;&nbsp;&lt;GradientStop Color=&quot;#FF000000&quot; Offset=&quot;1&quot;/&gt;<br> &nbsp;&nbsp;&nbsp;&lt;/LinearGradientBrush&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/Rectangle.Fill&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/Rectangle&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;ContentPresenter Cursor=&quot;{TemplateBinding Cursor}&quot; HorizontalAlignment=&quot;{TemplateBinding HorizontalContentAlignment}&quot; Margin=&quot;{TemplateBinding Padding}&quot; VerticalAlignment=&quot;{TemplateBinding VerticalContentAlignment}&quot; Grid.RowSpan=&quot;2&quot; Content=&quot;{TemplateBinding Content}&quot;/&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;Rectangle x:Name=&quot;VerticalSeparator&quot; VerticalAlignment=&quot;Stretch&quot; Width=&quot;1&quot; Visibility=&quot;{TemplateBinding SeparatorVisibility}&quot; Grid.Column=&quot;2&quot; Grid.RowSpan=&quot;2&quot; Fill=&quot;{TemplateBinding SeparatorBrush}&quot;/&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;Path HorizontalAlignment=&quot;Left&quot; x:Name=&quot;SortIcon&quot; VerticalAlignment=&quot;Center&quot; Width=&quot;8&quot; Opacity=&quot;0&quot; RenderTransformOrigin=&quot;.5,.5&quot; Grid.Column=&quot;1&quot; Grid.RowSpan=&quot;2&quot; Fill=&quot;#FF444444&quot; Stretch=&quot;Uniform&quot; Data=&quot;F1 M -5.215,6.099L 5.215,6.099L 0,0L -5.215,6.099 Z &quot;&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;Path.RenderTransform&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;TransformGroup&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;ScaleTransform ScaleX=&quot;.9&quot; ScaleY=&quot;.9&quot; x:Name=&quot;SortIconTransform&quot;/&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/TransformGroup&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/Path.RenderTransform&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/Path&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/Grid&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&lt;/ControlTemplate&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&lt;/Setter.Value&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&lt;/Setter&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&lt;Setter Property=&quot;Background&quot; Value=&quot;{x:Null}&quot;/&gt;<br> &nbsp;&nbsp;&nbsp; &nbsp;&lt;/Style&gt;</p> 2008-10-19T05:09:04-04:00115671http://forums.silverlight.net//p/38706/115671.aspx/1?Re+Re+Re+Re+DataGrid+ColumnStyle+questionRe: Re: Re: Re: DataGrid ColumnStyle question <p>This may help from the breaking changes document found here: <a href="http://blogs.msdn.com/silverlight_sdk/archive/2008/10/10/silverlight-breaking-changes-between-beta-2-and-release-updated-document.aspx"> http://blogs.msdn.com/silverlight_sdk/archive/2008/10/10/silverlight-breaking-changes-between-beta-2-and-release-updated-document.aspx</a></p> <font face="Verdana">&nbsp;</font> <h4 style="margin:9pt 0in 3pt -0.25in"><a class="" name="DataGridColumn_Header"></a><font face="Verdana">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DataGridColumn.Header no longer supports visuals</font></h4> <font face="Verdana"><span class="LabelEmbedded"><strong>Who Is Affected:</strong></span><span class="MsoCommentReference"> Silverlight 2 Beta 2 managed applications that use the DataGrid.</span></font> <p class="MsoNormal" style="margin:3pt 0in"><span class="LabelEmbedded"><strong><font face="Verdana">Summary</font></strong></span></p> <p class="MsoNormal" style="margin:3pt 0in"><font face="Verdana">Visuals cannot be duplicated so they cannot be used for the Header property due to column reordering.</font></p> <span class="LabelEmbedded"><strong><font face="Verdana">Fix Required</font></strong></span> <p class="MsoNormal" style="margin:3pt 0in"><font face="Verdana">To put visuals in column headers, users will need to template the column header to include the visual instead of setting it as the Header.</font></p> <font face="Verdana">&nbsp;</font><span class="LabelEmbedded"><strong><font face="Verdana">Beta 2</font></strong></span><span class="MultilanguageMarkerAuto"><span style="font-size:8pt"><font color="#808080"><font face="Verdana">[Xaml]</font></font></span></span> <p class="Code" style="margin:0in 0in 3pt"><font face="Courier New" color="#000080">&lt;data:DataGridTextColumn DisplayMemberBinding=”{Binding FirstName}”&gt;</font></p> <p class="Code" style="margin:0in 0in 3pt"><font face="Courier New" color="#000080">&nbsp;&nbsp;&nbsp; &lt;data:DataGridTextColumn.Header&gt;</font></p> <p class="Code" style="margin:0in 0in 3pt"><font face="Courier New" color="#000080">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;Button Content=”hello” /&gt;</font></p> <p class="Code" style="margin:0in 0in 3pt"><font face="Courier New" color="#000080">&nbsp;&nbsp;&nbsp; &lt;/data:DataGridTextColumn.Header&gt;</font></p> <p class="Code" style="margin:0in 0in 3pt"><font face="Courier New" color="#000080">&lt;/data:DataGridTextColumn&gt;</font></p> <font face="Courier New" color="#000080">&nbsp;</font><font face="Verdana">&nbsp;</font><span class="LabelEmbedded"><strong><font face="Verdana">RTM</font></strong></span><span class="MultilanguageMarkerAuto"><span style="font-size:8pt"><font color="#808080"><font face="Verdana">[Xaml]</font></font></span></span> <p class="Code" style="margin:0in 0in 3pt"><font face="Courier New" color="#000080">&lt;data:DataGridTextColumn Binding=&quot;{Binding LastName}&quot; Header=&quot;hello&quot;&gt;</font></p> <p class="Code" style="margin:0in 0in 3pt"><font face="Courier New" color="#000080">&nbsp;&nbsp;&nbsp; &lt;data:DataGridTextColumn.HeaderStyle&gt;</font></p> <p class="Code" style="margin:0in 0in 3pt"><font face="Courier New" color="#000080">&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&lt;Style TargetType=&quot;dataprimitives:DataGridColumnHeader&quot;&gt;</font></p> <p class="Code" style="margin:0in 0in 3pt"><font face="Courier New" color="#000080">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&lt;Setter Property=&quot;Template&quot;&gt;</font></p> <p class="Code" style="margin:0in 0in 3pt"><font face="Courier New" color="#000080">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&lt;Setter.Value&gt;</font></p> <p class="Code" style="margin:0in 0in 3pt"><font face="Courier New" color="#000080">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&lt;ControlTemplate&gt;</font></p> <p class="Code" style="margin:0in 0in 3pt"><font face="Courier New" color="#000080">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&lt;Button Content=&quot;{TemplateBinding Content}&quot; /&gt;</font></p> <p class="Code" style="margin:0in 0in 3pt"><font face="Courier New" color="#000080">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/ControlTemplate&gt;</font></p> <p class="Code" style="margin:0in 0in 3pt"><font face="Courier New" color="#000080">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/Setter.Value&gt;</font></p> <p class="Code" style="margin:0in 0in 3pt"><font face="Courier New" color="#000080">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/Setter&gt;</font></p> <p class="Code" style="margin:0in 0in 3pt"><font face="Courier New" color="#000080">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/Style&gt;</font></p> <p class="Code" style="margin:0in 0in 3pt"><font face="Courier New" color="#000080">&nbsp;&nbsp;&nbsp; &lt;/data:DataGridTextColumn.HeaderStyle&gt;</font></p> <p class="Code" style="margin:0in 0in 3pt"><font face="Courier New" color="#000080">&lt;/data:DataGridTextColumn&gt;</font></p> <p>&nbsp;</p> <p><em>(Please mark as Answered if this helps)</em></p> 2008-10-23T03:48:05-04:00