tags:

views:

50

answers:

1

Hi,

I am experiencing weird behaviour whilst using the WPF GridSplitter.

I have the appropriate HorizontalAlignment properties set to stretch and when I resize them the GridSplitter jumps around, sometimes going back to their original positions or just jumping around as I drag them.....

Does anyone else seen or know what may be causing this?

Thanks

Here is the XAML

<GridSplitter x:Name="grdTreeSplitter" Grid.Row ="1" 
                    BorderBrush="{DynamicResource {x:Static SystemColors.ControlDarkBrushKey}}"  BorderThickness="1"
                    HorizontalAlignment="Stretch" Panel.ZIndex="0" ResizeBehavior="PreviousAndNext" ResizeDirection="Rows"
                              SnapsToDevicePixels="False" ShowsPreview="False" UseLayoutRounding="False"
                              DragIncrement="1"
                              DragDelta="grdSideExplorerSplitter_DragDelta">
                    <GridSplitter.Visibility>
                        <MultiBinding 
......
                        </MultiBinding>
                    </GridSplitter.Visibility>
                </GridSplitter>
+1  A: 

I have the same problem it seems like we are drawing a lot of stuff. And if we have the ShowsPreview property set. The user can drag outside the grab-handle while it is trying to update the screen. But the user thread is supposed to be separate from the graphic rendering thread so I don't know. If the user selects the splitter and uses the up and down arrows on the keyboard it works fine also. Ah whilst writing this. I tried using larger values for dragincrement and that seems to work also. Better solution. This is with two gridsplitters in the same direction(three sections of screen) I don't know if that is also your setup.

David Chaplin