This is a migrated thread and some comments may be shown as answers.

HeaderedItemsControl, RadListBox, RadGridView Auto Row size

0 Answers 55 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
kity
Top achievements
Rank 2
kity asked on 05 Feb 2014, 08:25 AM
I want to set row height to use maximum availeble space in control.
How to do that with HeaderedItemsControl?

For now I do not want to use RadListBox or RadGridView.


<UserControl
x:Class="RadGauge.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:chart="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Chart"
xmlns:charting="clr-namespace:Telerik.Charting;assembly=Telerik.Windows.Controls.Chart"
xmlns:chartView="clr-namespace:Telerik.Windows.Controls.ChartView;assembly=Telerik.Windows.Controls.Chart"
xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
xmlns:wrapPanel="clr-namespace:WrapPanel"

mc:Ignorable="d"
d:DesignHeight="900" d:DesignWidth="600">

<UserControl.Resources>
<ResourceDictionary>
<DataTemplate x:Key="TickLabelEmpty">
<Grid />
</DataTemplate>
</ResourceDictionary>
</UserControl.Resources>

<Grid x:Name="LayoutRoot" Width="600" Height="700">

<Grid.RowDefinitions>
<RowDefinition Height="44"/>
<RowDefinition Height="*"/>
<RowDefinition Height="44"/>
</Grid.RowDefinitions>

<telerik:HeaderedItemsControl Grid.Row="1" ScrollViewer.HorizontalScrollBarVisibility="Disabled" Header="HEAD" >

<!--<telerik:HeaderedItemsControl.HeaderTemplate >
<DataTemplate>
<StackPanel Orientation="Horizontal">
<TextBlock Text=" " FontSize="12" Width="120" />

<StackPanel Orientation="Horizontal" >
<Ellipse Fill="Green" Height="14" Width="14" StrokeThickness="1" Stroke="Black" VerticalAlignment="Top" />
<TextBlock Text="Pull In" Margin="2 0" Width="60" />
<TextBlock Width="80" Text="Optimum&#x0a; length" HorizontalAlignment="Center" VerticalAlignment="Top" />
<Ellipse Fill="Red" Height="14" Width="14" StrokeThickness="1" Stroke="Black" VerticalAlignment="Top" />
<TextBlock Text="Pay out" Margin="2 0" />
</StackPanel>

<TextBlock Text="" FontSize="12" Width="20" />
<TextBlock Text="Tension" FontSize="12" Width="60" />
<TextBlock Text="Deviation" FontSize="12" Width="60" />

</StackPanel>
</DataTemplate>
</telerik:HeaderedItemsControl.HeaderTemplate>-->


<telerik:HeaderedItemsControl.Items >
<ItemsControl>
<TextBlock Text="FUNNN 1" Height="Auto" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/>
</ItemsControl>
<ItemsControl>
<TextBlock Text="FUNNN 2" Height="Auto" VerticalAlignment="Stretch" HorizontalAlignment="Stretch"/>
</ItemsControl>
</telerik:HeaderedItemsControl.Items>

<telerik:HeaderedItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<wrapPanel:WrapPanel Orientation="Vertical" VerticalAlignment="Stretch" />
</ItemsPanelTemplate>
</telerik:HeaderedItemsControl.ItemsPanel>




</telerik:HeaderedItemsControl>



</Grid>
</UserControl>

No answers yet. Maybe you can help?

Tags
General Discussions
Asked by
kity
Top achievements
Rank 2
Share this question
or