LayerIDs="Evacuation Perimeter"
public MainPage() { InitializeComponent(); MyTemplates myTemplates = new MyTemplates(); Binding b = new Binding("Templates"); b.Source = myTemplates; b.Mode = BindingMode.TwoWay; MyTemplatePicker.SetBinding(TemplatePicker.TemplatesProperty, b); }
public class MyTemplates : INotifyPropertyChanged { public MyTemplates() { } private IEnumerable<SymbolTemplate> templates; public IEnumerable<SymbolTemplate> Templates { get { return templates; } set { if (templates != value && value != null) { SymbolTemplate st = null; foreach (var t in value) { if (t.Name == "Mandatory Evacuation") { st = t; break; } } if(st != null) { templates = new List<SymbolTemplate>() { st }; if (PropertyChanged != null) PropertyChanged(this, new PropertyChangedEventArgs("Templates")); } } } } public event PropertyChangedEventHandler PropertyChanged; }
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.