Update RelativeSize when user drags splitter

2 posts, 0 answers
  1. Jason
    Jason avatar
    21 posts
    Member since:
    Nov 2010

    Posted 15 Aug 2013 Link to this post

    I have 2 SplitContainers in another one which is all loaded from an XML file using my own deserialization code similar to LoadLayout. Regardless of whether I use ProportionalStackPanel.SetRelativeSize during my load or let it use the defaults, when I later attempt to serialize it, the ProportionalStackPanel.GetRelativeSize function returns the original values that it was loaded with. I would expect that when a user drags the splitter bar that the RelativeSizeProperty would update so that when I use the get function it returns the current values. The same applies for figuring out the RelativeSize for PaneGroups within a SplitContainer.

    Is there something I am missing or am I going to have to manually recalculate the split ratio based on the RenderSize to Parent.RenderSize or something similar? If that is the case, would there be an alternative such as handling an event when the split bar moves?
  2. Pana
    Pana avatar
    748 posts

    Posted 20 Aug 2013 Link to this post


    I would like to recommend you to use the Save and Load Layout methods of the RadDocking. It seems you have already considered and rejected it so in your case it seems the LayoutChangeEnded event of the RadDocking may help. There you can try to recalculate the relative sizes. Currently there is no public API that may help you further.

    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
Back to Top