Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Silverlight > DataForm > Auto height of the dataform

Answered Auto height of the dataform

Feed from this thread
  • Edward avatar

    Posted on Apr 18, 2012 (permalink)

    Hi

    I love the control so far :)  It works as expected. Very good.   

    I don't know if i'm in the right thread with this question because I suspect something generic about my question but here it goes:

    I have a usercontrol which has some stack panels with buttons and a DataForm like:

    <Grid x:Name="LayoutRoot" Background="White">
     
        <StackPanel Orientation="Horizontal" >
     
            <StackPanel Orientation="Vertical" >
     
                 <StackPanel Orientation="Horizontal">
                    <telerik:RadRadioButton Margin="0,5,5,5" Content="Normal" HorizontalAlignment="Left" IsChecked="True" Name="rbNormalView" Click="RrbClick" CommandParameter="1" />
                    <telerik:RadRadioButton Margin="0,5,5,5" Content="Passes" HorizontalAlignment="Left" IsChecked="False" Name="rbPassView" Click="RrbClick" CommandParameter="0"/>
                 </StackPanel>
     
                     
               <telerik:RadDataForm EditEnding="RadDataFormVisitor_OnEditEnding"  VerticalAlignment="Stretch" HorizontalAlignment="Left" HorizontalContentAlignment="Left"  LabelPosition="Beside" Width="400" Name="radDataFormVisitor" BorderThickness="1" AutoEdit="True" AutoGeneratingField="RadDataForm1AutoGeneratingField" CommandButtonsVisibility="None">
                  </telerik:RadDataForm>
                              
                 
            </StackPanel>
     
             <Canvas Name="CameraCanvas" Margin="10">
            </Canvas>
     
         </StackPanel>
     
    </Grid>


    The problem is that I need to set the height of the dataform in pixels otherwise it will grow outside the usercontrol. I want the dataform to auto-height (or auto fill) to the height of the usercontrol. The dataform will show its own vertical scrollbar if neccesary.

    How do I do that? Do I need docking?


    Thanks,
    Edward



    Reply

  • Answer Vlad Vlad admin's avatar

    Posted on Apr 19, 2012 (permalink)

    Hello Edward,

     You should use Grid panel instead StackPanel since StackPanel  will measure child components with infinity height.

    Regards,
    Vlad
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

    Reply

  • Say Hello to Telerik's PivotGrid for ASP.NET AJAX, Silverlight, WPF and WinForms. Now packed with OLAP support.

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Silverlight > DataForm > Auto height of the dataform