private void OnRightBladeContentSizeChanged(object sender, SizeChangedEventArgs e) => RightBladeContent.Visual().CenterPoint = new Vector3(RightBladeContent.ActualWidth.ToFloat(), (RightBladeToggle.Margin.Top + RightBladeToggle.ActualHeight / 2).ToFloat(), 0.0f);
public ActivityView() { InitializeComponent(); SetupMapStyle(); EnableAnimations(); void SetupMapStyle() { ActivityMap.StyleSheet = MapStyleSheet.ParseFromJson(@" { ""version"": ""1.*"", ""settings"": { ""landColor"": ""#FF101416"", ""spaceColor"": ""#FF101416"", ""shadedReliefVisible"": false, ""atmosphereVisible"": false, ""logosVisible"": false }, ""elements"": { ""mapElement"": { ""labelVisible"": true, ""labelColor"": ""#FF3E4244"", ""labelOutlineColor"": ""#FF0B0F11"", ""strokeColor"": ""#FF0B0F11"", ""strokeWidthScale"": 1 }, ""political"": { ""borderStrokeColor"": ""#FF1E3B49"", ""borderOutlineColor"": ""#00000000"" }, ""point"": { ""iconColor"": ""#00000000"", ""fillColor"": ""#00000000"", ""strokeColor"": ""#00000000"" }, ""roadShield"": { ""scale"": 0 }, ""transportation"": { ""strokeColor"": ""#00000000"", ""fillColor"": ""#FF0B0F11"" }, ""road"": { ""strokeColor"": ""#00000000"", ""fillColor"": ""#FF0B0F11"" }, ""controlledAccessHighway"": { ""strokeColor"": ""#00000000"", ""fillColor"": ""#FF0B0F11"" }, ""highSpeedRamp"": { ""strokeColor"": ""#00000000"", ""fillColor"": ""#FF0B0F11"" }, ""highway"": { ""strokeColor"": ""#00000000"", ""fillColor"": ""#FF0B0F11"" }, ""majorRoad"": { ""strokeColor"": ""#00000000"", ""fillColor"": ""#FF060809"" }, ""arterialRoad"": { ""strokeColor"": ""#00000000"", ""fillColor"": ""#FF0B0F11"" }, ""street"": { ""strokeColor"": ""#00000000"", ""fillColor"": ""#FF0B0F11"" }, ""ramp"": { ""strokeColor"": ""#00000000"", ""fillColor"": ""#FF0B0F11"" }, ""unpavedStreet"": { ""strokeColor"": ""#00000000"", ""fillColor"": ""#FF0B0F11"" }, ""tollRoad"": { ""strokeColor"": ""#00000000"", ""fillColor"": ""#FF0B0F11"" }, ""railway"": { ""strokeColor"": ""#00000000"", ""fillColor"": ""#FF0B0F11"" }, ""trail"": { ""strokeColor"": ""#00000000"", ""fillColor"": ""#FF0B0F11"" }, ""waterRoute"": { ""strokeColor"": ""#00000000"", ""fillColor"": ""#FF182127"" }, ""water"": { ""strokeColor"": ""#00000000"", ""fillColor"": ""#FF182127"" }, ""river"": { ""strokeColor"": ""#00000000"", ""fillColor"": ""#FF182127"" }, ""structure"": { ""fillColor"": ""#FF0B0F11"" }, ""area"": { ""fillColor"": ""#FF0B0F11"" } } } "); } void EnableAnimations() { ActionsPanel.EnableFluidVisibilityAnimation(AnimationAxis.Y, -174.0f, -174.0f, showDuration: 400, hideDuration: 400); ActivityType.EnableFluidVisibilityAnimation(AnimationAxis.Y, 12.0f, -12.0f, showDuration: 400, hideDuration: 400, showDelay: 800); LeftBladeToggle.EnableFluidVisibilityAnimation(centerPoint: new Vector3(20.0f, 20.0f, 0.0f), showFromScale: 0.2f, hideToScale: 0.2f, showDuration: 400, hideDuration: 400); RightBladeToggle.EnableFluidVisibilityAnimation(centerPoint: new Vector3(20.0f, 20.0f, 0.0f), showFromScale: 0.2f, hideToScale: 0.2f, showDuration: 400, hideDuration: 400); LeftBladeContent.EnableFluidVisibilityAnimation(showFromScale: 0.0f, hideToScale: 0.0f, showDuration: 400, hideDuration: 400); RightBladeContent.EnableFluidVisibilityAnimation(showFromScale: 0.0f, hideToScale: 0.0f, showDuration: 400, hideDuration: 400, showDelay: 100); RightBladeToggle.EnableImplicitAnimation(VisualPropertyType.Offset, 400, 100); } }