العودة   منتدى رياض الجنة - Riad Al-Ganah > الرياض التقنية > روضة الكورسات والدورات التقنية والعلمية > روضة دورات تقنية الـ .NET بلغاتها المختلفة > روضة دورات لغة الـ CSharp > دورة CSharp 2008 من منتدى فيجوال بيسك للعرب

دورة CSharp 2008 من منتدى فيجوال بيسك للعرب مقدم الدورة : الأخ طارق الدويري . حالة الدورة : متوقفة مؤقتاً . عدد الدروس حتى الآن : 23 درس

إضافة رد

  #1  
قديم 02-12-2010, 03:09 AM
الصورة الرمزية khaledbelal
khaledbelal khaledbelal غير متواجد حالياً
مبرمج المنتدى
الادارة تكليف لا تشريف
 
تاريخ التسجيل: Oct 2009
العمر: 34
المشاركات: 3,606
افتراضي الدرس 14: شرح تقنية ال wpf مع بعض الأمثلة دورة C#

السلام عليكم ورحمة الله وبركاته...
أولا: ما هي ال wpf...
خي تقنية جديدة ظهرت مع .net 3.0
حيث أصبح بإمكانك إستخدام لغة XAML لبرمجة واجهات برنامج لذلك نلاحظ أن هذه التقنية لا تخص اللغة من ناحية تصميم الواجهات وإنما تخص لغة XAML وبما أنها كذلك سوف أمر مرورا عليها بعد أن أعرفك بأهم تأثيراتها وميزاتها...

- كيفية الإستخدام ...
قم بإنشاء مشروع جديد ثم إختر WPF Application
سوف يظهر لك برمجة ال XAML في أسفل الشاشة وهنا يتم كتابة الأكواد...
________________________________________
المثال -1-:
عمل بعض التأثيرات على Button ..

كود PHP:
        <Button Margin="79,89,0,0" VerticalAlignment="Top" Height="32" *******="Button" Background="#FFD95858" BorderThickness="7,7,7,7" Foreground="#FFFFFFFF" HorizontalAlignment="Left" Width="128">
            <
Button.BitmapEffect>
                <
OuterGlowBitmapEffect GlowColor="Red"></OuterGlowBitmapEffect>
            </
Button.BitmapEffect>
            <
Button.BorderBrush>
                <
LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                    <
GradientStop Color="#FF000000" Offset="0"/>
                    <
GradientStop Color="#FFA48F8F" Offset="1"/>
                </
LinearGradientBrush>
            </
Button.BorderBrush>
        </
Button
حيث يكون الكود كاملا,,

كود PHP:
<Window x:Class="Window1"
    
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    
Title="Window1" Height="365" Width="588">
    <
Grid Height="323" Width="555">
        <
Button Margin="79,89,0,0" VerticalAlignment="Top" Height="32" *******="Button" Background="#FFD95858" BorderThickness="7,7,7,7" Foreground="#FFFFFFFF" HorizontalAlignment="Left" Width="128">
            <
Button.BitmapEffect>
                <
OuterGlowBitmapEffect GlowColor="Red"></OuterGlowBitmapEffect>
            </
Button.BitmapEffect>
            <
Button.BorderBrush>
                <
LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                    <
GradientStop Color="#FF000000" Offset="0"/>
                    <
GradientStop Color="#FFA48F8F" Offset="1"/>
                </
LinearGradientBrush>
            </
Button.BorderBrush>
        </
Button>
    </
Grid>
</
Window
- المثال 2:
عمل ProgressBar أفقي مع بعض التأثيرات المختلفة عما سبق..

كود PHP:
<Window
 xmlns
="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
 
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
 
x:Class="UntitledProject1.Window1"
 
x:Name="Window"
 
Title="Window1"
 
Width="640" Height="480">
    <
Grid x:Name="LayoutRoot">
        <
ProgressBar Margin="200,193,221,0" VerticalAlignment="Top" Height="19" RenderTransformOrigin="0.5,0.5" BorderThickness="2,2,2,2" Background="#FFD79B9B" Value="50" Foreground="#FF304058" Orientation="Horizontal" SmallChange="5">
            <
ProgressBar.BitmapEffect>
                <
BevelBitmapEffect></BevelBitmapEffect>
            </
ProgressBar.BitmapEffect>
            <
ProgressBar.BorderBrush>
                <
LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                    <
GradientStop Color="#FFFF0000" Offset="0"/>
                    <
GradientStop Color="#FF000000" Offset="1"/>
                </
LinearGradientBrush>
            </
ProgressBar.BorderBrush>
            <
ProgressBar.OpacityMask>
                <
LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                    <
GradientStop Color="#FF000000" Offset="0"/>
                    <
GradientStop Color="#FFB43E3E" Offset="1"/>
                </
LinearGradientBrush>
            </
ProgressBar.OpacityMask>
            <
ProgressBar.RenderTransform>
                <
TransformGroup>
                    <
ScaleTransform ScaleX="1" ScaleY="1"/>
                    <
SkewTransform AngleX="-3.5041414214731503E-15" AngleY="0"/>
                    <
RotateTransform Angle="-90"/>
                    <
TranslateTransform X="0" Y="0"/>
                </
TransformGroup>
            </
ProgressBar.RenderTransform>
        </
ProgressBar>
    </
Grid>
</
Window
عمل Animation لشيئ معين...

كود PHP:
<Window
 xmlns
="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
 
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
 
x:Class="UntitledProject4.Window1"
 
x:Name="Window"
 
Title="Window1"
 
Width="640" Height="480">
 <
Window.Resources>
  <
Storyboard x:Key="MyMovie1">
   <
DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="button" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)">
    <
SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-1.863"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-4.832"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-5.342"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-6.01"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-6.519"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-7.371"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-8.249"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-8.765"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-8.957"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-9.154"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-9.674"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-10.398"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-10.609"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-11.349"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-11.573"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-12.328"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-12.564"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-13.092"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-13.614"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-13.862"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-14.115"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-14.902"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-15.696"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-17.018"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-17.534"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-18.338"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-18.847"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-19.148"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-19.964"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-20.785"/>
   </
DoubleAnimationUsingKeyFrames>
   <
DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="button" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)">
    <
SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-3"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-5"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-6"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-8"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-9"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-10"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-11"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-12"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-13"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-14"/>
   </
DoubleAnimationUsingKeyFrames>
   <
DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="button" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)">
    <
SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-4"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-9"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-11"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-15"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-17"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-19"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-22"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-23"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-25"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-26"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-27"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-28"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-29"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-30"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-31"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-32"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-33"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-35"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-37"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-39"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-41"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-44"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-45"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-46"/>
   </
DoubleAnimationUsingKeyFrames>
   <
DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="button1" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
    <
SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="1.097"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="1.161"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="1.194"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="1.226"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="1.258"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="1.29"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="1.323"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="1.355"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="1.387"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="1.419"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="1.484"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="1.516"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="1.548"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="1.581"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="1.613"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="1.71"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="1.774"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="1.806"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="1.839"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="1.871"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="1.903"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="1.935"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="2"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="2.129"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="2.161"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="1"/>
   </
DoubleAnimationUsingKeyFrames>
   <
DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="button1" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)">
    <
SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="1.5"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="2.5"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="3"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="3.5"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="4"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="4.5"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="5"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="5.5"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="6"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="6.5"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="7.5"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="8"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="8.5"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="9"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="9.5"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="11"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="12"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="12.5"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="13"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="13.5"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="14"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="14.5"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="15.5"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="17.5"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="18"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="0"/>
   </
DoubleAnimationUsingKeyFrames>
   <
ColorAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="button2" Storyboard.TargetProperty="(Panel.Background).(SolidColorBrush.Color)">
    <
SplineColorKeyFrame KeyTime="00:00:00" Value="#FFF0F0F0"/>
    <
SplineColorKeyFrame KeyTime="00:00:02" Value="#FFF03939"/>
    <
SplineColorKeyFrame KeyTime="00:00:02" Value="#FFCF3131"/>
    <
SplineColorKeyFrame KeyTime="00:00:02" Value="#FFCF2F2F"/>
    <
SplineColorKeyFrame KeyTime="00:00:02" Value="#FFCF2E2E"/>
    <
SplineColorKeyFrame KeyTime="00:00:02" Value="#FFD12E2E"/>
    <
SplineColorKeyFrame KeyTime="00:00:02" Value="#FFD12D2D"/>
    <
SplineColorKeyFrame KeyTime="00:00:02" Value="#FFD12B2B"/>
   </
ColorAnimationUsingKeyFrames>
   <
ColorAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="button3" Storyboard.TargetProperty="(TextElement.Foreground).(SolidColorBrush.Color)">
    <
SplineColorKeyFrame KeyTime="00:00:00" Value="#FF000000"/>
    <
SplineColorKeyFrame KeyTime="00:00:02" Value="#FF934949"/>
    <
SplineColorKeyFrame KeyTime="00:00:02" Value="#FF934848"/>
    <
SplineColorKeyFrame KeyTime="00:00:02" Value="#FF934545"/>
    <
SplineColorKeyFrame KeyTime="00:00:02" Value="#FF994848"/>
    <
SplineColorKeyFrame KeyTime="00:00:02" Value="#FF993232"/>
    <
SplineColorKeyFrame KeyTime="00:00:02" Value="#FFA83737"/>
    <
SplineColorKeyFrame KeyTime="00:00:02" Value="#FFA83131"/>
    <
SplineColorKeyFrame KeyTime="00:00:02" Value="#FFB63535"/>
    <
SplineColorKeyFrame KeyTime="00:00:02" Value="#FFB62D2D"/>
    <
SplineColorKeyFrame KeyTime="00:00:02" Value="#FFC43131"/>
    <
SplineColorKeyFrame KeyTime="00:00:02" Value="#FFC42727"/>
    <
SplineColorKeyFrame KeyTime="00:00:02" Value="#FFD12A2A"/>
    <
SplineColorKeyFrame KeyTime="00:00:02" Value="#FFD12121"/>
    <
SplineColorKeyFrame KeyTime="00:00:02" Value="#FFDD2323"/>
    <
SplineColorKeyFrame KeyTime="00:00:02" Value="#FFDD2121"/>
    <
SplineColorKeyFrame KeyTime="00:00:02" Value="#FFE92323"/>
    <
SplineColorKeyFrame KeyTime="00:00:02" Value="#FFE91717"/>
    <
SplineColorKeyFrame KeyTime="00:00:02" Value="#FFF11818"/>
    <
SplineColorKeyFrame KeyTime="00:00:02" Value="#FFF10C0C"/>
    <
SplineColorKeyFrame KeyTime="00:00:02" Value="#FFF30C0C"/>
    <
SplineColorKeyFrame KeyTime="00:00:02" Value="#FFF30A0A"/>
    <
SplineColorKeyFrame KeyTime="00:00:02" Value="#FFF50A0A"/>
    <
SplineColorKeyFrame KeyTime="00:00:02" Value="#FFF50707"/>
    <
SplineColorKeyFrame KeyTime="00:00:02" Value="#FFF50303"/>
    <
SplineColorKeyFrame KeyTime="00:00:02" Value="#FFF70404"/>
    <
SplineColorKeyFrame KeyTime="00:00:02" Value="#FFF70202"/>
    <
SplineColorKeyFrame KeyTime="00:00:02" Value="#FFF90202"/>
   </
ColorAnimationUsingKeyFrames>
   <
ColorAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="button3" Storyboard.TargetProperty="(Panel.Background).(SolidColorBrush.Color)">
    <
SplineColorKeyFrame KeyTime="00:00:00" Value="#FFF0F0F0"/>
    <
SplineColorKeyFrame KeyTime="00:00:02" Value="#FFF04545"/>
    <
SplineColorKeyFrame KeyTime="00:00:02" Value="#FF752222"/>
    <
SplineColorKeyFrame KeyTime="00:00:02" Value="#FF732222"/>
    <
SplineColorKeyFrame KeyTime="00:00:02" Value="#FF732424"/>
    <
SplineColorKeyFrame KeyTime="00:00:02" Value="#FF732B2B"/> 
التكملة..

كود PHP:
<SplineColorKeyFrame KeyTime="00:00:02" Value="#FF642525"/>
    <
SplineColorKeyFrame KeyTime="00:00:02" Value="#FF642929"/>
    <
SplineColorKeyFrame KeyTime="00:00:02" Value="#FF4C1F1F"/>
    <
SplineColorKeyFrame KeyTime="00:00:02" Value="#FF4C2020"/>
    <
SplineColorKeyFrame KeyTime="00:00:02" Value="#FF351616"/>
    <
SplineColorKeyFrame KeyTime="00:00:02" Value="#FF2D1313"/>
    <
SplineColorKeyFrame KeyTime="00:00:02" Value="#FF2F1313"/>
    <
SplineColorKeyFrame KeyTime="00:00:02" Value="#FF3E1A1A"/>
    <
SplineColorKeyFrame KeyTime="00:00:02" Value="#FF4C2020"/>
    <
SplineColorKeyFrame KeyTime="00:00:02" Value="#FF582525"/>
    <
SplineColorKeyFrame KeyTime="00:00:02" Value="#FF5E2727"/>
    <
SplineColorKeyFrame KeyTime="00:00:02" Value="#FF5E2828"/>
    <
SplineColorKeyFrame KeyTime="00:00:02" Value="#FF682C2C"/>
    <
SplineColorKeyFrame KeyTime="00:00:02" Value="#FF8D3C3C"/>
    <
SplineColorKeyFrame KeyTime="00:00:02" Value="#FF974141"/>
    <
SplineColorKeyFrame KeyTime="00:00:02" Value="#FFA04545"/>
    <
SplineColorKeyFrame KeyTime="00:00:02" Value="#FFA64747"/>
    <
SplineColorKeyFrame KeyTime="00:00:02" Value="#FFB04B4B"/>
    <
SplineColorKeyFrame KeyTime="00:00:02" Value="#FFBA5050"/>
    <
SplineColorKeyFrame KeyTime="00:00:02" Value="#FFC85656"/>
    <
SplineColorKeyFrame KeyTime="00:00:02" Value="#FFCA5656"/>
    <
SplineColorKeyFrame KeyTime="00:00:02" Value="#FFCC5757"/>
    <
SplineColorKeyFrame KeyTime="00:00:02" Value="#FFCE5858"/>
    <
SplineColorKeyFrame KeyTime="00:00:02" Value="#FFCE6161"/>
    <
SplineColorKeyFrame KeyTime="00:00:02" Value="#FFAA5050"/>
    <
SplineColorKeyFrame KeyTime="00:00:02" Value="#FFAA5454"/>
    <
SplineColorKeyFrame KeyTime="00:00:02" Value="#FF9B4C4C"/>
    <
SplineColorKeyFrame KeyTime="00:00:02" Value="#FF9B4E4E"/>
    <
SplineColorKeyFrame KeyTime="00:00:02" Value="#FF8D4747"/>
    <
SplineColorKeyFrame KeyTime="00:00:02" Value="#FF834242"/>
    <
SplineColorKeyFrame KeyTime="00:00:02" Value="#FF834343"/>
    <
SplineColorKeyFrame KeyTime="00:00:02" Value="#FF693636"/>
    <
SplineColorKeyFrame KeyTime="00:00:02" Value="#FF693838"/>
    <
SplineColorKeyFrame KeyTime="00:00:02" Value="#FF4E2929"/>
   </
ColorAnimationUsingKeyFrames>
   <
DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="button3" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)">
    <
SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="1.271"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="2.421"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="2.952"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="3.482"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="4.536"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="5.06"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="5.582"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="6.619"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="6.749"/>
   </
DoubleAnimationUsingKeyFrames>
   <
DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="button3" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)">
    <
SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-1.345"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-1.793"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-2.241"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-2.347"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-2.796"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-3.692"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-4.483"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-4.931"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-5.827"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-6.724"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-7.172"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-7.621"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-8.57"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-9.018"/>
   </
DoubleAnimationUsingKeyFrames>
   <
DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="button3" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)">
    <
SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-0.159"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-0.212"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-0.265"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-0.278"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-0.331"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-0.437"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-0.53"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-0.584"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-0.69"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-0.796"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-0.849"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-0.902"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-1.014"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-1.067"/>
   </
DoubleAnimationUsingKeyFrames>
   <
DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="button3" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[1].(SkewTransform.AngleX)">
    <
SplineDoubleKeyFrame KeyTime="00:00:00" Value="-3.5041414214731503E-15"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-7.712"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-10.235"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-12.718"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-13.3"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-15.723"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-20.395"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-24.294"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-26.406"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-30.405"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-34.102"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-35.838"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-37.502"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-40.794"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:02" Value="-42.244"/>
   </
DoubleAnimationUsingKeyFrames>
  </
Storyboard>
 </
Window.Resources>
 <
Window.Triggers>
  <
EventTrigger RoutedEvent="FrameworkElement.Loaded">
   <
BeginStoryboard Storyboard="{StaticResource MyMovie1}"/>
  </
EventTrigger>
 </
Window.Triggers>
 <
Grid x:Name="LayoutRoot">
  <
Button Margin="125,141,311,0" VerticalAlignment="Top" Height="31" *******="Button" x:Name="button" RenderTransformOrigin="0.5,0.5">
   <
Button.RenderTransform>
    <
TransformGroup>
     <
ScaleTransform ScaleX="1" ScaleY="1"/>
     <
SkewTransform AngleX="-3.5041414214731503E-15" AngleY="0"/>
     <
RotateTransform Angle="0"/>
     <
TranslateTransform X="0" Y="0"/>
    </
TransformGroup>
   </
Button.RenderTransform>
  </
Button>
  <
Button Margin="125,176,311,0" VerticalAlignment="Top" Height="31" *******="Button" x:Name="button1" RenderTransformOrigin="0.5,0.5">
   <
Button.RenderTransform>
    <
TransformGroup>
     <
ScaleTransform ScaleX="1" ScaleY="1"/>
     <
SkewTransform AngleX="-3.5041414214731503E-15" AngleY="0"/>
     <
RotateTransform Angle="0"/>
     <
TranslateTransform X="0" Y="0"/>
    </
TransformGroup>
   </
Button.RenderTransform>
  </
Button>
  <
Button HorizontalAlignment="Left" Margin="69,0,0,118" VerticalAlignment="Bottom" Width="213" Height="26" *******="Button" x:Name="button2"/>
  <
Button HorizontalAlignment="Left" Margin="75,0,0,62" VerticalAlignment="Bottom" Width="189" Height="20" *******="Button" x:Name="button3" RenderTransformOrigin="0.5,0.5">
   <
Button.RenderTransform>
    <
TransformGroup>
     <
ScaleTransform ScaleX="1" ScaleY="1"/>
     <
SkewTransform AngleX="-3.5041414214731503E-15" AngleY="0"/>
     <
RotateTransform Angle="0"/>
     <
TranslateTransform X="0" Y="0"/>
    </
TransformGroup>
   </
Button.RenderTransform>
   <
Button.BorderBrush>
    <
LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
     <
GradientStop Color="#FF000000" Offset="0"/>
     <
GradientStop Color="#FFFFFFFF" Offset="1"/>
    </
LinearGradientBrush>
   </
Button.BorderBrush>
  </
Button>
 </
Grid>
</
Window
لا تستغرب من طول الكود ولكن في هذا الكود سوف ترى مبدأ عمل ال Animation كم هو سهل حيث تضمن الكود معظم ما يمكن فعله من تأثيرات متحركة...
مثال بسيط لا معقد

كود PHP:
<Window
 xmlns
="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
 
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
 
x:Class="UntitledProject5.Window1"
 
x:Name="Window"
 
Title="Window1"
 
Width="640" Height="480">
 <
Window.Resources>
  <
Storyboard x:Key="MyM">
   <
DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="button" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
    <
SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="1.086"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="1.171"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="1.314"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="1.6"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="1.914"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="2.086"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="2.4"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="2.714"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="3.029"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="3.286"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="3.486"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="3.657"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="3.829"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="3.914"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="4.2"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="4.514"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="4.657"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="4.829"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="5.029"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="5.314"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="5.657"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="5.771"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="5.8"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="5.829"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="5.914"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="6.029"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="6.114"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="6.143"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="6.171"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="6.2"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="6.229"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="6.286"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="6.314"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="6.2"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="6.057"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="5.771"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="5.2"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="4.743"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="4.285"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="3.685"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="2.943"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="2.428"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="2.057"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="1.857"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="1.485"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="1.285"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="1.257"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="1.171"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="1.143"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="1.114"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="1.085"/>
   </
DoubleAnimationUsingKeyFrames>
   <
DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="button" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)">
    <
SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="1.5"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="3"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="5.5"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="10.5"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="16"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="19"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="24.5"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="30"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="35.5"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="40"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="43.5"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="46.5"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="49.5"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="51"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="56"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="61.5"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="64"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="67"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="70.5"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="75.5"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="81.5"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="83.5"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="84"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="84.5"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="86"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="88"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="89.5"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="90"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="90.5"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="91"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="91.5"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="92.5"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="93"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="91"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="88.5"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="83.5"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="73.5"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="65.5"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="57.5"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="47"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="34"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="25"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="18.5"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="15"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="8.5"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="5"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="4.5"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="3"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="2.5"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="2"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="1.5"/>
   </
DoubleAnimationUsingKeyFrames>
   <
DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="button" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)">
    <
SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="1.419"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="1.892"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="1.419"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="0.946"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="1.419"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="1.892"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="2.365"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="3.311"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="3.784"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="4.257"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="5.203"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="6.149"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="6.622"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="7.095"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="7.568"/>
   </
DoubleAnimationUsingKeyFrames>
   <
DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="button" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[1].(SkewTransform.AngleX)">
    <
SplineDoubleKeyFrame KeyTime="00:00:00" Value="-3.5041414214731503E-15"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="4.274"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="5.69"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="4.274"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="2.852"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="4.274"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="5.69"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="7.1"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="9.891"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="11.27"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="12.636"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="15.323"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="17.943"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="19.225"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="20.488"/>
    <
SplineDoubleKeyFrame KeyTime="00:00:01" Value="21.73"/>
   </
DoubleAnimationUsingKeyFrames>
  </
Storyboard>
 </
Window.Resources>
 <
Window.Triggers>
  <
EventTrigger RoutedEvent="FrameworkElement.Loaded">
   <
BeginStoryboard Storyboard="{StaticResource MyM}"/>
  </
EventTrigger>
 </
Window.Triggers>
 <
Grid x:Name="LayoutRoot">
  <
Button HorizontalAlignment="Left" Margin="136,85,0,0" VerticalAlignment="Top" Width="149" Height="35" *******="Button" x:Name="button" RenderTransformOrigin="0.5,0.5">
   <
Button.RenderTransform>
    <
TransformGroup>
     <
ScaleTransform ScaleX="1" ScaleY="1"/>
     <
SkewTransform AngleX="-3.5041414214731503E-15" AngleY="0"/>
     <
RotateTransform Angle="0"/>
     <
TranslateTransform X="0" Y="0"/>
    </
TransformGroup>
   </
Button.RenderTransform>
  </
Button>
 </
Grid>
</
Window
والان لنعد إلى التأثيرات...
المثال 4-
TextBox مزخرف...

كود PHP:
<Window
 xmlns
="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
 
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
 
x:Class="UntitledProject6.Window1"
 
x:Name="Window"
 
Title="Window1"
 
Width="640" Height="480">
    <
Grid x:Name="LayoutRoot">
        <
TextBox Margin="41,61,0,0" VerticalAlignment="Top" Height="22" Text="MyText" TextWrapping="Wrap" RenderTransformOrigin="0.5,0.5" Width="197" HorizontalAlignment="Left" BorderThickness="2,2,2,2" ToolTip="MY TEXT BOX..." Background="#FFCF6464" Foreground="#FFFFCECE">
            <
TextBox.BitmapEffect>
                <
DropShadowBitmapEffect></DropShadowBitmapEffect>
            </
TextBox.BitmapEffect>
            <
TextBox.RenderTransform>
                <
TransformGroup>
                    <
ScaleTransform ScaleX="1" ScaleY="1"/>
                    <
SkewTransform AngleX="-3.5041414214731503E-15" AngleY="0"/>
                    <
RotateTransform Angle="-17.546"/>
                    <
TranslateTransform X="0" Y="0"/>
                </
TransformGroup>
            </
TextBox.RenderTransform>
        </
TextBox>
    </
Grid>
</
Window
أما بعد كل هذه الكودات بلغة XAML لنعد لل c#
لا يوجد فرق كبير بين التعامل مع ال wpf وال windows forms application
ولكن قد لا تجد بعض المكاتب ولن تستطيع إستخدام الأدوات الخاصة بال .net
بل يجب أن تكون مخصصة ك wpf
إذا لم تجد مكتبة ما.. قم باستيرادها من Project ثم Add Refrence ثم إخترها من ال .net Tap
ملاحظة : لا تفزع من طول أكواد ال Animation لأنها روتينية وسهلة لكنها طويلة...
والان يمكنك إستكشاف التأثيرات كما تشاء عن طريقة الأمثلة أو عن طريق التجربة....

***ملاحظة : طبعا هذه الأكواد لن تكتبها أنت بل سوف يكتبهت البرنامج الذي تستخدمه ***

أمتنى أن أكون قد وضعتك في بداية الطريق لهذا العالم...
إلى اللقاء في الدرس القادم إن شاء الله...

منقول من منتدى فجوال بيسك للعرب


توقيع : khaledbelal



(أَفَأَمِنَ أَهْلُ الْقُرَى أَن يَأْتِيَهُمْ بَأْسُنَا بَيَاتاً وَهُمْ نَآئِمُونَ {97} أَوَ أَمِنَ أَهْلُ الْقُرَى أَن يَأْتِيَهُمْ بَأْسُنَا ضُحًى وَهُمْ يَلْعَبُونَ {98}
أَفَأَمِنُواْ مَكْرَ اللّهِ فَلاَ يَأْمَنُ مَكْرَ اللّهِ إِلاَّ الْقَوْمُ الْخَاسِرُونَ {99}).
سورة الأعراف.

رد مع اقتباس
  #2  
قديم 02-13-2010, 03:44 AM
الصورة الرمزية المشتاقة للجنة
المشتاقة للجنة المشتاقة للجنة غير متواجد حالياً

مراقبة عامة

 
تاريخ التسجيل: Nov 2009
المشاركات: 4,422
افتراضي

جزاك الرحمن خيرا ارجو ان ينتفع به


رد مع اقتباس
  #3  
قديم 02-14-2010, 02:31 AM
الصورة الرمزية khaledbelal
khaledbelal khaledbelal غير متواجد حالياً
مبرمج المنتدى
الادارة تكليف لا تشريف
 
تاريخ التسجيل: Oct 2009
العمر: 34
المشاركات: 3,606
افتراضي

اللهم امين واياكم


توقيع : khaledbelal



(أَفَأَمِنَ أَهْلُ الْقُرَى أَن يَأْتِيَهُمْ بَأْسُنَا بَيَاتاً وَهُمْ نَآئِمُونَ {97} أَوَ أَمِنَ أَهْلُ الْقُرَى أَن يَأْتِيَهُمْ بَأْسُنَا ضُحًى وَهُمْ يَلْعَبُونَ {98}
أَفَأَمِنُواْ مَكْرَ اللّهِ فَلاَ يَأْمَنُ مَكْرَ اللّهِ إِلاَّ الْقَوْمُ الْخَاسِرُونَ {99}).
سورة الأعراف.

رد مع اقتباس
  #4  
قديم 11-02-2010, 10:16 PM
الصورة الرمزية ماريا إسلام
ماريا إسلام ماريا إسلام غير متواجد حالياً

عضو متألق

 
تاريخ التسجيل: Oct 2010
العمر: 35
المشاركات: 268
افتراضي

وعليكم السلام ورحمة الله

جزاااااكم الله خيرااااااا
،،
وفقكم الله

//


توقيع : ماريا إسلام

ربي هذا العهد لك ... عزم القلب الوفا

تستطيع أن ترى الصورة بحجمها الطبيعي بعد الضغط عليها

تستطيع أن ترى الصورة بحجمها الطبيعي بعد الضغط عليها

صفحتي على الفيسبوك!

رد مع اقتباس
إضافة رد

أدوات الموضوع
انواع عرض الموضوع

تعليمات المشاركة
لا تستطيع إضافة مواضيع جديدة
لا تستطيع الرد على المواضيع
لا تستطيع إرفاق ملفات
لا تستطيع تعديل مشاركاتك

BB code is متاحة
كود [IMG] متاحة
كود HTML معطلة

الانتقال السريع

المواضيع المتشابهه
الموضوع كاتب الموضوع المنتدى مشاركات آخر مشاركة
الدرس 12: شرح تقنية WCF والتخصص بال Sockets مع مثال دورة C# khaledbelal دورة CSharp 2008 من منتدى فيجوال بيسك للعرب 2 11-02-2010 09:40 PM
الدرس 8: أمثلة عملية على ما مضى دورة الـ c# khaledbelal دورة CSharp 2008 من منتدى فيجوال بيسك للعرب 1 10-29-2010 08:01 PM
الدرس 3: المتغيرات والثوابت (دورة الـ c#) khaledbelal دورة CSharp 2008 من منتدى فيجوال بيسك للعرب 1 10-29-2010 06:44 AM
الدرس 13: Multi-Threading دورة C# khaledbelal دورة CSharp 2008 من منتدى فيجوال بيسك للعرب 3 10-15-2010 07:02 AM
الدرس 7: التعامل مع الملفات دورة الـ c# khaledbelal دورة CSharp 2008 من منتدى فيجوال بيسك للعرب 4 10-13-2010 07:04 PM

استضافة الحياة

الساعة الآن 02:44 PM.


Powered by vBulletin® v3.8.4, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd. , TranZ By Almuhajir
النسخة الفضية
Ads Management Version 3.0.1 by Saeed Al-Atwi

SlamDesignzslamDesignzEdited by Riad Al-Ganah Team - جميع الحقوق محفوظة لشبكة رياض الجنة

Privacy Policy Valid XHTML 1.0 Transitional By SlamDesignz Valid CSS Transitional By SlamDesignz