PageRenderTime 32ms CodeModel.GetById 0ms RepoModel.GetById 0ms 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. <UserControl x:Class="VBSL3Animation.MyEllipse"
  17. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  18. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  19. Width="400" Height="300">
  20. <Grid x:Name="LayoutRoot" Background="Transparent" IsHitTestVisible="False">
  21. <Path>
  22. <Path.Fill>
  23. <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
  24. <GradientStop Color="#FFF1F7FB" Offset="0"/>
  25. <GradientStop Color="#FF3794E4" Offset="1"/>
  26. </LinearGradientBrush>
  27. </Path.Fill>
  28. <Path.Data>
  29. <!-- Describes an ellipse. -->
  30. <EllipseGeometry x:Name="MyAnimatedEllipseGeometry"
  31. Center="50,50" RadiusX="15" RadiusY="15" />
  32. </Path.Data>
  33. </Path>
  34. </Grid>
  35. </UserControl>