|
<UserControl
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:Explorer3D"
x:Class="Explorer3D.AmazonItem"
Height="225" Width="450"
MouseDoubleClick="UserControl_MouseDoubleClick"
>
<UserControl.Resources>
<Storyboard x:Key="OnMouseEnter">
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="canvMain" Storyboard.TargetProperty="(UIElement.Opacity)">
<SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
<Storyboard x:Key="OnMouseLeave">
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="canvMain" Storyboard.TargetProperty="(UIElement.Opacity)">
<SplineDoubleKeyFrame KeyTime="00:00:00" Value="0.3"/>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
<Storyboard x:Key="OnLoaded1">
<ColorAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="rect1" Storyboard.TargetProperty="(Shape.Stroke).(SolidColorBrush.Color)" RepeatBehavior="Forever" >
<SplineColorKeyFrame KeyTime="00:00:00" Value="#FF2A2A2A"/>
<SplineColorKeyFrame KeyTime="00:00:01" Value="Transparent"/>
<SplineColorKeyFrame KeyTime="00:00:02" Value="Transparent"/>
<SplineColorKeyFrame KeyTime="00:00:03" Value="#FF2A2A2A"/>
<SplineColorKeyFrame KeyTime="00:00:04" Value="#FF2A2A2A"/>
</ColorAnimationUsingKeyFrames>
<ColorAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="rect2" Storyboard.TargetProperty="(Shape.Stroke).(SolidColorBrush.Color)" RepeatBehavior="Forever" >
<SplineColorKeyFrame KeyTime="00:00:00" Value="Transparent"/>
<SplineColorKeyFrame KeyTime="00:00:01" Value="#FF2A2A2A"/>
<SplineColorKeyFrame KeyTime="00:00:02" Value="Transparent"/>
</ColorAnimationUsingKeyFrames>
<ColorAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="rect3" Storyboard.TargetProperty="(Shape.Stroke).(SolidColorBrush.Color)" RepeatBehavior="Forever" >
<SplineColorKeyFrame KeyTime="00:00:00" Value="Transparent"/>
<SplineColorKeyFrame KeyTime="00:00:01" Value="Transparent"/>
<SplineColorKeyFrame KeyTime="00:00:02" Value="#FF2A2A2A"/>
<SplineColorKeyFrame KeyTime="00:00:03" Value="#FF2A2A2A"/>
<SplineColorKeyFrame KeyTime="00:00:04" Value="#FF2A2A2A"/>
</ColorAnimationUsingKeyFrames>
</Storyboard>
</UserControl.Resources>
<UserControl.Triggers>
<EventTrigger RoutedEvent="Mouse.MouseEnter" SourceName="canvMain">
<BeginStoryboard Storyboard="{StaticResource OnMouseEnter}"/>
</EventTrigger>
<EventTrigger RoutedEvent="Mouse.MouseLeave" SourceName="canvMain">
<BeginStoryboard Storyboard="{StaticResource OnMouseLeave}"/>
</EventTrigger>
<EventTrigger RoutedEvent="FrameworkElement.Loaded">
<BeginStoryboard x:Name="OnLoaded1_BeginStoryboard" Storyboard="{StaticResource OnLoaded1}"/>
</EventTrigger>
</UserControl.Triggers>
<Border CornerRadius="5,5,5,5" Background="#FF2A2A2A">
<Border.Resources>
<LinearGradientBrush x:Key="RectBrush" EndPoint="1,0.5" StartPoint="0,0.5">
<GradientStop Color="#FF414141" Offset="0.428"/>
<GradientStop Color="#00FFFFFF" Offset="0.716"/>
</LinearGradientBrush>
</Border.Resources>
<Canvas Margin="5,5,5,5" Background="Black" Opacity="0.3" x:Name="canvMain">
<local:StoredImage x:Name="storedImg" Canvas.Left="10" Canvas.Top="10" Width="60" Height="120"/>
<StackPanel Orientation="Horizontal" VerticalAlignment="Bottom" Width="84" Height="21" Canvas.Left="10" Canvas.Top="180">
<Rectangle Fill="Transparent" Stroke="#FF2A2A2A" x:Name="rect1" Width="20" Height="20" Canvas.Left="23" Canvas.Top="244"/>
<Rectangle Fill="Transparent" Stroke="#FF2A2A2A" x:Name="rect2" Width="20" Height="20" Canvas.Left="23" Canvas.Top="244" Margin="10,0,0,0"/>
<Rectangle Fill="Transparent" Stroke="#FF2A2A2A" x:Name="rect3" Width="20" Height="20" Canvas.Left="23" Canvas.Top="244" Margin="10,0,0,0"/>
</StackPanel>
<Label Width="357" Height="25" Content="Author : " Canvas.Left="75" Canvas.Top="8" x:Name="lblAuthor" Background="{x:Null}" FontFamily="Arial Rounded MT" Foreground="#FFFFFFFF"/>
<Rectangle Stroke="#FF000000" Width="342" Height="6" Canvas.Left="75" Canvas.Top="38" Fill="{StaticResource RectBrush}"/>
<Label Width="357" Height="30" Content="Product Name : " x:Name="lblProductName" Background="{x:Null}" FontFamily="Arial Rounded MT" Foreground="#FFFFFFFF" Canvas.Left="75" Canvas.Top="45"/>
<Rectangle Stroke="#FF000000" Width="342" Height="6" Canvas.Left="75" Canvas.Top="70" Fill="{StaticResource RectBrush}"/>
<Label Width="357" Height="30" Content="Release Date :" x:Name="lblReleaseDate" Background="{x:Null}" FontFamily="Arial Rounded MT" Foreground="#FFFFFFFF" Canvas.Left="75" Canvas.Top="78"/>
</Canvas>
</Border>
</UserControl>
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
I currently hold the following qualifications (amongst others, I also studied Music Technology and Electronics, for my sins)
- MSc (Passed with distinctions), in Information Technology for E-Commerce
- BSc Hons (1st class) in Computer Science & Artificial Intelligence
Both of these at Sussex University UK.
Award(s)
I am lucky enough to have won a few awards for Zany Crazy code articles over the years
- Microsoft C# MVP 2016
- Codeproject MVP 2016
- Microsoft C# MVP 2015
- Codeproject MVP 2015
- Microsoft C# MVP 2014
- Codeproject MVP 2014
- Microsoft C# MVP 2013
- Codeproject MVP 2013
- Microsoft C# MVP 2012
- Codeproject MVP 2012
- Microsoft C# MVP 2011
- Codeproject MVP 2011
- Microsoft C# MVP 2010
- Codeproject MVP 2010
- Microsoft C# MVP 2009
- Codeproject MVP 2009
- Microsoft C# MVP 2008
- Codeproject MVP 2008
- And numerous codeproject awards which you can see over at my blog