private void ControllerSlotControlRemovedHandler(HotbarItemSlotControl itemSlotControl, byte slotId) { if (itemSlotControl.Tag is ContentControl controlDelimiter) { this.controller.PanelContainerChildren.Remove(controlDelimiter); } itemSlotControl.Tag = null; }
private void ControllerSlotControlAddedHandler(HotbarItemSlotControl itemSlotControl, byte slotId) { if (slotId >= 9) { // last slot - do not add delimiter return; } var controlDelimiter = new ContentControl() { Template = this.controlTemplateSlotDelimiter }; this.controller.PanelContainerChildren.Add(controlDelimiter); itemSlotControl.Tag = controlDelimiter; }
private void ControllerSlotControlAddedHandler(HotbarItemSlotControl itemSlotControl, byte slotId) { if (slotId >= 9) { // last slot - do not add delimiter return; } var controlDelimiter = new ContentControl() { Template = this.controlTemplateSlotDelimiter }; this.controller.PanelContainerChildren.Add(controlDelimiter); itemSlotControl.Tag = controlDelimiter; //if (slotId == 4) //{ // // increase spacing between first 5 slots and last 5 slots // itemSlotControl.Margin = new Thickness(0, 0, 20, 0); //} }