简体   繁体   中英

How to bind value from Dictionary, which is struct, in XAML c#?

I have dictionary which has string for key and struct for value. Struct is:

 public class AtributesOfCheckBox
    {
        public string signalName { get; set; }
        public bool checked_value { get; set; }
    }

How to bind Name for checkBox with signalName from this dictionary in XAML? Thank you.

Use Gridview or Formview :

Dictionary> _results

GridView myGrid = new GridView();
GridViewColumn gc = new GridViewColumn();

gc.Header = "FileName";

gc.DisplayMemberBinding = new Binding("Key");
myGrid.Columns.Add(gc);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM