Beispiel #1
0
 /// <summary>
 /// Another name for <c>textField.Rx().Text()</c>
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <param name="rx"></param>
 /// <returns></returns>
 public static ControlProperty <string> Value <T>(this Reactive <T> rx) where T : UITextField
 {
     return(RxUIControl.Value(rx.Parent, textFied => textFied.Text, (textField, text) =>
     {
         if (textField.Text != text)
         {
             textField.Text = text;
         }
     }));
 }
Beispiel #2
0
 /// <summary>
 /// Same as <c>SelectedSegment</c>
 /// </summary>
 /// <typeparam name="T"></typeparam>
 /// <param name="rx"></param>
 /// <returns></returns>
 /// <seealso cref="SelectedSegment{T}"/>
 public static ControlProperty <nint> SegValue <T>(this Reactive <T> rx) where T : UISegmentedControl
 => RxUIControl.Value(rx.Parent, seg => seg.SelectedSegment,
                      (seg, segIndex) => seg.SelectedSegment = segIndex);