title: WPF C# Paging in Wrap Panel
body: <p>i populated some text ( i name them as questions) from database but in my wrap panel i can only display 3 questions , the rest of the questions are being cut-off , i have more than 3 questions , how can i do a paging in wrap panel to display the rest of the question on the panel itself? i populate the questions by for loop like this:</p>
  
  <pre><code> for( int i= 0 ; i&lt;lstQuestion.Count()-2; i++)
          {
              TextBlock tb = new TextBlock(); // Question 
              tb.FontSize = 19;
              tb.FontWeight = FontWeights.Bold;
              tb.Text = lstQuestion[i].QuestionContent;
              tb.TextWrapping = TextWrapping.Wrap;
              wrapPanel1.Children.Add(tb);
  
  
  
              TextBox tbox = new TextBox();
              if (lstQuestion[i].Answer.Trim().Length &gt; 0) // Textbox for user to input answer in every question
              {
  
                  tbox.FontSize = 19;
                  tbox.Width = 250;
                  tbox.Height = 50;
                  tbox.PreviewDrop += new DragEventHandler(tbox_PreviewDrop);
                  tbox.Focusable = false; // Disallow user to input anything into it.
                  wrapPanel1.Children.Add(tbox);
              }
  
              answers.Add(lstQuestion[i].Answer);
  
              if (lstQuestion[i].QuestionNo != lstQuestion[i + 1].QuestionNo) // add spacing between question
              {
                  StackPanel sp = new StackPanel();
                  sp.Width = 1010;
                  wrapPanel1.Children.Add(sp);
                  Label spacing = new Label();
                  spacing.Width = 1010;
                  spacing.Content = "";
                  wrapPanel1.Children.Add(spacing);
              }
  
          } // end of for each loop.
  </code></pre>
  
  <p>And in my xaml :</p>
  
  <pre><code>&lt;Grid&gt;
      &lt;WrapPanel  HorizontalAlignment="Center"  Name="wrapPanel1" VerticalAlignment="Center"  Height="400" Width="1038" Margin="0,77,0,43" /&gt;
      &lt;WrapPanel Height="80" HorizontalAlignment="Center"  Name="wrapPanel2" VerticalAlignment="Top"  Background="Aquamarine" Width="1000"&gt;
      &lt;/WrapPanel&gt;
      &lt;Button Content="Check" Height="37" HorizontalAlignment="Center"  Name="button1" VerticalAlignment="Bottom" Width="90"  FontSize="24" Margin="474,0" Click="button1_Click" /&gt;
  
  &lt;/Grid&gt;
  </code></pre>
  
  <p>Wrappanel1 is where i put my questions and textbox ( wrap panel 1 is the panel that i want to do paging in ) , wrappanel2 is another panel where choices of answers are there.</p>
  
  <p><img src="https://i.stack.imgur.com/2rY7d.jpg" alt="enter image description here"></p>
  
  <p>As you can see from the grey arrow , there is still more text , but it just stops there at the end of the scroll.</p>