Ejemplo n.º 1
0
        public override TextNote ConvertToTextNote()
        {
            TextNote newNote = new TextNote()
            {
                ExplicitName = this.ExplicitName,
                IsExpanded   = this.IsExpanded,
                IsSelected   = this.IsSelected
            };

            newNote.Ideas = Ideas;

            Xceed.Wpf.Toolkit.RichTextBox rtb = new Xceed.Wpf.Toolkit.RichTextBox();
            string    text = GetFileNameAsLink();
            Hyperlink link = new Hyperlink(new Run(text), rtb.CaretPosition.GetInsertionPosition(LogicalDirection.Forward));

            link.NavigateUri      = new Uri(text);
            link.RequestNavigate += (s, args) => Process.Start(args.Uri.ToString());
            newNote.Rtf           = rtb.Text;

            return(newNote);
        }