Hello together,
I need to have the true ClientSize of an UltraTilePanel. Unfortunately the UltraTilePanel.ClientSize property does not take into account, whether the vertical scrollbar is shown or not. But if I can somehow read out from UltraTilePanel if it shoes the vertical scrollbar or not, then it would be possible to calculate the true ClientSize.
TrueClientWidth = UltraTilePanel.ClientSize.Width – VerticalScrollbarWidth;
Does anybody know how to ask the UltraTilePanel if it shows the vertical scrollbar or even more simpler how to get the true ClientSize directly?
regards
Frank
Dear Michael,
With your sample of the CreationFilter I was able to estimate if there is a vertical scrollbar or not.
Thank you very much indeed.
regardsFrank
Hello Frank,
There doesn't appear to a built-in way to achieve this. There are also some extra pixels beteween the scrollbar and the client area(s).
You can get a close calculation the ClientWidth by using the TilePanel's UIElements. The control's parent UIElement is UltraTilePanelControlUIElement and it contains a ScrollbarUIElement when visible. You can subtract the ScrollBarUIElement from the parent to get rough estimate of the width taking in account for the scrollbar.
I attached a sample that uses a CreationFilter to get you started.