Skip to content

Instantly share code, notes, and snippets.

@Char0394
Created May 29, 2020 19:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Char0394/532bc622fd8a7cfec45017e01422895a to your computer and use it in GitHub Desktop.
Save Char0394/532bc622fd8a7cfec45017e01422895a to your computer and use it in GitHub Desktop.
using System;
using Xamarin.Forms;
using Xamarin.Forms.Xaml;
namespace WhiteLabelingXFSample
{
[ContentProperty("Source")]
public class ImageExtension : IMarkupExtension
{
public string Source { get; set; }
public object ProvideValue(IServiceProvider serviceProvider)
{
if (Source == null)
return null;
return $"{Source}{WhiteLabelingConfig.Instance.ImageSufixName}";
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment