Hyperlinkbutton, webbrowser, and navigationservice

Source: Internet
Author: User

Hyperlinkbutton is a hyperlink button. You can click this button to open the specified link in the browser that comes with the system. The usage is as follows:

Uri uri2 = new uri ("http://www.baidu.com", urikind. Absolute );
This. hyperlinkbutton1.navigateuri = URI;
This. hyperlinkbutton1.targetname = "_ blank ";

The URI link can only be an absolute connection, and the urikind cannot select relative (relative), because this control is used to open the Internet link. In addition, you must assign a value to the targetname of hyperlinkbutton (otherwise, the navigation fails), indicating how to develop a new link. The specific value indicates the following:

_ Blank, _ media, or _ search indicates to load the linked document to a new blank window.
_ Parent, _ Self, _ top, or "" means to load the corresponding page to the window in which the link is clicked (activity window) (new if there is no parent window ).

 

Webbrowser is a browser control that loads the content of a specified link to the webbrowser control. The usage is as follows:

Uri uri = new uri ("http://www.baidu.com", urikind. Absolute );
This. webbrowser1.navigate (URI );

The URI link can only be an absolute connection, and the urikind cannot select relative (relative). This control also loads the content of the Internet site.

 

Navigationservice is a class that is a navigation service class. It can only be used for navigation between different pages within the project and cannot be used to navigate to an Internet webpage. The usage is as follows:

Uri uri1 = new uri ("/secondpage. XAML", urikind. relativeorabsolute );
Navigationservice. navigate (uri1 );

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.