Windows Vista Forums
Vista Forums Home Join Vista Forums Donate Vista Tutorials Tags

Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums Now

Go Back   Vista Forums > Microsoft Technical Newsgroups > Avalon

Getting ListView items to exand to width of ListView

Update your Vista Drivers Update Your Drivers Now!!
Closed Thread
 
Thread Tools Display Modes
Old 11-29-2006   #1 (permalink)
John Dunn
Guest


 

Getting ListView items to exand to width of ListView

Is it possible to get the items placed inside of a ListView Control to
automatically expand to the full width of the Control? If I place them inside of
a StackPanel they expand but don't when placed inside of a ListView. Here's some
XAML that shows the problem.

<Grid
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/interactivedesigner/2006"
mc:Ignorable="d"
Background="#FFFFFFFF"
x:Name="DocumentRoot"
x:Class="UntitledProject1.Scene1"
Width="640" Height="480">

<ListView Margin="0,0,0,0" x:Name="ListView"
IsSynchronizedWithCurrentItem="True" VerticalAlignment="Top" Height="58">
<ComboBox Width="Auto" Height="Auto" x:Name="ComboBox"
IsSynchronizedWithCurrentItem="True">
<Label Width="Auto" Height="Auto" x:Name="Label" Content="Label"/>
<Label Width="Auto" Height="Auto" x:Name="Label1" Content="Label1"/>
<Label Width="Auto" Height="Auto" x:Name="Label2" Content="Label2"/>
<Label Width="Auto" Height="Auto" x:Name="Label3" Content="Label3"/>
</ComboBox>
</ListView>
<StackPanel VerticalAlignment="Top" Margin="0,200,0,0" Height="82"
x:Name="StackPanel">
<ComboBox Width="Auto" Height="Auto" x:Name="ComboBox1"
IsSynchronizedWithCurrentItem="True">
<Label Width="Auto" Height="Auto" x:Name="Label4" Content="Label4"/>
<Label Width="Auto" Height="Auto" x:Name="Label5" Content="Label5"/>
<Label Width="Auto" Height="Auto" x:Name="Label6" Content="Label6"/>
<Label Width="Auto" Height="Auto" x:Name="Label7" Content="Label7"/>
</ComboBox>
</StackPanel>
</Grid>

Thanks-

John

My System SpecsSystem Spec
Closed Thread

Thread Tools
Display Modes



Similar Threads
Thread Thread Starter Forum Replies Last Post
ListView question IndyStef Avalon 1 05-27-2008 03:29 AM
ListView + ImageList Selko PowerShell 3 08-15-2007 03:08 AM
WPF ListView Krish_xx Avalon 1 05-22-2007 08:24 PM
How can I scroll the items at listbox or listview by using storybo Jeffrey_Wu Avalon 0 06-26-2006 07:34 AM


Vistax64.com is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media 2005-2008

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51