Skip to content

Instantly share code, notes, and snippets.

@Christopherjl
Christopherjl / Behavior.cs
Last active August 29, 2015 14:15
Wpf inspired Behavor, For Android!
namespace Amp.Behaviors
{
public abstract class Behavior<T> : View where T:View
{
int _viewId;
protected Behavior(Context context, IAttributeSet attrs)
: base(context, attrs)
{
_viewId = context.ObtainStyledAttributes(attrs, Resource.Styleable.Behavior).GetResourceId(Resource.Styleable.Behavior_View,-1);