Beispiel #1
0
        private void SaveLayoutMessageReceived(NotificationActionMessage <string> message)
        {
            string xmlLayoutString = string.Empty;

            using (StringWriter fs = new StringWriter())
            {
                XmlLayoutSerializer xmlLayout = new XmlLayoutSerializer(this.WindowManager);
                xmlLayout.Serialize(fs);
                xmlLayoutString = fs.ToString();
            }
            message.Execute(xmlLayoutString);
        }
Beispiel #2
0
        private void SaveLayoutToString()
        {
            NotificationActionMessage <string> notification = new NotificationActionMessage <string>(
                MessageIds.SaveWorkspaceLayout,
                (result) =>
            {
                this.layoutParent.IsBusy.Value = true;
                CommandManager.InvalidateRequerySuggested();
                this.CurrentLayout             = result;
                this.layoutParent.IsBusy.Value = false;
            });

            this.eventAggregator.GetEvent <NotificationActionEvent <string> >().Publish(notification);
        }