Intersoft.Client.UI.Controls Namespace > ImageLoader Class : TargetDisplay Property |
Public Property TargetDisplay As DependencyObject
Dim instance As ImageLoader Dim value As DependencyObject instance.TargetDisplay = value value = instance.TargetDisplay
public DependencyObject TargetDisplay {get; set;}
public: property DependencyObject^ TargetDisplay { DependencyObject^ get(); void set ( DependencyObject^ value); }
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> |
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