HTMLAgility in UWP App => List all url of an website

Topics: Developer Forum, User Forum
Mar 27 at 9:28 AM
Edited Mar 27 at 10:20 AM
I want to List URL of an Website. It works via Regex and Agility pack - on Windows form Apps.

Now I want to perform this Task in a UWP app. Unfortunately there is no System.web.UI;

So I tied this Code from :
and Combine it with:

So I made the following Code. But this one only get me the URL of the page I am on. But I am looking for all URLs in the Body of the HTML Page:
    private void button_Click(object sender, RoutedEventArgs e)

        HtmlDocument htmlDoc = new HtmlDocument();

        HtmlNode docNodes = htmlDoc.DocumentNode;
        var aTags = htmlDoc.DocumentNode.Descendants();

        int counter = 1;
        if (aTags != null)
            foreach(var aTag in aTags)
                UrlList.Items.Add(counter + ". " + aTag.InnerHtml);