Exemplo n.º 1
0
        protected override void OnLoaded()
        {
            this.viewModel = new ViewModelPartyMember(this.partyMemberName,
                                                      commandRemove: null,
                                                      Visibility.Collapsed);
            this.DataContext = this.viewModel;

            this.UpdateLayout();
            var textBlock = this.GetByName <FrameworkElement>("NameGrid");

            Canvas.SetLeft(textBlock, -textBlock.ActualWidth / 2);
        }
Exemplo n.º 2
0
 protected override void OnUnloaded()
 {
     this.DataContext = null;
     this.viewModel?.Dispose();
     this.viewModel = null;
 }