Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class SettingsMenu
- {
- public string Name { set; get; }
- public ObservableCollection<object> Items { set; get; }
- public SettingsMenu()
- {
- Name = "";
- Items = new ObservableCollection<object>();
- }
- public SettingsMenu(string _name, ObservableCollection<object> _items)
- {
- Name = _name;
- Items = _items;
- }
- public void AddItem(object _item)
- {
- Items.Add(_item);
- }
- }
- MenuInts = new SettingsMenu("Menu1", new ObservableCollection<int>());
- MenuStrings = new SettingsMenu("Menu2", new ObservableCollection<string>());
- MenuBools = new SettingsMenu("Menu3", new ObservableCollection<bool>());
- Cannot convert from
- 'System.Collections.ObjectModel.ObservableCollection<type>' to
- 'System.Collections.ObjectModel.ObservableCollection<object>'
Add Comment
Please, Sign In to add comment