Intersoft ClientUI Documentation
TargetName Property (UXButton)



Gets or sets the name of a target window or frame that will display the content specified by the NavigationUri property.
Syntax
<CategoryAttribute("Common Properties")>
Public Property TargetName As String
Dim instance As UXButton
Dim value As String
 
instance.TargetName = value
 
value = instance.TargetName
[CategoryAttribute("Common Properties")]
public string TargetName {get; set;}
[CategoryAttribute("Common Properties")]
public:
property String^ TargetName {
   String^ get();
   void set (    String^ 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 navigate to the pages in the project using UXNavigationButton which derives from UXButton.

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:

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 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

UXButton Class
UXButton Members

Send Feedback