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






Gets or sets the name of a target window or frame that will display the content specified by the NavigationUri property.

Syntax

Visual Basic (Declaration) 
<CategoryAttribute("Common Properties")>
Public Property TargetName As String
Visual Basic (Usage)Copy Code
Dim instance As UXButton
Dim value As String
 
instance.TargetName = value
 
value = instance.TargetName
C# 
[CategoryAttribute("Common Properties")]
public string TargetName {get; set;}
Delphi 
public read-write property TargetName: String; 
JScript 
CategoryAttribute("Common Properties")
public function get,set TargetName : String
Managed Extensions for C++ 
[CategoryAttribute("Common Properties")]
public: __property string* get_TargetName();
public: __property void set_TargetName( 
   string* value
);
C++/CLI 
[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:

  • _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.