Inheritance: Caliburn.Micro.PropertyChangedBase
        private void OnDataContextChanged(FrameworkElement s, DataContextChangedEventArgs e) {
            if (ViewModel != null) {
                ViewModel.CaptchaEntryRequested -= ViewModelOnCaptchaEntryRequested;
            }

            ViewModel = DataContext as ExtendedPostingViewModel;
            if (ViewModel == null)
                return;

            this.Title.Text = Localization.GetForView("ExtendedPosting",
                ViewModel.IsNewThread
                    ? "ThreadCreationTitle.Text"
                    : "PostCreationTitle.Text");

            ViewModel.CaptchaEntryRequested += ViewModelOnCaptchaEntryRequested;
        }
Esempio n. 2
0
 public void CreateThread() {
     var viewModel = new ExtendedPostingViewModel(Shell, Board, new PostInfo(), CurrentPage.BoardId);
     viewModel.PostSent += (s, e) => Shell.HidePopup();
     Shell.ShowPopup(viewModel);
 }