Create Shap Animations in wpf application

Leave a Comment
Create Different types of shapes with animations in wpf application. Here i will give you complete source code with demo. Let's start to see the code,

Main window
<Window x:Class="ShapeAnimation.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Height="350" Width="525">
    <Canvas>
        <Rectangle Height="100" Width="50" Fill="Red" Canvas.Top="100" Canvas.Left="100" Stroke="Yellow" StrokeThickness="5"></Rectangle>
        <Rectangle Height="50" Width="50" Fill="Red" Canvas.Top="100" Canvas.Left="200" Stroke="Yellow" StrokeThickness="5"></Rectangle>
        <Ellipse Height="50" Width="50" Fill="Red" Canvas.Top="100" Canvas.Left="270" Stroke="Yellow" StrokeThickness="5"></Ellipse>
        <Line X1="0" Y1="0" X2="300" Y2="300" Stroke="Green" StrokeThickness="5"></Line>
        <Polyline Points="120,120,125,140,250,190,200,205,120,120" Stroke="Black" StrokeThickness="5"/>
        <Polyline Points="220,220,225,240,350,290,300,305,220,220" Fill="pink" Stroke="Black" StrokeThickness="5"/>
    </Canvas>
</Window>
Now you can see all types of shapes which we have created using design part of wpf application.



0 comments:

Post a Comment