public StopDetailsPopupAddIn() { ExpandCommand = new DisableableRelayCommand((obj) => { NumColsRequested += .5; RefreshPopupSize(); }); CompressCommand = new DisableableRelayCommand((obj) => { do { NumColsRequested -= .5; } while (NumColsRequested >= MaxColsVisible && NumColsRequested > 1); RefreshPopupSize(); }); CloseCommand = new DisableableRelayCommand((obj) => ClosePopup()); MapControl.SetNormalizedAnchorPoint(OnMapPopup, new Point(0.5, 1)); ArrivalsPopup.SetBinding(StopPopupOuterControl.TitleCommandProperty, new Binding() { Source = this, Path = new PropertyPath("StopTitleClickedCommand") }); ArrivalsPopup.ExpandCommand = ExpandCommand; ArrivalsPopup.CompressCommand = CompressCommand; ArrivalsPopup.CloseCommand = CloseCommand; ArrivalsPopup.Offset(offsetY: SLIDE_OFFSET).Fade(value: 0).SetDurationForAll(0).Start(); ShownVehicleArrivals.CollectionChanged += ShownVehicleArrivals_CollectionChanged; ShownVehicleArrivalsBinding = new CompositeCollectionBinding<RealTimeArrival, int>(ShownVehicleArrivals); ShownVehicleArrivalsBinding.AddCollection(0, ArrivalsPopup.ShownArrivals); MapChildrenShown.Add(OnMapPopup); RefreshPopupSize(); ArrivalsPopup.ShownArrivals.CollectionChanged += ShownArrivals_CollectionChanged; }
public StopDetailsPopupAddIn() { ExpandCommand = new DisableableRelayCommand((obj) => { NumColsRequested += .5; RefreshPopupSize(); }); CompressCommand = new DisableableRelayCommand((obj) => { do { NumColsRequested -= .5; } while (NumColsRequested >= MaxColsVisible && NumColsRequested > 1); RefreshPopupSize(); }); CloseCommand = new DisableableRelayCommand((obj) => ClosePopup()); MapControl.SetNormalizedAnchorPoint(OnMapPopup, new Point(0.5, 1)); ArrivalsPopup.SetBinding(StopPopupOuterControl.TitleCommandProperty, new Binding() { Source = this, Path = new PropertyPath("StopTitleClickedCommand") }); ArrivalsPopup.ExpandCommand = ExpandCommand; ArrivalsPopup.CompressCommand = CompressCommand; ArrivalsPopup.CloseCommand = CloseCommand; ArrivalsPopup.Offset(offsetY: SLIDE_OFFSET).Fade(value: 0).SetDurationForAll(0).Start(); ArrivalsPopup.NavigateToLocationCommand = new RelayCommand(ll => { if (ll is LatLon) { MapControl.SetLocation(OnMapPopup, ((LatLon)ll).ToGeopoint()); SetTakeover(new MapView((LatLon)ll)); } }); ShownVehicleArrivals.CollectionChanged += ShownVehicleArrivals_CollectionChanged; ShownVehicleArrivalsBinding = new CompositeCollectionBinding <RealTimeArrival, int>(ShownVehicleArrivals); ShownVehicleArrivalsBinding.AddCollection(0, ArrivalsPopup.ShownArrivals); MapChildrenShown.Add(OnMapPopup); RefreshPopupSize(); ArrivalsPopup.ShownArrivals.CollectionChanged += ShownArrivals_CollectionChanged; }