Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

How check different entries in Stacklayout.Children?

$
0
0

Hi everyone, good work :)
I want only one Entrq.Text changed. My problem is that they all change at the same time
I check entries in my Stacklayout.Children. Try more way(ClassId,Id,tabındex) couldn't solve the problem.

My problem Video =

https://drive.google.com/file/d/1T6fts0gPxusFTDLWpw3UjurNNCEOYAVI/view?usp=sharing

## My Code =
public StackLayout Fill_Fields(string DataJson, StackLayout Design) { StackLayout res = Design; if(DataJson != null) { dynamic Data = JsonConvert.DeserializeObject(DataJson); foreach (var item in res.Children) { if (item.GetType() == typeof(Picker)) { Picker picker = (Picker)item; picker.SelectedItem = null; picker.SelectedItem = Data[picker.ClassId].ToString(); } else if (item.GetType() == typeof(Entry)) { Entry entry = (Entry)item; entry.Text = Data[entry.ClassId].ToString(); entry.SetDynamicResource(StyleProperty, "frmDesignerEntry"); } else if (item.GetType() == typeof(AccountEntry)) { AccountEntry accountEntry = (AccountEntry)item; if (DropdownSelectedItems.Title != null) { accountEntry.PropertyChanging += (object sender, PropertyChangingEventArgs e) => { var m = accountEntry.ClassId.ToString(); var s = accountEntry.Text; accountEntry.Text = DropdownSelectedItems.Title; }; } else { accountEntry.Text = Data[accountEntry.ClassId].ToString(); } } else if (item.GetType() == typeof(DatePicker)) { DatePicker datePicker = (DatePicker)item; DateTime date = new DateTime(); date = Convert.ToDateTime(Data[datePicker.ClassId].ToString()); datePicker.Date = date; datePicker.FontSize = Device.GetNamedSize(NamedSize.Small, typeof(Label)); } else if (item.GetType() == typeof(Editor)) { Editor editor = (Editor)item; editor.Text = Data[editor.ClassId].ToString(); } } } res.Children.Add(Form_Buttons(res, DataJson)); return res; }


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>