private void HandleMasterDetailPagePropertyChanging(object sender, Xamarin.Forms.PropertyChangingEventArgs e) { if (e.PropertyName == "Detail") { this.UnbindNavigationEventHandlers(); } }
/// <summary> /// Handles the <see cref="E:PropertyChanging" /> event. /// </summary> /// <param name="sender">The sender.</param> /// <param name="e">The <see cref="Xamarin.Forms.PropertyChangingEventArgs" /> instance containing the event data.</param> private void OnPropertyChanging(object sender, Xamarin.Forms.PropertyChangingEventArgs e) { if (e.PropertyName == "CurrentPage") { RaiseCurrentPageChanging(); } }
private void FlowListViewPropertyChanging(object sender, Xamarin.Forms.PropertyChangingEventArgs e) { if (e.PropertyName == FlowItemsSourceProperty.PropertyName) { if (FlowItemsSource is INotifyCollectionChanged flowItemSource) { flowItemSource.CollectionChanged -= FlowItemsSourceCollectionChanged; } if (IsGroupingEnabled) { var groupedSource = FlowItemsSource; if (groupedSource != null) { foreach (var gr in groupedSource) { if (gr is INotifyCollectionChanged collectionChanged) { collectionChanged.CollectionChanged -= FlowItemsSourceCollectionChanged; } } } } } }
private void GraphPropertyChanging(object sender, PropertyChangingEventArgs e) { var scrollView = (ScrollView)sender; if (e.PropertyName == "ScrollX") { foreach (ScrollView view in _trendViewScrollViews) { if (scrollView != view) { view.PropertyChanging -= GraphPropertyChanging; if (_loadingGraphs) { view.ScrollToAsync(1200, 0, false); } else { view.ScrollToAsync(scrollView.ScrollX, scrollView.ScrollY, false); } view.PropertyChanging += GraphPropertyChanging; } } _loadingGraphs = false; } }
void AppOnPropertyChanging(object sender, XPropertyChangingEventArgs args) { if (args.PropertyName == nameof(XApplication.MainPage)) { Platform.GetRenderer(_application?.MainPage)?.Dispose(); } }
private void TimePicker_PropertyChanged(object sender, PropertyChangingEventArgs e) { if (page != null) { Refresh(page.Date.DayOfWeek); } }
private void OnLabelChanging(object sender, Xamarin.Forms.PropertyChangingEventArgs e) { if (e.PropertyName != "Text") { return; } ((Label)sender).Opacity = 0; }
private void GridView_PropertyChanging(object sender, Xamarin.Forms.PropertyChangingEventArgs e) { if (e.PropertyName == ItemsSourceProperty.PropertyName) { var items = ItemsSource as INotifyCollectionChanged; if (items != null) items.CollectionChanged -= ItemsCollectionChanged; } }
private void ElementOnPropertyChanging(object sender, PropertyChangingEventArgs e) { if (!ShouldTransition(e.PropertyName)) { return; } IsAnimating = true; }
private void OnPropertyChanging(object sender, PropertyChangingEventArgs propertyChangingEventArgs) { if (propertyChangingEventArgs.PropertyName == nameof(InnerContent)) { if (InnerContent != null) { Grid.Children.Remove(InnerContent); } } }
// To be used with Page classes implementing IPageContainer. // Luckily, even though IPageContainer does not include the property changing event, // all classes implementing IPageContainer do send this event for CurrentPage. void HandleContainerPagePropertyChanging(object sender, Xamarin.Forms.PropertyChangingEventArgs e) { var pageContainer = sender as IPageContainer <Page>; if (e.PropertyName != nameof(pageContainer.CurrentPage)) { return; } HandlePageDisappearing(pageContainer.CurrentPage); }
/// <summary> /// Elements the property changing. /// </summary> /// <param name="sender">The sender.</param> /// <param name="e">The <see cref="PropertyChangingEventArgs" /> instance containing the event data.</param> private void ElementPropertyChanging(object sender, PropertyChangingEventArgs e) { if (e.PropertyName == GridView.ItemsSourceProperty.PropertyName) { if (Element.ItemsSource is INotifyCollectionChanged) { (Element.ItemsSource as INotifyCollectionChanged).CollectionChanged -= DataCollectionChanged; } } }
private void ElementPropertyChanging(object sender, Xamarin.Forms.PropertyChangingEventArgs e) { if (e.PropertyName == GridView.ItemsSourceProperty.PropertyName) { if (Element != null && Element.ItemsSource is INotifyCollectionChanged) { (Element.ItemsSource as INotifyCollectionChanged).CollectionChanged -= ItemsSource_CollectionChanged; } } }
private void TagEntryViewPropertyChanging(object sender, Xamarin.Forms.PropertyChangingEventArgs e) { if (e.PropertyName == TagItemsProperty.PropertyName) { var tagItems = TagItems as INotifyCollectionChanged; if (tagItems != null) { tagItems.CollectionChanged -= TagItemsCollectionChanged; } } }
/// <summary> /// Private event handler that is called whenever a <see cref="T:Xamarin.Forms.BindableObject.PropertyChanging"/> /// event is fired. /// </summary> /// <param name="sender">Sender.</param> /// <param name="args">Property changing event arguments</param> void OnElementPropertyChanging(object sender, Xamarin.Forms.PropertyChangingEventArgs args) { if (args.PropertyName == ContentPageGloss.BackgroundGradientProperty.PropertyName) { Gradient bkgrndGradient = ContentPageGloss.GetBackgroundGradient(Element); if (bkgrndGradient != null) { bkgrndGradient.DetachRenderer(this); } } }
void OnLabelPropertyChanging(object sender, Xamarin.Forms.PropertyChangingEventArgs e) { if (!(sender is Label)) { return; } if (e.PropertyName == "Text") { OnLabelTextChanging(sender as Label); } }
private void VisualElement_PropertyChanging(object sender, Xamarin.Forms.PropertyChangingEventArgs e) { var visualElement = ((VisualElement)sender); if (e.PropertyName == "WidthRequest") { WidthRequest = -1; } if (e.PropertyName == "HeightRequest") { HeightRequest = -1; } }
void OnMapStylePropertyChanging(object sender, Xamarin.Forms.PropertyChangingEventArgs e) { if (e.PropertyName == MapStyle.CustomSourcesProperty.PropertyName && (sender as MapStyle).CustomSources != null) { var notifiyCollection = (sender as MapStyle).CustomSources as INotifyCollectionChanged; if (notifiyCollection != null) { notifiyCollection.CollectionChanged -= OnShapeSourcesCollectionChanged; } RemoveSources(Element.MapStyle.CustomSources.ToList()); } }
void OnElementPropertyChanging(object sender, Xamarin.Forms.PropertyChangingEventArgs e) { if (sender is VisualElement) { if (e.PropertyName == "Renderer") { RendererDisconnect(); } else if (e.PropertyName == GestureHandlerProperty.PropertyName) { _element.Behaviors.Remove(this); } } }
void OnMapStylePropertyChanging(object sender, Xamarin.Forms.PropertyChangingEventArgs e) { if (e.PropertyName != MapStyle.CustomSourcesProperty.PropertyName || (sender as MapStyle)?.CustomSources == null) { return; } if (((MapStyle)sender).CustomSources is INotifyCollectionChanged notifiyCollection) { notifiyCollection.CollectionChanged -= OnShapeSourcesCollectionChanged; } RemoveSources(Element.MapStyle.CustomSources.ToList()); }
void Handle_PropertyChanging(object sender, Xamarin.Forms.PropertyChangingEventArgs e) { try { if (CarruselFavoritos.ItemsCount > 1) { Indicador.IsVisible = true; } else { Indicador.IsVisible = false; } } catch (Exception ex) { } }
void OnElementPropertyChanging(object sender, Xamarin.Forms.PropertyChangingEventArgs e) { if (Element == null) { return; } if (e.PropertyName == FormsMap.AnnotationsProperty.PropertyName && Element.Annotations != null) { RemoveAllAnnotations(); var notifyCollection = Element.Annotations as INotifyCollectionChanged; if (notifyCollection != null) { notifyCollection.CollectionChanged -= OnAnnotationsCollectionChanged; } } else if (e.PropertyName == FormsMap.MapStyleProperty.PropertyName && Element.MapStyle != null) { if (Element.MapStyle.CustomSources != null) { var notifiyCollection = Element.MapStyle.CustomSources as INotifyCollectionChanged; if (notifiyCollection != null) { notifiyCollection.CollectionChanged -= OnShapeSourcesCollectionChanged; } RemoveSources(Element.MapStyle.CustomSources.ToList()); } if (Element.MapStyle.CustomLayers != null) { var notifiyCollection = Element.MapStyle.CustomLayers as INotifyCollectionChanged; if (notifiyCollection != null) { notifiyCollection.CollectionChanged -= OnLayersCollectionChanged; } RemoveLayers(Element.MapStyle.CustomLayers.ToList()); } Element.MapStyle.PropertyChanging -= OnMapStylePropertyChanging; Element.MapStyle.PropertyChanged -= OnMapStylePropertyChanged; } }
void HandleFlyoutPagePropertyChanging(object sender, Xamarin.Forms.PropertyChangingEventArgs e) { var flyoutPage = sender as FlyoutPage; Page page = null; if (e.PropertyName == nameof(flyoutPage.Detail)) { page = flyoutPage.Detail; } else if (e.PropertyName == nameof(flyoutPage.Flyout)) { page = flyoutPage.Flyout; } if (page != null) { HandlePageDisappearing(page); } }
protected void OnElementPropertyChanging(object sender, Xamarin.Forms.PropertyChangingEventArgs e) { if (Element == null) { return; } if (e.PropertyName == MapView.AnnotationsProperty.PropertyName) { if (Element.Annotations == null || Element.Annotations.Count() == 0) { return; } RemoveAllAnnotations(); if (Element.Annotations is INotifyCollectionChanged observable) { observable.CollectionChanged -= OnAnnotationsCollectionChanged; } } }
void OnElementPropertyChanging(object sender, Xamarin.Forms.PropertyChangingEventArgs e) { if (Element == null) { return; } if (e.PropertyName == FormsMap.AnnotationsProperty.PropertyName && Element.Annotations != null) { RemoveAllAnnotations(); var notifyCollection = Element.Annotations as INotifyCollectionChanged; if (notifyCollection != null) { notifyCollection.CollectionChanged -= OnAnnotationsCollectionChanged; } } else if (e.PropertyName == FormsMap.MapStyleProperty.PropertyName && Element.MapStyle != null) { Element.MapStyle.PropertyChanging -= OnMapStylePropertyChanging; Element.MapStyle.PropertyChanged -= OnMapStylePropertyChanged; } }
public void pc (object sender, PropertyChangingEventArgs e) { if (e.PropertyName == "IsToggled") { if (c == 1) { checkLoop = false; c = 0; } else { checkLoop = true; } System.Diagnostics.Debug.WriteLine ("is PropertyChangedEventArgs"); //bcd = true; } }
void OnElementPropertyChanging(object sender, Xamarin.Forms.PropertyChangingEventArgs e) { }
private void DoPropertyChanging(object sender, Xamarin.Forms.PropertyChangingEventArgs e) { Console.WriteLine($"這個屬性 ==>{e.PropertyName} 的值,準備產生異動"); }
private void HandleMasterDetailPagePropertyChanging(object sender, PropertyChangingEventArgs e) { if (e.PropertyName == "Detail") { this.UnbindNavigationEventHandlers(); } }
void mContentView_PropertyChanging(object sender, PropertyChangingEventArgs e) { if (e.PropertyName.Equals("Width")) { //ContentView changedView = sender as ContentView; //if (null == changedView) //{ // Debug.WriteLine("sender is wrong type."); // return; //} ////mImage.HeightRequest = 20; ////mImage.WidthRequest = 20; //if (changedView.Width > changedView.Height) //{ // Debug.WriteLine("Was landscape"); // lastOrientation = Orientation.LANDSCAPE; //} //else //{ // Debug.WriteLine("Was portait"); // lastOrientation = Orientation.PORTRAIT; //} //if (lastOrientation == Orientation.PORTRAIT) //{ // mImage.WidthRequest = 20; // mImage.HeightRequest = 20; //} } }
protected void OnElementPropertyChanged(object sender, PropertyChangingEventArgs e) { }
void OnItemPropertyChanging(object sender, PropertyChangingEventArgs e) => OnPropertyChanging(nameof(Spans));