protected override void AddButtonViewInfo(NavigatorButtonBase button, NavigatorObjectViewInfoCollection objectCollection, ref int minWidth, ref int minHeight) { base.AddButtonViewInfo(button, objectCollection, ref minWidth, ref minHeight); RotateButtonImages(button); }
public override void CheckSize(ref Size size) { ExtendedDataNavigator cOwner = (Buttons.Owner as ExtendedDataNavigator); if (cOwner.NavigatorOrientation == NavigatorOrientation.Vertical) { int minWidth = 0; int minHeight = 0; ArrayList buttonList = CreateButtonList(); Clear(); NavigatorObjectViewInfoCollection objectCollection = new NavigatorObjectViewInfoCollection(); for (int i = 0; i < buttonList.Count; i++) { AddButtonViewInfo(buttonList[i] as NavigatorButtonBase, objectCollection, ref minWidth, ref minHeight); } AddTextViewInfo(null, objectCollection, ref minWidth, ref minHeight); if (Buttons.Owner.AutoSize) { size.Height = minHeight; size.Width = minWidth; } else { if (size.Height < minHeight) { size.Height = minHeight; } if (size.Width < minWidth) { size.Width = minWidth; } } Size buttonSize = new Size(cOwner.Size.Width, cOwner.Size.Height / objectCollection.Count); for (int i = 0; i < objectCollection.Count; i++) { Point location = new Point(0, i * buttonSize.Height); Rectangle button = new Rectangle(location, buttonSize); objectCollection[i].Bounds = button; } } else { base.CheckSize(ref size); } }