private void InitAppBar() { StringResources stx = StringResources.Load("NavigationTitles"); if (StoreServicesFeedbackLauncher.IsSupported()) { FeedbackBtn = UIAliases.CreateAppBarBtn(SegoeMDL2.FeedbackApp, stx.Text("Feedback")); FeedbackBtn.Click += FeedbackBtn_Click; MinorControls = new ICommandBarElement[] { FeedbackBtn }; } NewsBtn = UIAliases.CreateAppBarBtn(Symbol.Important, stx.Text("News")); NewsBtn.Click += NewsBtn_Click; NewsStory = new Storyboard(); SimpleStory.DoubleAnimation(NewsStory, NewsBtn, "Opacity", 0, 1, 350); NewsStory.AutoReverse = true; NewsStory.RepeatBehavior = RepeatBehavior.Forever; MajorControls = new ICommandBarElement[] { NewsBtn }; GetAnnouncements(); MessageBus.SendUI(typeof(GR.GSystem.ActionCenter), AppKeys.PM_CHECK_TILES); }
public async Task ExitAnima() { AnimaStory.Stop(); AnimaStory.Children.Clear(); SimpleStory.DoubleAnimation(AnimaStory, HeaderPanel, "Opacity", 1, 0, 350, 400, Easings.EaseInCubic); SimpleStory.DoubleAnimation(AnimaStory, HeaderPanel.RenderTransform, "Y", 0, 30, 350, 400, Easings.EaseInCubic); SimpleStory.DoubleAnimation(AnimaStory, ScriptDesc, "Opacity", 1, 0, 350, 300, Easings.EaseInCubic); SimpleStory.DoubleAnimation(AnimaStory, ScriptDesc.RenderTransform, "Y", 0, 30, 350, 300, Easings.EaseInCubic); SimpleStory.DoubleAnimation(AnimaStory, HistoryHeader, "Opacity", 1, 0, 350, 300, Easings.EaseInCubic); SimpleStory.DoubleAnimation(AnimaStory, HistoryHeader.RenderTransform, "Y", 0, 30, 350, 300, Easings.EaseInCubic); SimpleStory.DoubleAnimation(AnimaStory, HistoryGrid, "Opacity", 1, 0, 350, 300, Easings.EaseInCubic); SimpleStory.DoubleAnimation(AnimaStory, HistoryGrid.RenderTransform, "Y", 0, 30, 350, 300, Easings.EaseInCubic); SimpleStory.DoubleAnimation(AnimaStory, InfoPanel, "Opacity", 1, 0, 350, 200, Easings.EaseInCubic); SimpleStory.DoubleAnimation(AnimaStory, InfoPanel.RenderTransform, "Y", 0, 30, 350, 200, Easings.EaseInCubic); SimpleStory.DoubleAnimation(AnimaStory, StatPanel, "Opacity", 1, 0, 350, 100, Easings.EaseInCubic); SimpleStory.DoubleAnimation(AnimaStory, StatPanel.RenderTransform, "Y", 0, 30, 350, 100, Easings.EaseInCubic); SimpleStory.DoubleAnimation(AnimaStory, AccessControls, "Opacity", 1, 0, 350, 100, Easings.EaseInCubic); SimpleStory.DoubleAnimation(AnimaStory, AccessControls.RenderTransform, "Y", 0, 30, 350, 100, Easings.EaseInCubic); AnimaStory.Begin(); await Task.Delay(1000); }
public async Task ExitAnima() { AnimaStory.Stop(); AnimaStory.Children.Clear(); if (SplashCover.Filling) { SimpleStory.DoubleAnimation(AnimaStory, SplashCover, "Opacity", 1, 0, 350, 0, Easings.EaseInCubic); } SplashCover.SplashOut(); SimpleStory.DoubleAnimation(AnimaStory, Indicators, "Opacity", 1, 0, 350, 400, Easings.EaseInCubic); SimpleStory.DoubleAnimation(AnimaStory, Indicators.RenderTransform, "Y", 0, -30, 350, 400, Easings.EaseInCubic); SimpleStory.DoubleAnimation(AnimaStory, HeaderPanel, "Opacity", 1, 0, 350, 300, Easings.EaseInCubic); SimpleStory.DoubleAnimation(AnimaStory, HeaderPanel.RenderTransform, "Y", 0, 30, 350, 300, Easings.EaseInCubic); SimpleStory.DoubleAnimation(AnimaStory, StatusPanel, "Opacity", 1, 0, 350, 200, Easings.EaseInCubic); SimpleStory.DoubleAnimation(AnimaStory, StatusPanel.RenderTransform, "Y", 0, 30, 350, 200, Easings.EaseInCubic); SimpleStory.DoubleAnimation(AnimaStory, IntroText, "Opacity", 1, 0, 350, 100, Easings.EaseInCubic); SimpleStory.DoubleAnimation(AnimaStory, IntroText.RenderTransform, "Y", 0, 30, 350, 100, Easings.EaseInCubic); AnimaStory.Begin(); await Task.Delay(1000); }
public async Task ExitAnima() { AnimaStory.Stop(); AnimaStory.Children.Clear(); SimpleStory.DoubleAnimation(AnimaStory, LayoutRoot, "Opacity", 1, 0, 350); AnimaStory.Begin(); await Task.Delay(500); }
public async Task EnterAnima() { AnimaStory.Stop(); AnimaStory.Children.Clear(); SimpleStory.DoubleAnimation(AnimaStory, LayoutRoot, "Opacity", 0, 1); SimpleStory.DoubleAnimation(AnimaStory, LayoutRoot.RenderTransform, "Y", 30, 0); AnimaStory.Begin(); await Task.Delay(350); }
public async Task ExitAnima() { AnimaStory.Stop(); AnimaStory.Children.Clear(); SimpleStory.DoubleAnimation(AnimaStory, LayoutRoot, "Opacity", 1, 0, 350, 0, Easings.EaseInCubic); SimpleStory.DoubleAnimation(AnimaStory, LayoutRoot.RenderTransform, "Y", 0, 30, 350, 0, Easings.EaseInCubic); AnimaStory.Begin(); await Task.Delay(350); }
private void MoveBounds(string ProcessId, string WindowId, Rect R) { ProfileId = $"{ProcessId}\n{WindowId}"; TargetBounds = R; SimpleStory.DoubleAnimation(PreviewStory, this, "Top", this.Top, R.Top, 250, 250); SimpleStory.DoubleAnimation(PreviewStory, this, "Left", this.Left, R.Left, 250); SimpleStory.DoubleAnimation(PreviewStory, this, "Width", this.Width, R.Width, 250); SimpleStory.DoubleAnimation(PreviewStory, this, "Height", this.Height, R.Height, 250, 250); PreviewStory.Begin(); }
private void Window_Loaded(object sender, RoutedEventArgs e) { Storyboard BStory = new Storyboard() { AutoReverse = true, RepeatBehavior = RepeatBehavior.Forever }; SimpleStory.DoubleAnimation(BStory, SelBounds, "Opacity", 1, 0.5, 1000); BStory.Begin(); var j = ShowProcessList(); }
private void SetTemplate() { Indicators.RenderTransform = new TranslateTransform(); HeaderPanel.RenderTransform = new TranslateTransform(); StatusPanel.RenderTransform = new TranslateTransform(); IntroText.RenderTransform = new TranslateTransform(); InfoBgContext = new BgContext(GRConfig.BookInfoView.BgContext); InfoBgContext.ApplyBackgrounds(); InitAppBar(); CacheStateStory = new Storyboard(); ReloadIcon.RenderTransform = new RotateTransform() { CenterX = 7.5, CenterY = 7.5 }; SimpleStory.DoubleAnimation(CacheStateStory, ReloadIcon.RenderTransform, "Angle", 0, 360, 2000, 0, new SineEase()); CacheStateStory.RepeatBehavior = RepeatBehavior.Forever; }
public async Task EnterAnima() { SplashCover.Opacity = 1; SplashCover.SplashIn(); AnimaStory.Stop(); AnimaStory.Children.Clear(); SimpleStory.DoubleAnimation(AnimaStory, HeaderPanel, "Opacity", 0, 1, 350, 100); SimpleStory.DoubleAnimation(AnimaStory, HeaderPanel.RenderTransform, "Y", 30, 0, 350, 100); SimpleStory.DoubleAnimation(AnimaStory, StatusPanel, "Opacity", 0, 1, 350, 200); SimpleStory.DoubleAnimation(AnimaStory, StatusPanel.RenderTransform, "Y", 30, 0, 350, 200); SimpleStory.DoubleAnimation(AnimaStory, IntroText, "Opacity", 0, 1, 350, 300); SimpleStory.DoubleAnimation(AnimaStory, IntroText.RenderTransform, "Y", 30, 0, 350, 300); SimpleStory.DoubleAnimation(AnimaStory, Indicators, "Opacity", 0, 1, 350, 400); SimpleStory.DoubleAnimation(AnimaStory, Indicators.RenderTransform, "Y", -30, 0, 350, 400); AnimaStory.Begin(); await Task.Delay(1000); }
protected override void ContentBeginAway(bool Next) { if (CurrManiState == ManiState.NORMAL) { return; } ContentAway = new Storyboard(); if (Next) { SimpleStory.DoubleAnimation( ContentAway, _CGTransform, "TranslateY" , _CGTransform.TranslateY , -_MainSplitView.ActualHeight); StepNextTitle(); } else { SimpleStory.DoubleAnimation( ContentAway, _CGTransform, "TranslateY" , _CGTransform.TranslateY , _MainSplitView.ActualHeight); StepPrevTitle(); } ContentAway.Completed += (s, e) => { ContentAway.Stop(); _CGTransform.TranslateX = 0; _CGTransform.TranslateY = -( double )_CGTransform.GetValue(CompositeTransform.TranslateYProperty); ReaderSlideBack(); }; ContentAway.Begin(); }
private static void BindMouseDragHandlers(Canvas Stage, FrameworkElement Elem, Action <System.Windows.Vector> HandleStack) { Point DragStart; void _OnMove(object sender, MouseEventArgs e) { if (e.LeftButton == MouseButtonState.Pressed) { Point DragEnd = e.GetPosition(Stage); var d = DragEnd - DragStart; DragStart = DragEnd; HandleStack(d); } else { Elem.ReleaseMouseCapture(); Elem.MouseMove -= _OnMove; } } Elem.KeyDown += (s, e) => { e.Handled = true; double d = 0; if (e.IsRepeat) { double t = Step; d = (t *= 0.5) * t * t; Step += 0.075; } else { Step = 0.1; d = 0.1; } switch (e.Key) { case Key.Up: HandleStack(new System.Windows.Vector(0, -d)); break; case Key.Down: HandleStack(new System.Windows.Vector(0, d)); break; case Key.Left: HandleStack(new System.Windows.Vector(-d, 0)); break; case Key.Right: HandleStack(new System.Windows.Vector(d, 0)); break; } }; Storyboard ElemStory = new Storyboard(); Elem.DataContext = ElemStory; Elem.MouseEnter += (s, e) => { SimpleStory.DoubleAnimation(ElemStory, Elem, "Opacity", Elem.Opacity, OPACITY_MOUSE_OVER); ElemStory.Begin(); }; Elem.MouseLeave += (s, e) => { SimpleStory.DoubleAnimation(ElemStory, Elem, "Opacity", Elem.Opacity , Elem.Equals(FocusManager.GetFocusedElement(Stage)) ? OPACITY_MOUSE_DOWN : OPACITY_IDLE); ElemStory.Begin(); }; Elem.MouseDown += (s, e) => { e.Handled = true; if (FocusManager.GetFocusedElement(Stage) is FrameworkElement OElem && !Elem.Equals(OElem) && OElem.DataContext is Storyboard BlurStory) { SimpleStory.DoubleAnimation(BlurStory, OElem, "Opacity", OElem.Opacity, OPACITY_IDLE); BlurStory.Begin(); } FocusManager.SetFocusedElement(Stage, Elem); Elem.CaptureMouse(); DragStart = e.GetPosition(Stage); Elem.MouseMove += _OnMove; SimpleStory.DoubleAnimation(ElemStory, Elem, "Opacity", Elem.Opacity, OPACITY_IDLE_FOCUS); ElemStory.Begin(); }; Elem.MouseUp += (s, e) => { Elem.ReleaseMouseCapture(); Elem.MouseMove -= _OnMove; SimpleStory.DoubleAnimation(ElemStory, Elem, "Opacity", Elem.Opacity, OPACITY_MOUSE_OVER); ElemStory.Begin(); }; }