protected override void OnParentSet() { if (RealParent != null) { RealParent.PropertyChanged += OnParentPropertyChanged; RealParent.PropertyChanging += OnParentPropertyChanging; } base.OnParentSet(); FlowController.NotifyFlowDirectionChanged(); }
void OnParentPropertyChanged(object sender, PropertyChangedEventArgs e) { // Technically we might be raising this even if it didn't change, but I'm taking the bet that // its uncommon enough that we don't want to take the penalty of N GetValue calls to verify. if (e.PropertyName == "RowHeight") { OnPropertyChanged("RenderHeight"); } else if (e.PropertyName == VisualElement.FlowDirectionProperty.PropertyName) { FlowController.NotifyFlowDirectionChanged(); } }
protected override void OnPropertyChanging(string propertyName = null) { if (propertyName == "Parent") { if (RealParent != null) { RealParent.PropertyChanged -= OnParentPropertyChanged; RealParent.PropertyChanging -= OnParentPropertyChanging; } FlowController.NotifyFlowDirectionChanged(); } base.OnPropertyChanging(propertyName); }
protected override void OnParentSet() { #pragma warning disable 0618 // retain until ParentView removed base.OnParentSet(); if (ParentView != null) { NavigationProxy.Inner = ParentView.NavigationProxy; } else { NavigationProxy.Inner = null; } #pragma warning restore 0618 FlowController.NotifyFlowDirectionChanged(); }