void Blink(Eye eye) { // TODO: figure out from the VisualState what control it belongs to eye.Closed.Animate(eye, 0.2.seconds()) .WhenComplete(a => eye.HalfOpen.Animate(eye, 0.2.seconds()).Begin()) .Begin(); }
public void InitializeComponent() { if (_contentLoaded) { return; } _contentLoaded = true; System.Windows.Application.LoadComponent(this, new System.Uri("/AnimateSamples.SL;component/BodyControls/FriendlyGuyHead.xaml", System.UriKind.Relative)); this.LayoutRoot = ((System.Windows.Controls.Canvas)(this.FindName("LayoutRoot"))); this.Ear = ((System.Windows.Controls.Canvas)(this.FindName("Ear"))); this.Hair = ((System.Windows.Controls.Canvas)(this.FindName("Hair"))); this.Face = ((System.Windows.Controls.Canvas)(this.FindName("Face"))); this.Chin = ((System.Windows.Controls.Canvas)(this.FindName("Chin"))); this.Nose = ((System.Windows.Controls.Canvas)(this.FindName("Nose"))); this.Mouth = ((System.Windows.Controls.Canvas)(this.FindName("Mouth"))); this.LowerLip = ((System.Windows.Shapes.Path)(this.FindName("LowerLip"))); this.LeftEye = ((AnimateSamples.BodyControls.Eye)(this.FindName("LeftEye"))); this.RightEye = ((AnimateSamples.BodyControls.Eye)(this.FindName("RightEye"))); }
public void InitializeComponent() { if (_contentLoaded) { return; } _contentLoaded = true; System.Windows.Application.LoadComponent(this, new System.Uri("/AnimateSamples.SL;component/MainPage.xaml", System.UriKind.Relative)); this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot"))); this.Title = ((System.Windows.Controls.TextBlock)(this.FindName("Title"))); this.ButtonBar1 = ((System.Windows.Controls.StackPanel)(this.FindName("ButtonBar1"))); this.btnFadeIn = ((System.Windows.Controls.Button)(this.FindName("btnFadeIn"))); this.btnFadeOut = ((System.Windows.Controls.Button)(this.FindName("btnFadeOut"))); this.btnCrossFade = ((System.Windows.Controls.Button)(this.FindName("btnCrossFade"))); this.btnRotateBy = ((System.Windows.Controls.Button)(this.FindName("btnRotateBy"))); this.btnRotateTo = ((System.Windows.Controls.Button)(this.FindName("btnRotateTo"))); this.ButtonBar2 = ((System.Windows.Controls.StackPanel)(this.FindName("ButtonBar2"))); this.btnMoveTo = ((System.Windows.Controls.Button)(this.FindName("btnMoveTo"))); this.btnMoveBy = ((System.Windows.Controls.Button)(this.FindName("btnMoveBy"))); this.btnResizeTo = ((System.Windows.Controls.Button)(this.FindName("btnResizeTo"))); this.btnResizeBy = ((System.Windows.Controls.Button)(this.FindName("btnResizeBy"))); this.btnGroup = ((System.Windows.Controls.Button)(this.FindName("btnGroup"))); this.MainStage = ((System.Windows.Controls.Canvas)(this.FindName("MainStage"))); this.eyeball = ((AnimateSamples.BodyControls.Eye)(this.FindName("eyeball"))); this.guy = ((AnimateSamples.BodyControls.FriendlyGuyWhole)(this.FindName("guy"))); this.FriendlyGuy = ((AnimateSamples.BodyControls.FriendlyGuy)(this.FindName("FriendlyGuy"))); this.textBlock1 = ((System.Windows.Controls.TextBlock)(this.FindName("textBlock1"))); this.ControlBoard = ((AnimateSamples.HappyFaceControlBoard)(this.FindName("ControlBoard"))); }