private void HandleMasterDetailPagePropertyChanging(object sender, Xamarin.Forms.PropertyChangingEventArgs e)
 {
     if (e.PropertyName == "Detail")
     {
         this.UnbindNavigationEventHandlers();
     }
 }
Exemplo n.º 2
0
 /// <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();
     }
 }
Exemplo n.º 3
0
        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;
                            }
                        }
                    }
                }
            }
        }
Exemplo n.º 4
0
        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);
     }
 }
Exemplo n.º 7
0
 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;
     }
 }
Exemplo n.º 9
0
        private void ElementOnPropertyChanging(object sender, PropertyChangingEventArgs e)
        {
            if (!ShouldTransition(e.PropertyName))
            {
                return;
            }

            IsAnimating = true;
        }
Exemplo n.º 10
0
 private void OnPropertyChanging(object sender, PropertyChangingEventArgs propertyChangingEventArgs)
 {
     if (propertyChangingEventArgs.PropertyName == nameof(InnerContent))
     {
         if (InnerContent != null)
         {
             Grid.Children.Remove(InnerContent);
         }
     }
 }
Exemplo n.º 11
0
        // 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);
        }
Exemplo n.º 12
0
 /// <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;
         }
     }
 }
Exemplo n.º 13
0
 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;
         }
     }
 }
Exemplo n.º 14
0
 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;
         }
     }
 }
Exemplo n.º 15
0
 /// <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);
            }
        }
Exemplo n.º 17
0
        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;
            }
        }
Exemplo n.º 18
0
 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());
     }
 }
Exemplo n.º 19
0
 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);
         }
     }
 }
Exemplo n.º 20
0
        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());
        }
Exemplo n.º 21
0
 void Handle_PropertyChanging(object sender, Xamarin.Forms.PropertyChangingEventArgs e)
 {
     try
     {
         if (CarruselFavoritos.ItemsCount > 1)
         {
             Indicador.IsVisible = true;
         }
         else
         {
             Indicador.IsVisible = false;
         }
     }
     catch (Exception ex)
     {
     }
 }
Exemplo n.º 22
0
        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;
            }
        }
Exemplo n.º 23
0
        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);
            }
        }
Exemplo n.º 24
0
        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;
                }
            }
        }
Exemplo n.º 25
0
 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;
     }
 }
Exemplo n.º 26
0
		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;

			}
		}
Exemplo n.º 27
0
 void OnElementPropertyChanging(object sender, Xamarin.Forms.PropertyChangingEventArgs e)
 {
 }
Exemplo n.º 28
0
 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();
     }
 }
Exemplo n.º 30
0
		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;
				//}
			}
		}
Exemplo n.º 31
0
 protected void OnElementPropertyChanged(object sender, PropertyChangingEventArgs e)
 {
     
 }
Exemplo n.º 32
0
 void OnItemPropertyChanging(object sender, PropertyChangingEventArgs e) => OnPropertyChanging(nameof(Spans));