private string getWaypointTagName(Core.Data.WaypointType wpt) { string result; if (_overwriteWayointTags) { if (wpt.ID == 218) { result = "Question to Answer"; } else if (wpt.ID == 219) { result = "Stages of a Multicache"; } else { result = wpt.Name; } } else { result = wpt.Name; } return(result); }
private static void OnSelectedItemPropertyChanged(DependencyObject source, DependencyPropertyChangedEventArgs e) { WaypointTypeCombo control = source as WaypointTypeCombo; Core.Data.WaypointType t = e.NewValue as Core.Data.WaypointType; control.SelectedComboItem = t; }
public WaypointTypeCombo() { InitializeComponent(); _availableTypes = new ObservableCollection <Core.Data.WaypointType>(); if (Core.ApplicationData.Instance.WaypointTypes != null) { foreach (var c in Core.ApplicationData.Instance.WaypointTypes) { _availableTypes.Add(c); } } SelectedComboItem = SelectedItem; DataContext = this; }