Skip to content

Instantly share code, notes, and snippets.

View Eilon's full-sized avatar

Eilon Lipton Eilon

  • Microsoft
View GitHub Profile
@Eilon
Eilon / Program.cs
Last active November 23, 2022 18:16
Culture data list generated from Win11 / .NET 7
// This file contains:
// 1. Command line tool that generates culture data locally (for example, on a Windows PC)
// 2. Sample code that shows how to use the culture data
// 3. Previously-generated culture data on a Windows 11 PC running .NET 7
using System.Globalization;
// 1. Code to generate culture data locally
var outputFilename = "rawculturedata.txt";
<TwoPaneView>
<Pane1>
<StackLayout HorizontalOptions="LayoutOptions.FillAndExpand" Margin="20">
<Label Text="What's LEFT to do for Dual Screen support?"
FontSize="40" />
<Label Text="And where does the standard Blazor Counter demo go?"
FontSize="40" TextColor="Color.Orange" Padding="new Thickness(0, 50)" />
<Grid VerticalOptions="LayoutOptions.FillAndExpand">
@Eilon
Eilon / BatteryStats.razor
Created January 31, 2020 22:59
Mobile Blazor Bindings app using Xamarin.Essentials to get device info
<Frame CornerRadius="10" BackgroundColor="Color.LightBlue">
<StackLayout>
<StackLayout Orientation="StackOrientation.Horizontal">
<ProgressBar Progress="Battery.ChargeLevel" HeightRequest="20" HorizontalOptions="LayoutOptions.FillAndExpand" />
<Label Text="@($"{Battery.ChargeLevel.ToString("P")}")" />
</StackLayout>
<Label Text="@($"🔋 state: {Battery.State.ToString()}")" />
<Label Text="@($"🔋 source: {Battery.PowerSource.ToString()}")" />