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
var photo = await MediaPicker.CapturePhotoAsync(); |
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
var credentials = new ApiKeyServiceClientCredentials(Constants.SubscriptionKey); | |
var faceClient = new FaceClient(credentials) { Endpoint = Constants.Endpoint }; |
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" ?> | |
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet"> | |
<CodeSnippet Format="1.0.0"> | |
<Header> | |
<Title>CommunityToolkit.Mvvm command (async)</Title> | |
<Shortcut>cmda</Shortcut> | |
<Description>Code snippet for async ICommand using the CommunityToolkit.Mvvm</Description> | |
<Author>Andreas Nesheim</Author> | |
<SnippetTypes> | |
<SnippetType>Expansion</SnippetType> |
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" ?> | |
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet"> | |
<CodeSnippet Format="1.0.0"> | |
<Header> | |
<Title>CommunityToolkit.Mvvm command</Title> | |
<Shortcut>cmd</Shortcut> | |
<Description>Code snippet for ICommand using the CommunityToolkit.Mvvm</Description> | |
<Author>Andreas Nesheim</Author> | |
<SnippetTypes> | |
<SnippetType>Expansion</SnippetType> |
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" ?> | |
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet"> | |
<CodeSnippet Format="1.0.0"> | |
<Header> | |
<Title>CommunityToolkit.Mvvm property</Title> | |
<Shortcut>propop</Shortcut> | |
<Description>Code snippet for ObservableProperty using the CommunityToolkit.Mvvm</Description> | |
<Author>Andreas Nesheim</Author> | |
<SnippetTypes> | |
<SnippetType>Expansion</SnippetType> |
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 Plugin.Fingerprint.Abstractions; | |
namespace MauiBiometrics; | |
public partial class MainPage : ContentPage | |
{ | |
private readonly IFingerprint fingerprint; | |
public MainPage(IFingerprint fingerprint) | |
{ |
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
var request = new AuthenticationRequestConfiguration("Prove you have fingers!", "Because without it you can't have access"); | |
var result = await CrossFingerprint.Current.AuthenticateAsync(request); | |
if (result.Authenticated) | |
{ | |
await DisplayAlert("Authenticated!", "Access granted", "Cool beans"); | |
} | |
else | |
{ | |
await DisplayAlert("Not authenticated!", "Access denied", "aww"); | |
} |
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
var command = new LightCommand { Alert = Alert.Once }; | |
await client.SendCommandAsync(command); |
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
private async void OnButtonClicked(object sender, EventArgs e) | |
{ | |
var bridgeIP = "XXX.XXX.XX.XX"; | |
var appKey = "abcdefghijklmnopqrstuvwxyz1234567890"; | |
ILocalHueClient client = new LocalHueClient(bridgeIP); | |
client.Initialize(appKey); | |
} |
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
<Grid Margin="0,10,40,30" ColumnDefinitions="50,50,50,*"> | |
<Border | |
Margin="10,0,0,0" | |
Background="LightGray" | |
HorizontalOptions="Center" | |
Style="{StaticResource FontIconWithRoundedCornersStyle}" | |
VerticalOptions="Center"> | |
<Label | |
FontFamily="IconFontTypes" | |
FontSize="24" |