Skip to content

Instantly share code, notes, and snippets.

@kevingosse
Created January 12, 2016 19:39
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 kevingosse/4581793e638badab1af1 to your computer and use it in GitHub Desktop.
Save kevingosse/4581793e638badab1af1 to your computer and use it in GitHub Desktop.
namespace CustomControls
{
public class AdaptiveImage : ContentControl
{
public static readonly DependencyProperty SourceProperty = DependencyProperty.Register(
"Source",
typeof(AdaptiveImageSource),
typeof(AdaptiveImage),
new PropertyMetadata(null, OnSourceChanged));
public AdaptiveImageSource Source
{
get { return this.GetValue(SourceProperty) as AdaptiveImageSource; }
set { this.SetValue(SourceProperty, value); }
}
private static void OnSourceChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e)
{
// TODO
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment