public InventoryPanel(GameDesktop Desktop) { Name = "Inventory"; Bounds = new Rectangle(0, 0, 176, 200); for (InventorySlot slot = InventorySlot.First; slot <= InventorySlot.Last; slot++) { InventoryItemButton InventoryItem = new InventoryItemButton(Viewport, slot) { Bounds = GetSlotPosition(slot) }; InventoryItem.Autoresizable = false; ContentView.AddSubview(InventoryItem); } this.Desktop = Desktop; Desktop.ActiveViewportChanged += ViewportChanged; ViewportChanged(Desktop.ActiveViewport); }