Ejemplo n.º 1
0
        protected override void OnUnloaded()
        {
            this.DataContext = null;
            this.viewModel.Dispose();
            this.viewModel = null;

            NewbieProtectionSystem.ClientNewbieProtectionTimeRemainingReceived
                            -= this.NewbieProtectionTimeRemainingReceivedHandler;
            this.MouseEnter -= this.MouseEnterOrLeaveHandler;
            this.MouseLeave -= this.MouseEnterOrLeaveHandler;
            this.MouseDown  -= MouseDownHandler;
        }
        protected override void OnLoaded()
        {
            this.UpdateLayout();
            this.storyboardHide.Begin();

            this.viewModel = new ViewModelHUDNewbieProtectionInfo();
            this.viewModel.RequiredHeight = (float)this.GetByName <FrameworkElement>("Description")
                                            .ActualHeight;
            this.DataContext = this.viewModel;

            this.Refresh();
        }
Ejemplo n.º 3
0
        protected override void OnLoaded()
        {
            this.UpdateLayout();

            this.viewModel = new ViewModelHUDNewbieProtectionInfo();
            this.viewModel.RequiredHeight = (float)this.GetByName <FrameworkElement>("Description")
                                            .ActualHeight;
            this.DataContext = this.viewModel;

            this.expandedStateRefreshScheduledNumber = 0;
            this.RefreshTimeRemaining();

            VisualStateManager.GoToElementState(this.layoutRoot,
                                                "Collapsed",
                                                useTransitions: false);

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