Occurs when shadow is initializing.
Syntax
JScript | |
---|
In JScript, you can handle the events defined by another class, but you cannot define your own. |
Event Data
The event handler receives an argument of type DragDropShadowEventArgs containing data related to this event. The following DragDropShadowEventArgs properties provide information specific to this event.
Example
The following example code demonstrates how to handle ShadowInit event to customize drag shadow object for UXPanel items.
XAML |
Copy Code |
<Intersoft:UXStackPanel HorizontalAlignment="Center" VerticalAlignment="Center" AllowReorderItem="True" ShadowInit="UXStackPanel_ShadowInit">
<StackPanel>
<Image Source="folder.png" Height="64" Width="64"/>
<TextBlock Text="My Archive" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</StackPanel>
<StackPanel>
<Image Source="folder.png" Height="64" Width="64"/>
<TextBlock Text="My Photos" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</StackPanel>
<StackPanel>
<Image Source="folder.png" Height="64" Width="64"/>
<TextBlock Text="My Videos" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</StackPanel>
</Intersoft:UXStackPanel>
|
C# |
Copy Code |
private void UXStackPanel_ShadowInit(object sender, Intersoft.Client.UI.Controls.Interactivity.DragDropShadowEventArgs e)
{
Image originalShadow = e.ShadowObject as Image;
Image image = new Image() { Source = originalShadow.Source };
image.Height = originalShadow.ActualHeight;
image.Width = originalShadow.ActualWidth;
Border shadow = new Border();
shadow.BorderThickness = new Thickness(1);
shadow.BorderBrush = new SolidColorBrush(Color.FromArgb(255, 0, 0, 0));
shadow.Child = image;
e.ShadowObject = shadow;
}
|
Remarks
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