public void Txt_TextChangedEditor(object sender, TextChangedEventArgs e) { Editor ctrl = (Editor)sender; string nestedname = ""; string oldvalue = ""; string description = ""; ComosWebSDK.UI.UIMemo b = (ComosWebSDK.UI.UIMemo)ctrl.BindingContext; nestedname = b.NestedName; oldvalue = b.Value; description = b.Text; CheckValue(nestedname, e.NewTextValue, oldvalue, description); }
public View UpdateAttributesUI(ComosWebSDK.UI.UIMemo ui) { StackLayout layout = new StackLayout() { Orientation = StackOrientation.Vertical, }; if (!ui.ReadOnly) { editablevalues.Add(ui); } if (ui.ShowLabel) { var lbl = new Label() { Text = ui.Text, WidthRequest = App.WidthPixels / 3, VerticalTextAlignment = TextAlignment.Center, HorizontalTextAlignment = TextAlignment.Start, }; layout.Children.Add(lbl); } if (ui.ReadOnly) { var txt = new Label() { HorizontalOptions = LayoutOptions.FillAndExpand, VerticalOptions = LayoutOptions.FillAndExpand, Text = ui.Value, }; layout.Children.Add(txt); } else { var txt = new CustomEditor() { HorizontalOptions = LayoutOptions.FillAndExpand, VerticalOptions = LayoutOptions.FillAndExpand, BindingContext = ui, Keyboard = Keyboard.Chat, }; //txt.HeightRequest = ui.height / (App.PixelDensity * 3); txt.HeightRequest = 120.00; if (ui.CachedValue != "" && ui.CachedValue != ui.Value) { txt.Text = ui.CachedValue; txt.TextColor = (Color)App.Current.Resources["spec-only-cache"]; CheckValue(ui.NestedName, ui.CachedValue, ui.Value, ui.Text); } else { txt.Text = ui.Value; } txt.TextChanged += Txt_TextChangedEditor; layout.Children.Add(txt); } AbsoluteLayout.SetLayoutBounds(layout, new Rectangle( ui.x, ui.y, ui.width, ui.height)); return(layout); }