Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. WPF
  4. WPF ListView scrollable height

WPF ListView scrollable height

Scheduled Pinned Locked Moved WPF
csharpwpfhardwaretutorialquestion
2 Posts 2 Posters 4 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    astibich2
    wrote on last edited by
    #1

    I am using the WPF ListView, with an embedded GridView, to display a table of data. When the scroll bar is present, I would like to slightly increase the scrollable height of the list, making a little more visible white space at the end of the list. Note, I do NOT want to accomplish this by adding additional empty rows to the list. Any ideas on how to accomplish this? Thanks, Aaron Stibich

    L 1 Reply Last reply
    0
    • A astibich2

      I am using the WPF ListView, with an embedded GridView, to display a table of data. When the scroll bar is present, I would like to slightly increase the scrollable height of the list, making a little more visible white space at the end of the list. Note, I do NOT want to accomplish this by adding additional empty rows to the list. Any ideas on how to accomplish this? Thanks, Aaron Stibich

      L Offline
      L Offline
      Leung Yat Chun
      wrote on last edited by
      #2

      There may be better method, but I think this should work : You can create a ListViewItem template, so when it's last item (specify in your underlying model, or use TemplateSelector), occupy more space but not focusable. Something like the following :

      <DataTemplate x:Key="NormalColumn1Template" >
      <TextBlock Text="{Binding Text}" />
      </DataTemplate>

      <DataTemplate x:Key="LastColumn1Template" >
      <StackPanel Orientation="Vertical">
      <TextBlock Text="{Binding Text}" />
      <TextBlock Text="FreeSpace" Height="100" IsHitTestVisible="False" IsFocusable="False" Background="White" />
      </StackPanel>
      </DataTemplate>

      Regards Joseph Leung

      QuickZip

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups