private void CreateAttributedString(NSTextField control, string html)
        {
            var attr = new NSAttributedString(html);

            var links = new List <LinkData>();

            control.AttributedStringValue = attr;
            // Sets up a Gesture recognizer:
            if (links.Count <= 0)
            {
                return;
            }

            var tapGesture = new NSClickGestureRecognizer((tap) =>
            {
                var url = DetectTappedUrl(tap, (NSTextField)tap.View, links);
                if (url == null)
                {
                    return;
                }

                var label = (HtmlLabel)Element;
                var args  = new WebNavigatingEventArgs(WebNavigationEvent.NewPage, new UrlWebViewSource {
                    Url = url
                },
                                                       url);
                label.SendNavigating(args);

                if (args.Cancel)
                {
                    return;
                }

                Device.OpenUri(new Uri(url));
                label.SendNavigated(args);
            });

            control.AddGestureRecognizer(tapGesture);
        }