Пример #1
0
        public MarkPadHyperlink GetHyperlink(MarkPadHyperlink hyperlink)
        {
            var viewModel = new HyperlinkEditorViewModel(hyperlink.Text, hyperlink.Url)
            {
                IsUrlFocussed = !String.IsNullOrWhiteSpace(hyperlink.Text)
            };

            windowManager.ShowDialog(viewModel);
            if (!viewModel.WasCancelled)
            {
                hyperlink.Set(viewModel.Text, viewModel.Url);
                return(hyperlink);
            }
            return(null);
        }