Intersoft ClientUI Documentation
TargetDisplay Property
See Also  Send Feedback
Intersoft.Client.UI.Controls Namespace > ImageLoader Class : TargetDisplay Property






Gets or sets the target element that will be loaded with the image source.

Syntax

Visual Basic (Declaration) 
Public Property TargetDisplay As DependencyObject
Visual Basic (Usage)Copy Code
Dim instance As ImageLoader
Dim value As DependencyObject
 
instance.TargetDisplay = value
 
value = instance.TargetDisplay
C# 
public DependencyObject TargetDisplay {get; set;}
Delphi 
public read-write property TargetDisplay: DependencyObject; 
JScript 
public function get,set TargetDisplay : DependencyObject
Managed Extensions for C++ 
public: __property DependencyObject* get_TargetDisplay();
public: __property void set_TargetDisplay( 
   DependencyObject* value
);
C++/CLI 
public:
property DependencyObject^ TargetDisplay {
   DependencyObject^ get();
   void set (    DependencyObject^ value);
}

Remarks

This is an advanced feature of ImageLoader where you can redirect the image loaded by ImageLoader to another Image element or an ImageBrush.

A typical scenario that makes sense to use this approach is when you want to load an external image and apply it to the Background of a UIElement, for example a Border or a Grid, and at the same time showing the download progress indicator which is more compelling to users.

XAML Copy Code
<Grid x:Name="LayoutRoot">
        <Grid.Background>
            <ImageBrush Stretch="Fill"/>
        </Grid.Background>
        <Intersoft:ImageLoader HorizontalAlignment="Center" Height="100" VerticalAlignment="Center" Width="100" TargetDisplay="{Binding Background, ElementName=LayoutRoot}" ImageSource="/Chrysanthemum.jpg"/>        
</Grid>
Specifing the target display will make the loader to load the image into the specified value.

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.