Module: IronNails::View::Extensions::SubViewSupport
- Included in:
- XamlProxy
- Defined in:
- lib/ironnails/view/xaml_proxy.rb
Instance Method Summary collapse
-
#add_control(target, view) ⇒ Object
Adds a subview to the current view.
Instance Method Details
#add_control(target, view) ⇒ Object
Adds a subview to the current view.
108 109 110 111 112 113 114 115 116 |
# File 'lib/ironnails/view/xaml_proxy.rb', line 108 def add_control(target, view) parent = send(target) vw = view.respond_to?(:instance) ? view.instance : view if parent.respond_to? :content= parent.content = vw elsif parent.respond_to? :children parent.children.add vw end end |