Skip to content

Instantly share code, notes, and snippets.

View stewartsims's full-sized avatar
🐢
Quo

Stewart Sims stewartsims

🐢
Quo
View GitHub Profile
@stewartsims
stewartsims / gist:656802685e479d50a13e08c3ebefa126
Last active July 23, 2019 13:46
Cross platform animated GIF in Xamarin Forms
// in your XAML
<WebView x:Name="AnimatedGIF" HorizontalOptions="Center" VerticalOptions="Center" WidthRequest="64" HeightRequest="64" BackgroundColor="#336699"></WebView>
// in your CS (constructor)
AnimatedGIF.Source = GifViewHelper.GetGifViewSource("my-animation.gif", AnimatedGIF.BackgroundColor);
// the helper class
public class GifViewHelper
{
public static HtmlWebViewSource GetGifViewSource(string filename, Color backgroundColour)
@stewartsims
stewartsims / DateFieldRenderer.cs
Created July 10, 2019 10:30
UWP nullable / clearable date field adaptation
private void SetNullableText(DateField view)
{
if (view.NullableDate == null)
{
Control.DayVisible = false;
Control.MonthVisible = false;
Control.YearVisible = false;
}
else
{