Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

wpf ScrollContentPresenter height issue

$
0
0

Hi

I have datagrid with control template like below

   <ControlTemplate x:Key="DataGridControlTemplate" TargetType="{x:Type DataGrid}">...........

<ScrollContentPresenter Width="Auto" HorizontalAlignment="Left" Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" x:Name="PART_ScrollContentPresenter" CanContentScroll="{TemplateBinding CanContentScroll}" CanHorizontallyScroll="False"  CanVerticallyScroll="False" 
                                                        ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" ContentStringFormat="{TemplateBinding ContentStringFormat}"></ScrollContentPresenter>.........

     <ControlTemplate/>

My datagrid is like this : 

My Question is: how would I get only that content height? I can calculate byRow count and Column header height but some times any Row has multiple line so cant calculate every time. like this:

Please help me

thanks

dee

     

Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>