/// <summary> /// Construct an instance of the drawable with all attributes applied. /// </summary> /// <returns>The new instance.</returns> public Drawable CreateInstance() { Drawable d = (Drawable)Activator.CreateInstance(Type); d.ApplySkinnableInfo(this); return(d); }
public Drawable CreateInstance() { try { Drawable d = (Drawable)Activator.CreateInstance(Type); d.ApplySkinnableInfo(this); return(d); } catch (Exception e) { Logger.Error(e, $"Unable to create skin component {Type.Name}"); return(Drawable.Empty()); } }