private void OnCoordinatorLayoutOnExpansionEventHandler(object sender, ExpansionEventArgs e) { if (ActionFrame != null) { ActionFrame.CornerRadius = (float)Math.Max(0.0, MinCornerRadius + e.Progress * MaxCornerRadius); var newHorizontalMargin = MinHorizontalMargin + e.Progress * MaxHorizontalMargin; ActionFrame.Margin = new Thickness(newHorizontalMargin, ActionFrame.Margin.VerticalThickness); } if (BackgroundImage != null) { BackgroundImage.Opacity = e.Progress; } if (MainTitle != null) { MainTitle.Opacity = e.Progress; } if (SecondaryTitle != null) { if (e.Progress > 0.2f) { SecondaryTitle.Opacity = 0.0f; } else { SecondaryTitle.Opacity = (0.2f - e.Progress) / 0.2f; } } }
private void OnCoordinatorLayoutOnExpansionEventHandler(object sender, ExpansionEventArgs args) { _image.Opacity = args.Progress; _boxView.Opacity = 1.0 - args.Progress; }