예제 #1
0
        public RichTextViewModel()
        {
            Close = new SimpleCommand
            {
                //Publish a message with the new Text
                ExecuteDelegate = x => Mediator.NotifyColleagues(ViewModelMessages.HideRichText, RichTextBoxHelper.GetText((FlowDocument)x))
            };

            //Receive the Text from the previous form
            Mediator.Register(x => Text = x == null ? "" : x.ToString(), ViewModelMessages.ShowRichText);
        }