private void InitComposition() { _compositor = this.GetVisual().Compositor; _setAsWallpaperVisual = SetAsWallpaperBtn.GetVisual(); _setAsLockVisual = SetAsLockBtn.GetVisual(); _setBothVisual = SetBothBtn.GetVisual(); _setAsTBVisual = SetAsTB.GetVisual(); _backFIVisual = BackFI.GetVisual(); _openBtnVisual = OpenBtn.GetVisual(); _shareBtnVisual = ShareBtn.GetVisual(); var opacityAnimation = _compositor.CreateScalarKeyFrameAnimation(); opacityAnimation.InsertExpressionKeyFrame(1f, "this.FinalValue"); opacityAnimation.Target = "Opacity"; opacityAnimation.Duration = TimeSpan.FromMilliseconds(200); var animations = _compositor.CreateImplicitAnimationCollection(); animations["Opacity"] = opacityAnimation; _shareBtnVisual.ImplicitAnimations = animations; _setAsWallpaperVisual.SetTranslation(new Vector3(0, 52 * 3, 0)); _setAsLockVisual.SetTranslation(new Vector3(0, 52 * 2, 0)); _setBothVisual.SetTranslation(new Vector3(0, 52 * 1, 0)); _setAsWallpaperVisual.Opacity = 0f; _setAsLockVisual.Opacity = 0f; _setBothVisual.Opacity = 0f; _backFIVisual.Opacity = 0f; _shareBtnVisual.Opacity = 0f; }
private void InitComposition() { _compositor = this.GetVisual().Compositor; _setAsWallpaperVisual = SetAsWallpaperBtn.GetVisual(); _setAsLockVisual = SetAsLockBtn.GetVisual(); _setBothVisual = SetBothBtn.GetVisual(); _setAsTBVisual = SetAsTB.GetVisual(); _backFIVisual = BackFI.GetVisual(); _openBtnVisual = OpenBtn.GetVisual(); _copyBtnVisual = CopyUrlBtn.GetVisual(); _setAsWallpaperVisual.Offset = new Vector3(0, 52 * 3, 0); _setAsLockVisual.Offset = new Vector3(0, 52 * 2, 0); _setBothVisual.Offset = new Vector3(0, 52 * 1, 0); _setAsWallpaperVisual.Opacity = 0f; _setAsLockVisual.Opacity = 0f; _setBothVisual.Opacity = 0f; _backFIVisual.Opacity = 0f; _copyBtnVisual.Opacity = 0f; }