當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。