Intersoft ClientUI Documentation
NavigateUri Property
See Also  Send Feedback
Intersoft.Client.UI.Aqua Namespace > UXButton Class : NavigateUri Property






Gets or sets the URI to navigate when this button is clicked.

Syntax

Visual Basic (Declaration) 
<CategoryAttribute("Common Properties")>
Public Property NavigateUri As Uri
Visual Basic (Usage)Copy Code
Dim instance As UXButton
Dim value As Uri
 
instance.NavigateUri = value
 
value = instance.NavigateUri
C# 
[CategoryAttribute("Common Properties")]
public Uri NavigateUri {get; set;}
Delphi 
public read-write property NavigateUri: Uri; 
JScript 
CategoryAttribute("Common Properties")
public function get,set NavigateUri : Uri
Managed Extensions for C++ 
[CategoryAttribute("Common Properties")]
public: __property Uri* get_NavigateUri();
public: __property void set_NavigateUri( 
   Uri* value
);
C++/CLI 
[CategoryAttribute("Common Properties")]
public:
property Uri^ NavigateUri {
   Uri^ get();
   void set (    Uri^ value);
}

Remarks

UXButton implements INavigationSource interface, which exposes NavigationUri and TargetName property. Therefore, UXButton can be used to facilitate navigation between pages in a valid navigation host such as UXFrame. To learn more about the navigation host and related features, see Navigation Overview.

The following example shows how to use NavigateUri property to navigate the pages in the project by using UXNavigationButton. The UXNavigationButton is a specialized button control derives from UXButton, featuring more sophisticated navigation visual state and features.

XAML Copy Code
<StackPanel Orientation="Horizontal" Intersoft:DockPanel.Dock="Top">
    <Intersoft:UXNavigationButton Content="Home" NavigateUri="/Home"/>
    <Intersoft:UXNavigationButton Content="Products" NavigateUri="/Products"/>
    <Intersoft:UXNavigationButton Content="Services" NavigateUri="/Services"/>
    <Intersoft:UXNavigationButton Content="About" NavigateUri="/About"/>
</StackPanel>

The result looks like the following figure.

For a more complete walkthrough that shows how to define the UXFrame and use UXNavigationButton to navigate to the pages in the frame, see Walkthrough: Create Simple Website Navigation Using Frame, Navigation Button and Hyperlink.

If your page contains multiple UXFrame instances, you can set the UXNavigationButton to navigate the page on a particular frame by setting the TargetName property of the button to the name of the target frame.

Beside local pages, you can also use UXButton to navigate to external URIs such as a web page. Certain safe protocols are supported as well, including http, https, and mailto.

If you navigate to an external web page, you can also set the target where the page will be displayed. You set the TargetName property to one of the following values:

  • _blank
  • _self (default)
  • _parent
  • _top

Although UXButton implements the core navigation functionality, it is recommended to use UXNavigationButton to perform page navigation as it is designed with more sophisticated visual states and built-in features to track the navigation process. The following example shows how to use UXNavigationButton to navigate to external URIs.

XAML Copy Code
<StackPanel Orientation="Horizontal" Intersoft:DockPanel.Dock="Top">

    <Intersoft:UXNavigationButton Content="ClientUI Home" 
                                  NavigateUri="http://www.clientui.com"/>

    <Intersoft:UXNavigationButton Content="ClientUI Live Samples" 
                                  NavigateUri="http://live.clientui.com"
                                  TargetName="_blank"/>

    <Intersoft:UXNavigationButton Content="Contact Us" 
                                  NavigateUri="mailto:technical@intersoftpt.com"/>

</StackPanel>

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2012 All Rights Reserved.