public AddOrEditFavoriteDialog() { this.InitializeComponent(); this.Loaded += AddOrEditFavoriteDialog_Loaded; SingleMap.MapElementsChanged += SingleMap_MapElementsChanged; _dialogType = AddOrEditDialogType.Add; }
public AddOrEditFavoriteDialog(IFavorite favoriteToEdit) : this() { _dialogType = AddOrEditDialogType.Edit; var favoriteAsPlace = favoriteToEdit as IPlace; if (favoriteAsPlace != null) { SearchBoxPlace = favoriteAsPlace; } NameText = favoriteToEdit.UserChosenName; _editDialogIconGlyph = favoriteToEdit.FontIconGlyph; _editDialogIconFont = favoriteToEdit.IconFontFace; FavoriteRoute = favoriteToEdit as FavoriteRoute; _favoritePlace = favoriteToEdit as FavoritePlace; }