protected override LayoutOptions Layout(PaintEventArgs e) {
LayoutOptions layout = PaintPopupLayout(e, /* up = */ true);
Debug.Assert(layout.GetPreferredSizeCore(LayoutUtils.MaxSize)
== PaintPopupLayout(e, /* up = */ false).GetPreferredSizeCore(LayoutUtils.MaxSize),
"The state of show3D should not effect PreferredSize");
return layout;
}