11432 : Scrollbar for all GanttRows

Question

 

I used your toolkit tree view example as a basis for this but I have set the tree view’s height to auto so as to use the whole screen – but now I have lost the scroll bar on the right. Can I have full screen and a toolbar?

 

Answer

< ?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /> 

You can do this many ways I guess. One way:

                    <ScrollViewer 

                        Name=”_myscrollview”

                        Grid.Row=”1″

                        Grid.Column=”0″

                        Grid.ColumnSpan=”3″

                        Height=”300″

                        VerticalScrollBarVisibility=”Visible”>

                        <ScrollViewer.Content>

                        <controls:TreeView  

                        BorderThickness=”0″

                        Margin=”0″

                        x:Name=”treeview1″

                        ItemTemplate=”{StaticResource SubRowInfoTemplate}”

                        Background=”Transparent” />

                    </ScrollViewer.Content></ScrollViewer>

 

Then add a event handler:

        private void LayoutRoot5_SizeChanged(object sender, SizeChangedEventArgs e)

        {

            _myscrollview.Height = e.NewSize.Height-100;

        }

 

There is probably some smarter way to this in xaml (there always is it seems… J)