There is a TabControl with two tabs, and on each, say, a Grid . TabControl stretched over the main window. When starting the program, the first tab is active. Until you activate the second tab, the ActualWidth and ActualHeight grid on the second tab remain zero.
What methods need to be called and from whom to find out the current size of the item (s) on a hidden tab?
TabPanelcalls theMeasureandArrangemethods only at the time of the transition by passing dimensions, so the element has no idea about its size until the transition to the tab. You can of course pass the dimensions fromTabControlitself toMeasureandArrange, but I have no idea how WPF will behave in this case and how the logic of drawing the element itself is implemented inside and what dimensions exactly are transmitted. - Alex KrassMeasureon the element, and pollDesiredSize. But this is a very low-level approach. Why do you need it? - VladD