Example #1
0
 internal static void OnStyleWidgetDefaults(IInstanceWidget handler)
 {
     if (handler != null)
     {
         var styleHandlers = GetStyleList(handler.GetType(), false);
         if (styleHandlers != null)
         {
             var widget = handler.Widget as InstanceWidget;
             if (widget != null)
             {
                 foreach (var styleHandler in styleHandlers)
                 {
                     styleHandler(widget);
                 }
             }
         }
     }
 }
Example #2
0
		/// <summary>
		/// Initializes a new instance of the InstanceWidget with the specified handler type
		/// </summary>
		/// <param name="generator">Generator for the widget</param>
		/// <param name="handlerType">Type of the handler to create as the backend for this widget</param>
		/// <param name="initialize">True to call handler's Initialze method, false otherwise</param>
		protected InstanceWidget (Generator generator, Type handlerType, bool initialize = true)
			: base(generator, handlerType, initialize)
		{
			this.handler = (IInstanceWidget)Handler;
		}
Example #3
0
 protected InstanceWidget(Generator generator, IWidget handler, bool initialize = true)
     : base(generator, handler, initialize)
 {
     inner = (IInstanceWidget)Handler;
 }
Example #4
0
 protected InstanceWidget(Generator generator, Type type, bool initialize = true)
     : base(generator, type, initialize)
 {
     inner = (IInstanceWidget)Handler;
 }
Example #5
0
 /// <summary>
 /// Initializes a new instance of the InstanceWidget with the specified handler type
 /// </summary>
 /// <param name="generator">Generator for the widget</param>
 /// <param name="handlerType">Type of the handler to create as the backend for this widget</param>
 /// <param name="initialize">True to call handler's Initialze method, false otherwise</param>
 protected InstanceWidget(Generator generator, Type handlerType, bool initialize = true)
     : base(generator, handlerType, initialize)
 {
     this.handler = (IInstanceWidget)Handler;
 }