I need to access a grid in a list-view data-template, but when using this code, the program foreach Access the loop and do not execute it
foreach (Active_Lit.Grid FirstGrid in the items) {var item = Active_list.ItemContainerGenerator.ContainerFromItem (firstgrid); Var ch = All children (items); Var tag = url; Var control = (grid) ch.First (c => c.Tag == tag); If (firstgrid.GetType () == Type (grid) {if ((string) firstgrid.Tag == url) {foreach (progress in first grade Berg Prague) {if (prg.GetType () == typeof (ProgressBar )) {P.I.S. }} Foreach (first class text block txt.) {If (txt.GetType () == type (text block) {txt.Visibility = Visibility View; }}}}}}
this code Active_list.Items
You will not be able to give any control but your actual data If you want to reach specific control in the list view, you will have to go through your visual tree and find it manually. I think it's not a good practice to manually change the control inside the list view ...
But if you really want to do this, then I'll give you this topic with the same question I recommend watching:
No comments:
Post a Comment