当前位置: 首页>>代码示例>>C#>>正文


C# View.FadeTo方法代码示例

本文整理汇总了C#中Xamarin.Forms.View.FadeTo方法的典型用法代码示例。如果您正苦于以下问题:C# View.FadeTo方法的具体用法?C# View.FadeTo怎么用?C# View.FadeTo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Xamarin.Forms.View的用法示例。


在下文中一共展示了View.FadeTo方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: AnimateItem

		private async Task AnimateItem(View uiElement, uint duration ){
			while (_animate) {
				await uiElement.ScaleTo(1.05, duration, Easing.SinInOut);

				await Task.WhenAll (
					uiElement.FadeTo(1, duration, Easing.SinInOut),
					uiElement.LayoutTo (new Rectangle( new Point(0,0), new Size( uiElement.Width, uiElement.Height))),
					uiElement.FadeTo(.9, duration, Easing.SinInOut),
					uiElement.ScaleTo(1.15, duration, Easing.SinInOut)
				);
			}
		}
开发者ID:ahdproduction,项目名称:ConnectPeople,代码行数:12,代码来源:Profile.xaml.cs

示例2: Appearing

        public override Task Appearing(View content, PopupPage page)
        {
            if (HasBackgroundAnimation)
            {
                return page.FadeTo(1, DurationIn, EasingIn);
            }
            if (content != null)
            {
                return content.FadeTo(1, DurationIn, EasingIn);
            }

            return Task.FromResult(0);
        }
开发者ID:rotorgames,项目名称:Rg.Plugins.Popup,代码行数:13,代码来源:FadeAnimation.cs

示例3: Disappearing

        public override Task Disappearing(View content, PopupPage page)
        {
            _defaultOpacity = page.Opacity;

            if (HasBackgroundAnimation)
            {
                return page.FadeTo(0, DurationOut, EasingOut);
            }
            if (content != null)
            {
                return content.FadeTo(0, DurationOut, EasingOut);
            }

            return Task.FromResult(0);
        }
开发者ID:rotorgames,项目名称:Rg.Plugins.Popup,代码行数:15,代码来源:FadeAnimation.cs

示例4: AnimateItem

		private async Task AnimateItem( View uiElement, uint duration ){
			if (uiElement == null) {
				return;
			}

			await Task.WhenAll (new Task[] {
				uiElement.ScaleTo(1.5, duration, Easing.CubicIn),
				uiElement.FadeTo(1, duration/2, Easing.CubicInOut).ContinueWith(
					_ => uiElement.ScaleTo(1, duration, Easing.CubicOut))
			});			 
		}
开发者ID:ahdproduction,项目名称:ConnectPeople,代码行数:11,代码来源:WalkthroughStepItemTemplate.xaml.cs

示例5: AnimateItem

		private async Task AnimateItem(View uiElement, uint duration ){
			var originalOpacity = uiElement.Opacity;

			await uiElement.FadeTo(.5, duration/2, Easing.CubicIn);
			await uiElement.FadeTo(originalOpacity, duration/2, Easing.CubicIn);
		}
开发者ID:ahdproduction,项目名称:ConnectPeople,代码行数:6,代码来源:DashboardItemTemplate.xaml.cs

示例6: DroidLayout

		async void DroidLayout(View mainView)
		{
			if (this.Content is AbsoluteLayout) {
				await (this.Content as AbsoluteLayout).Children[0].FadeTo (0, (uint)Integers.AnimationSpeed,  Easing.SinIn);
				(this.Content as AbsoluteLayout).Children.RemoveAt (0);
				AbsoluteLayout.SetLayoutFlags(mainView, AbsoluteLayoutFlags.All);
				AbsoluteLayout.SetLayoutBounds(mainView, new Rectangle(0f, 0f, 1f, 1f));
				(this.Content as AbsoluteLayout).Children.Insert (0, mainView);
				mainView.Opacity = 0;
				await mainView.FadeTo (1, (uint)Integers.AnimationSpeed,  Easing.SinIn);
				return;
			}

			fab = new FloatingActionButtonView
			{
				ImageName = League.IsFavorite ? "ic_favorite_white" : "ic_favorite_border_white",
				ColorNormal = Color.FromHex("009688"),
				ColorPressed = Color.FromHex("80CBC4"),
				ColorRipple = Color.FromHex("E0F2F1"),
				Clicked = (sender, args) => FabAction(),
			};

			absoluteAndroid = new AbsoluteLayout
			{ 
				VerticalOptions = LayoutOptions.FillAndExpand, 
				HorizontalOptions = LayoutOptions.FillAndExpand,
			};

			// Position the pageLayout to fill the entire screen.
			// Manage positioning of child elements on the page by editing the pageLayout.
			AbsoluteLayout.SetLayoutFlags(mainView, AbsoluteLayoutFlags.All);
			AbsoluteLayout.SetLayoutBounds(mainView, new Rectangle(0f, 0f, 1f, 1f));
			absoluteAndroid.Children.Add(mainView);

			// Overlay the FAB in the bottom-right corner
			AbsoluteLayout.SetLayoutFlags(fab, AbsoluteLayoutFlags.PositionProportional);
			AbsoluteLayout.SetLayoutBounds(fab, new Rectangle(1f, 1f, AbsoluteLayout.AutoSize, AbsoluteLayout.AutoSize));
			absoluteAndroid.Children.Add(fab);

			Content = absoluteAndroid;
			await mainView.FadeTo (1, (uint)Integers.AnimationSpeed,  Easing.SinIn);
		}
开发者ID:codnee,项目名称:Scores-App,代码行数:42,代码来源:LeagueResultsPage.cs


注:本文中的Xamarin.Forms.View.FadeTo方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。