Peter, I can't see anything wrong with that at all.
Just used the exact code and built the window, everything shows. Could it be a stale exe you're running? Make sure to Clean Solution and do a full Rebuild. --Winston On Fri, Jan 7, 2011 at 7:13 PM, Peter Maddin <[email protected]>wrote: > I am learning WPF using "WPF in Action with Visual Studio 2008" by ARLEN > FELDMAN and MAXX DAYMON. > > I am not sure if anyone else has used this text, but if anyone else has, > perhaps they can give me a clue. > I am using VS2010 not VS2008 so I am making a few small adjustments to > cover any differences. > > I am trying to build the WikiDeskTop application in Chapter 9. I got to > page 186 adding in the controls and it was looking good. The author then > says to add a grid with three columns and a GridSplitter in the middle > column. > > <Grid Name="grid1" > <Grid.ColumnDefinitions> <ColumnDefinition > Width="1*" MinWidth="50"/> <ColumnDefinition Width="Auto"/> > <ColumnDefinition Width="2*" MinWidth="50"/> </Grid.ColumnDefinitions> > <GridSplitter Grid.Column="1" HorizontalAlignment="Center" > VerticalAlignment="Stretch" Width="5" /> </Grid> > > The author then says to run the application and check out the splitter > control. When I run it the splitter is not shown. > > Ok maybe I need to add more content with a second grid in the third column, 3 > rows and another splitter etc etc. > > After doing this it looks ok in the designer. > When I run it anything within the docked grid (LastChildFill is set to true > for the DockPanel) is not rendered. > I have checked the Visibility property and all controls have it set to > Visible in the property editor. > I tried adding this as an attribute in the XAML. This changes nothing. > > Can anyone tell me what I am doing wrong? Is there some subtle difference > between VS2008 SP1 .NET 3.5 and VS2010 .NET 4.0 that I need > to accommodate. > > Complete XAML follows > <Window x:Class="DesktopWiki.WikiWindow" > xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" > <http://schemas.microsoft.com/winfx/2006/xaml/presentation> > xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" > <http://schemas.microsoft.com/winfx/2006/xaml> > Title="Wiki In Action" mc:Ignorable="d" > xmlns:d="http://schemas.microsoft.com/expression/blend/2008" > <http://schemas.microsoft.com/expression/blend/2008> xmlns:mc="http://schem > as.openxmlformats.org/markup-compatibility/2006" > <http://schemas.openxmlformats.org/markup-compatibility/2006> > d:DesignHeight="395" d:DesignWidth="497" SizeToContent="WidthAndHeight"> > <Grid> <DockPanel Name="dockPanel1" > <Menu Height="23" > Name="menu1" DockPanel.Dock="Top"> <MenuItem Header="File" > Name="mnuFile"/> <MenuItem Header="Edit" Name="mnuEdit"/> > <MenuItem Header="Format" Name="mnuFormat"/> > <MenuItem Header="Tools" Name="mnuTools"/> <MenuItem > Header="Help" Name="mnuHelp"/> </Menu> <ToolBarTray > Name="toolBarTray1" DockPanel.Dock="Top"> <ToolBar> > <Button Name="btnNew" >New</Button> <Button > Name="btnPrint" >Print</Button> <Button > Name="btnSpellCheck" >Spell Check</Button> <Button > Name="btnOptions" >Options</Button> </ToolBar> > </ToolBarTray> <StatusBar Height="23" Name="statusBar1" > DockPanel.Dock="Bottom" /> <Grid Visibility="Visible"> > <Grid.ColumnDefinitions> <ColumnDefinition Width="1*" > MinWidth="50"/> <ColumnDefinition Width="Auto"/> > <ColumnDefinition Width="2*" MinWidth="50"/> > </Grid.ColumnDefinitions> <GridSplitter Grid.Column="1" > HorizontalAlignment="Center" VerticalAlignment="Stretch" Width="5" > Visibility="Visible" /> <Grid Grid.Column="2" > Visibility="Visible"> <Grid.RowDefinitions> > <RowDefinition Height="*" MinHeight="50" /> > <RowDefinition Height="Auto" /> <RowDefinition > MinHeight="50" Height="*" /> </Grid.RowDefinitions> > <GridSplitter Grid.Row="1" Height="5" > HorizontalAlignment="Stretch" VerticalAlignment="Center" > Visibility="Visible"/> </Grid> <StackPanel > Grid.Column="0" Visibility="Visible"> <Expander > Header="Favorites" IsExpanded="True" Visibility="Visible"> > <ListBox Name="listBox1"> <ListBoxItem > Content="WPF" /> <ListBoxItem Content=".NET 3.5" > /> <ListBoxItem Content=".NET 4.0" /> > </ListBox> </Expander> > <Expander Header="Directories" IsExpanded="True" Visibility="Visible"> > <ListBox Name="listBox2"> > <ListBoxItem Content="WPF" /> <ListBoxItem > Content="WCF" /> <ListBoxItem Content="WF" /> > <ListBoxItem Content="LINQ" /> > <ListBoxItem Content="CardSpace" /> <ListBoxItem > Content=".NET 3.5" /> <ListBoxItem Content=".NET > 4.0" /> </ListBox> </Expander> > </StackPanel> </Grid> </DockPanel> > </Grid></Window> > > > > >
