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 AppLabel : Label | |
{ | |
} |
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
[assembly: ExportRenderer(typeof(AppLabel), typeof(AppLabelRenderer))] | |
namespace MyProject.Droid.Renderers | |
{ | |
public class AppLabelRenderer : LabelRenderer | |
{ | |
readonly Context GetContext; | |
public AppLabelRenderer(Context context) : base(context) | |
{ | |
GetContext = context; | |
} |
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 System.Threading.Tasks; | |
using System.Windows.Input; | |
using Xamarin.Forms; | |
//TapCommandProperty | |
public static class AppAttachProperties | |
{ | |
public static readonly BindableProperty TapCommandProperty = | |
BindableProperty.CreateAttached( | |
"TapCommand", |
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:appHelpers="clr-namespace:ProjectName.Mobile.Helpers" | |
x:Class="ProjectName.Mobile.Views.TestPage"> | |
<!--ContentPage Content--> | |
<Grid | |
BackgroundColor="{StaticResource whiteColor}" | |
RowSpacing="0" | |
ColumnSpacing="0"> |
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 System; | |
using System.Threading.Tasks; | |
using System.Windows.Input; | |
using Xamarin.Forms; | |
public class TapToCommandBehavior : Behavior | |
{ | |
private readonly TapGestureRecognizer tapGestureRecognizer; | |
private View AttachedToView; |
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:appBehaviors="clr-namespace:ProjectName.Mobile.Behaviors" | |
x:Class="ProjectName.Mobile.Views.TestPage"> | |
<!--ContentPage Content--> | |
<Grid | |
BackgroundColor="{StaticResource whiteColor}" | |
RowSpacing="0" | |
ColumnSpacing="0"> |
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 interface IApiService<TInterfaceService> | |
{ | |
// Use to fetch data into a cache when a page loads. Expect that | |
// these requests will only get so far then give up and start failing | |
TInterfaceService Speculative { get; } | |
// Use for network requests that are fetching data that the user is | |
// waiting on *right now* | |
TInterfaceService UserInitiated { get; } |
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 System; | |
using System.Net; | |
using System.Net.Http; | |
using System.Threading.Tasks; | |
using Fusillade; | |
using ModernHttpClient; | |
using Newtonsoft.Json; | |
using Refit; | |
/// <summary> |
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 System.Threading.Tasks; | |
using Refit; | |
public interface IAuthenticationService | |
{ | |
[Get("/auth/basiclogin")] | |
Task<TResult> AuthenticateUserAsync<TResult>([Header("Authorization")] string authorization); | |
[Get("/auth/logout")] | |
Task<TResult> LogoutUserAsync<TResult>(); |
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
protected override void RegisterTypes(IContainerRegistry containerRegistry) | |
{ | |
containerRegistry.RegisterSingleton<IApiService<IAuthenticationService>, ApiService<IAuthenticationService>>(); | |
containerRegistry.RegisterForNavigation<NavigationPage>(); | |
containerRegistry.RegisterForNavigation<LoginPage, LoginPageViewModel>(); | |
} |
OlderNewer