PageRenderTime 7ms CodeModel.GetById 2ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/Visual Studio 2008/VBSL3Animation/MyEllipse.xaml

#
XAML | 36 lines | 19 code | 1 blank | 16 comment | 0 complexity | b8d333599c154ad9f21eb5a5028d5d4b MD5 | raw file
 1<!--/****************************** Module Header ******************************\
 2* Module Name:  MyEllipse.xaml
 3* Project:      VBSL3Animation
 4* Copyright (c) Microsoft Corporation.
 5* 
 6* This module shows how to write a UserControl that basically wraps EllipseGeometry
 7* to "expose" its Center property.
 8* 
 9* This source is subject to the Microsoft Public License.
10* See http://www.microsoft.com/opensource/licenses.mspx#Ms-PL.
11* All other rights reserved.
12* 
13* History:
14* * 9/8/2009 05:00 PM Allen Chen Created
15\***************************************************************************/-->
16    
17    <UserControl x:Class="VBSL3Animation.MyEllipse"
18    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
19    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
20    Width="400" Height="300">
21    <Grid x:Name="LayoutRoot" Background="Transparent" IsHitTestVisible="False">
22        <Path>
23            <Path.Fill>
24                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
25                    <GradientStop Color="#FFF1F7FB" Offset="0"/>
26                    <GradientStop Color="#FF3794E4" Offset="1"/>
27                </LinearGradientBrush>
28            </Path.Fill>
29            <Path.Data>
30                <!-- Describes an ellipse. -->
31                <EllipseGeometry x:Name="MyAnimatedEllipseGeometry"
32          Center="50,50" RadiusX="15" RadiusY="15" />
33            </Path.Data>
34        </Path>
35    </Grid>
36</UserControl>