Identifies the ShadowInit routed event.
Syntax
Visual Basic (Declaration) | |
---|
Public Shared ReadOnly ShadowInitEvent As RoutedEvent |
Delphi | |
---|
public field ShadowInitEvent: RoutedEvent; static; readonly |
JScript | |
---|
public static var ShadowInitEvent : RoutedEvent; |
Managed Extensions for C++ | |
---|
public: static readonly RoutedEvent* ShadowInitEvent |
C++/CLI | |
---|
public:
static readonly RoutedEvent^ ShadowInitEvent |
Example
The following example code demonstrates how to create custom object / image and uses it as drag shadow object when drag drop take place.
XAML |
Copy Code |
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
<i:Interaction.Behaviors>
<Intersoft:DragDropBehavior ShadowInit="DragDropBehavior_ShadowInit"/>
</i:Interaction.Behaviors>
<Image Source="folder.png" Height="64" Width="64"/>
<TextBlock Text="My Archive" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</StackPanel>
|
C# |
Copy Code |
private void DragDropBehavior_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