// This should result in a Tabbed Page with ViewA & ViewB as tabs and ViewB as the selected Tab...
// ViewC should be a Modal over the TabbedPage
NavigationService.NavigateAsync("TabbedPage?createTab=ViewA&createTab=ViewB&selectedTab=ViewB/ViewC");
// If we're improving things... then this should create a tab with a NavigationPage with the root ViewB and current page as ViewD...
// The select tab should be able to distinguish it by NavigationPage unless more than one tab has a NavigationPage..
// otherwise it should distinguish which tab by either the root or current which ever matches...
NavigationService.NavigateAsync("TabbedPage?createTab=ViewA&createTab=NavigationPage/ViewB/ViewC/ViewD&selectedTab={NavigationPage|ViewB|ViewD}");
// Second note here that was actually invalid and should not be supported... as the first actual `/` should be treated as an entirely new segment
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 Microsoft.AspNetCore.Mvc.Filters; | |
namespace VersionCheck.API.VersionCheck | |
{ | |
public class MinimumClientVersionFilter : IActionFilter | |
{ | |
private readonly IVersionCheckService _versionCheckHelper; | |
public MinimumClientVersionFilter(IVersionCheckService versionCheckHelper) | |
{ |
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.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using Xamarin.Forms; | |
namespace BSILabs.Controls | |
{ | |
public class NullableDatePicker : DatePicker |
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.Essentials; | |
using Xamarin.Forms; | |
using Xamarin.Forms.Xaml; | |
namespace XamlOpenUrl.Extensions | |
{ | |
[ContentProperty(nameof(Url))] |
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 async void OnInitialized() | |
{ | |
try | |
{ | |
InitializeComponent(); | |
OneSignal.Current | |
.StartInit(Secrets.OneSignal) | |
.HandleNotificationOpened(OnNotificationOpened) | |
.EndInit(); |
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:local="clr-namespace:XamlFlags" | |
x:Class="XamlFlags.MainPage" | |
x:Name="Page"> | |
<ContentPage.BindingContext> | |
<local:MainPageViewModel /> | |
</ContentPage.BindingContext> | |
<StackLayout BindableLayout.ItemsSource="{Binding Options}"> |
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> | |
<StackLayout> | |
@foreach (var option in Options) | |
{ | |
<Frame CornerRadius="4" Padding="0"> | |
<StackLayout Orientation="StackOrientation.Horizontal" Padding="5" | |
BackgroundColor="(option.IsEnabled ? (option.IsSelected ? Color.DarkBlue : Color.White) : Color.DarkGray)" | |
IsEnabled="option.IsEnabled"> | |
<Button Text="Select" OnClick="(() => OnSelectType(option))" /> | |
<Label Text="✓" |
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 AuthenticationService | |
{ | |
public bool IsUserAuthenticated => !string.IsNullOrWhiteSpace(AccessToken); | |
public string AccessToken { get; private set; } | |
private readonly IPublicClientApplication _publicClientApplication; | |
private readonly string[] _scopes; | |
private readonly JwtSecurityTokenHandler _jwtSecurityTokenHandler = new JwtSecurityTokenHandler(); | |
public AuthenticationService() |
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 bool PromptToConfirmExit | |
{ | |
get | |
{ | |
bool promptToConfirmExit = false; | |
if (MainPage is ContentPage) | |
{ | |
promptToConfirmExit = true; | |
} | |
else if (MainPage is Xamarin.Forms.MasterDetailPage masterDetailPage |
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
// Confirm with dialog | |
public override void OnBackPressed() | |
{ | |
if (((ConfirmBack.App)App.Current).PromptToConfirmExit) | |
{ | |
using (var alert = new AlertDialog.Builder(this)) | |
{ | |
alert.SetTitle("Confirm Exit"); | |
alert.SetMessage("Are you sure you want to exit?"); | |
alert.SetPositiveButton("Yes", (sender, args) => { FinishAffinity(); }); // inform Android that we are done with the activity |