المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : WPF Nested Grid Sizing



C# Programming
03-03-2010, 01:50 AM
Here is my layout:
Window
Grid
GridCell (with content, unrelated to this question)
GridCell
ScrollView HorizontalScrollBarVisibility=Auto, Vert=Disabled
Grid
GridCell MinWidth=100
GridSplitter
GridCell MinWidth=100

When the Window is reduced in size, the ScrollView correctly appears and allows me to scroll, but the GridSplitter will not move. It seems the nested Grid will maintain the required minimum size, but the GridSplitter will not move and cause the nested Grid to grow.

What can I change to allow for the nested grid to grow as needed when the splitter is moved? I tried a simple hack where I defined a Width for the nested Grid, and then as the GridSplitter moved, I applied the delta to the Width of the nested Grid, but that had strange and unstable results.

Please let me know if I need to state the question in a different way.Jeremy A. Cunningham