Ejemplo n.º 1
0
        protected override void OnLoaded()
        {
            this.DataContext = this.viewModel = new ViewModelHUDMechHotbarControl(this.vehicle);
            var hotbarItemSlotControl0 = this.GetByName <HotbarItemSlotControl>("HotbarItemSlotControl0");

            hotbarItemSlotControl0.Setup(this.viewModel.EquipmentItemsContainer, slotId: 0);
        }
Ejemplo n.º 2
0
 protected override void OnUnloaded()
 {
     this.DataContext = null;
     this.viewModel?.Dispose();
     this.viewModel = null;
 }