https://github.com/felipebaltazar/Xartic
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
using MyProject.Abstractions.Data; | |
using MyProject.Abstractions.Data.Repositories; | |
using MyProject.Models; | |
using LiteDB; | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Linq.Expressions; | |
using System.Threading.Tasks; |
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 static IsNullOrEmpty<T>(this IEnumerable<T> collection) | |
{ | |
if(collection is null) | |
return; | |
return !collection.Any(); | |
} | |
//usar assim collecao.IsNullOrEmpty() |
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 sealed class MeuServico : ObjectWithPolicy { | |
#region Fields | |
//Api refit | |
private readonly IApiClient _apiClient; | |
#endregion | |
#region Constructors |
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 asbtract BaseViewModel : INotifyPropertyChanged | |
{ | |
protected async Task RunBusyAction (Task busyTask) | |
{ | |
if(IsBusy) | |
return; | |
IsBusy = true; | |
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
<views:AvatarView Size="{Binding Value, Source={x:Reference Slider}}" | |
Text="{Binding Initials}" Source="{Binding Source}" /> |
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
<views:RangeSlider | |
x:Name="RangeSlider" | |
MaximumValue="10" | |
MinimumValue="-10" | |
LowerValue="-10" | |
UpperValue="10" | |
ValueLabelStringFormat="{StaticResource CustomValueLabeStringFormat}" | |
LowerValueLabelStyle="{StaticResource CustomLowerValueLabelStyle}" | |
UpperValueLabelStyle="{StaticResource CustomUpperValueLabelStyle}" | |
ThumbSize="{Binding Value, Source={x:Reference ThumbSizeSlider}}" |
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
<Button Text="Testing Fade Animation"> | |
<Button.Behaviors> | |
<behaviors:AnimationBehavior EventName="Clicked"> | |
<behaviors:AnimationBehavior.AnimationType> | |
<behaviors:FadeAnimation Easing="BounceIn" Duration="100"/> | |
</behaviors:AnimationBehavior.AnimationType> | |
</behaviors:AnimationBehavior> | |
</Button.Behaviors> | |
</Button> |
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 class MainPageViewModel : ViewModelBase | |
{ | |
private readonly IDisposable _gpsDisposer; | |
... | |
public MainPageViewModel(INavigationService navigationService, IGpsManager gpsManager) | |
: base(navigationService) | |
{ | |
... | |