Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public partial class WebViewSelectorGenerator : ContentPage
- {
- public List<SlotsButtons> slots;
- private SlotsButtons _selectedItem;
- public SlotsButtons SelectedItem
- {
- get
- {
- return _selectedItem;
- }
- set
- {
- _selectedItem = value;
- if (_selectedItem == null)
- return;
- // now here you have an instance of SlotsButtons
- // you can do :
- var id = _selectedItem.ID;
- // store your id in a page variable for example and later on do the logic
- }
- }
- public WebViewSelectorGenerator()
- {
- [...]
- slots = new List<SlotsButtons>();
- slots.Add(new SlotsButtons { Text = "1" });
- slots.Add(new SlotsButtons { Text = "2" });
- BindingContext = this;
- }
- [...]
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement