Class ControlFetcherMixin
- Namespace
- ReactiveUI
- Assembly
- ReactiveUI.dll
Control Fetcher Mix-in helps you automatically wire-up Activities and Fragments via property names, similar to Butter Knife, as well as allows you to fetch controls manually.
public static class ControlFetcherMixin : Object
- Inheritance
-
ControlFetcherMixin
Methods
GetControl(Activity, string?)
Gets the control from an activity.
public static View? GetControl(this Activity activity, string? propertyName = null)
Parameters
activity
ActivityThe activity.
propertyName
stringThe property name.
Returns
- View
The return view.
GetControl(View, Assembly, string?)
Gets the control from a view.
public static View? GetControl(this View view, Assembly assembly, string? propertyName = null)
Parameters
view
ViewThe view.
assembly
AssemblyThe assembly containing the user-defined view.
propertyName
stringThe property.
Returns
- View
The return view.
WireUpControls(Activity, ResolveStrategy)
Wires a control to a property.
public static void WireUpControls(this Activity activity, ControlFetcherMixin.ResolveStrategy resolveMembers = 0)
Parameters
activity
ActivityThe Activity.
resolveMembers
ControlFetcherMixin.ResolveStrategyThe resolve members.
WireUpControls(Fragment, View, ResolveStrategy)
Wires a control to a property. This should be called in the Fragment's OnCreateView, with the newly inflated layout.
public static void WireUpControls(this Fragment fragment, View inflatedView, ControlFetcherMixin.ResolveStrategy resolveMembers = 0)
Parameters
fragment
FragmentThe fragment.
inflatedView
ViewThe inflated view.
resolveMembers
ControlFetcherMixin.ResolveStrategyThe resolve members.
WireUpControls(View, ResolveStrategy)
Wires a control to a property.
public static void WireUpControls(this View view, ControlFetcherMixin.ResolveStrategy resolveMembers = 0)
Parameters
view
ViewThe view.
resolveMembers
ControlFetcherMixin.ResolveStrategyThe resolve members.
WireUpControls(ILayoutViewHost, ResolveStrategy)
Wires a control to a property.
public static void WireUpControls(this ILayoutViewHost layoutHost, ControlFetcherMixin.ResolveStrategy resolveMembers = 0)
Parameters
layoutHost
ILayoutViewHostThe layout view host.
resolveMembers
ControlFetcherMixin.ResolveStrategyThe resolve members.