Intersoft.Client.UI.Controls Namespace > CallOut Class : TargetElement Property |
Public Property TargetElement As UIElement
Dim instance As CallOut Dim value As UIElement instance.TargetElement = value value = instance.TargetElement
public UIElement TargetElement {get; set;}
public: property UIElement^ TargetElement { UIElement^ get(); void set ( UIElement^ value); }
Another key feature of CallOut control is the ability to specify TargetElement. By specifying the TargetElement property to a UIElement through element binding, the callout control automatically adjusts the pointer's position to the center point of the particular UIElement.
There are two scenarios that can be achieved with this feature:
Your application may perform slower when your user interface contains a relatively large number of elements that use opacity and animation. To avoid the performance degradation, please carefully review your user interface design and balance the use of opacity and animation. |
The following example shows how to define TargetElement property using XAML.
XAML |
Copy Code
|
---|---|
<Intersoft:CallOut TargetElement="{Binding SelectedElement, ElementName=ListBox1}" PointerPoint1="-16,0" PointerPoint3="16,0" PointerPoint2="0,20"> </Intersoft:CallOut> <Intersoft:UXScroller> <Intersoft:UXListBox x:Name="ListBox1" ItemsSource="{Binding Hotels}"/> </Intersoft:UXScroller> |
The following example shows how to define TargetElement property using code behind.
C# |
Copy Code
|
---|---|
private void UXListBox_SelectionChanged(object sender, SelectionChangedEventArgs e) { UXListBox listBox = sender as UXListBox; this.SampleControl1.TargetElement = listBox.SelectedElement; } |
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