This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public async Task AnimateAsync(int totalMs = 500) | |
{ | |
var animTime = totalMs < 10 ? 500 : totalMs; | |
var currentMs = 0; | |
while (currentMs <= animTime) | |
{ | |
var valueStep = (currentMs * CurrentValue) / animTime; | |
RefreshChartValues(valueStep, MaxValue); | |
canvasView.InvalidateSurface(); | |
valueLabel.Text = $"{Math.Truncate(valueStep)}/{MaxValue}"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: 1 | |
update_configs: | |
- package_manager: "dotnet:nuget" | |
directory: "/" | |
update_schedule: "weekly" | |
default_labels: | |
- "dependency" | |
target_branch: "dev" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
internal static class JavaObjectExtensions | |
{ | |
public static bool IsDisposed(this Java.Lang.Object obj) | |
{ | |
return obj.Handle == IntPtr.Zero; | |
} | |
public static bool IsAlive(this Java.Lang.Object obj) | |
{ | |
if (obj == null) | |
return false; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<RefreshView IsRefreshing="{Binding YourIsRefreshingCommand}" Command="{Binding YourRefreshCommand}"> | |
<CollectionView ItemsSource="{Binding YourCollectionItems}"> | |
<!--All your collection view logic--> | |
</CollectionView> | |
</RefreshView> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public sealed class ConcentricOnboardView : SKCanvasView | |
{ | |
... | |
protected override void OnPaintSurface(SKPaintSurfaceEventArgs e) | |
{ | |
base.OnPaintSurface(e); | |
info = e.Info; | |
surface = e.Surface; | |
canvas = surface.Canvas; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public sealed class ConcentricOnboardView : SKCanvasView | |
{ | |
... | |
public static readonly BindableProperty ButtonDiameterProperty = | |
BindableProperty.Create(nameof(ButtonDiameter), typeof(int), typeof(ConcentricOnboardView), | |
defaultValue: 200, propertyChanged: OnButtonSizeChanged); | |
public static readonly BindableProperty CommandProperty = | |
BindableProperty.Create(nameof(Command), typeof(ICommand), typeof(ConcentricOnboardView), | |
defaultValue: default(ICommand)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" | |
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | |
xmlns:d="http://xamarin.com/schemas/2014/forms/design" | |
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | |
xmlns:controls="clr-namespace:XamConcentricOnboarding.Views.Controls" | |
mc:Ignorable="d" | |
x:Class="XamConcentricOnboarding.MainPage"> | |
<Grid> | |
<Grid.RowDefinitions> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public sealed class ConcentricOnboardView : SKCanvasView | |
{ | |
private SKRect buttonRect = new SKRect(); | |
private SKColor backgroundColor; | |
private SKColor buttonColor; | |
private SKSurface surface; | |
private SKImageInfo info; | |
private SKCanvas canvas; | |
public ConcentricOnboardView() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8" ?> | |
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" | |
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | |
xmlns:d="http://xamarin.com/schemas/2014/forms/design" | |
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | |
xmlns:controls="clr-namespace:XamConcentricOnboarding.Views.Controls" | |
mc:Ignorable="d" | |
x:Class="XamConcentricOnboarding.MainPage"> | |
<Grid> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public partial class MainPage : ContentPage | |
{ | |
public MainPage() | |
{ | |
var vm = new MainPageViewModel(); | |
this.BindingContext = vm; | |
InitializeComponent(); | |
} | |
private void OnAnimationStart(object sender, EventArgs e) |