protected override void OnLoaded()
 {
     this.DataContext = this.viewModel = new ViewModelHotbarItemWeaponOverlayControl()
     {
         Item = this.item
     };
 }
Пример #2
0
 protected override void InitControl()
 {
     this.DataContext = this.viewModel = new ViewModelHotbarItemWeaponOverlayControl(
         ammoChangedCallback: this.RefreshTooltip)
     {
         Item = this.item
     };
 }
Пример #3
0
        protected override void OnUnloaded()
        {
            this.DataContext = null;
            this.viewModel.Dispose();
            this.viewModel = null;

            this.MouseEnter -= this.MouseEnterOrLeaveHandler;
            this.MouseLeave -= this.MouseEnterOrLeaveHandler;
        }
        protected override void OnLoaded()
        {
            this.DataContext = this.viewModel = new ViewModelHotbarItemWeaponOverlayControl(
                ammoChangedCallback: this.RefreshTooltip)
            {
                Item = this.item
            };

            this.MouseEnter += this.MouseEnterOrLeaveHandler;
            this.MouseLeave += this.MouseEnterOrLeaveHandler;
        }
 protected override void OnUnloaded()
 {
     this.DataContext = null;
     this.viewModel.Dispose();
     this.viewModel = null;
 }