This repository was archived by the owner on May 1, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +23
-17
lines changed Expand file tree Collapse file tree 3 files changed +23
-17
lines changed Original file line number Diff line number Diff line change @@ -93,7 +93,7 @@ public override void Show()
9393
9494 protected virtual void OnElementPropertyChanged ( object ? sender , PropertyChangedEventArgs args )
9595 {
96- if ( Element is BasePopup basePopup )
96+ if ( Element is BasePopup basePopup && ! isDisposed )
9797 {
9898 if ( args . PropertyName == BasePopup . VerticalOptionsProperty . PropertyName
9999 || args . PropertyName == BasePopup . HorizontalOptionsProperty . PropertyName
Original file line number Diff line number Diff line change @@ -87,12 +87,15 @@ protected virtual void OnElementChanged(ElementChangedEventArgs<BasePopup?> e)
8787
8888 protected virtual void OnElementPropertyChanged ( object ? sender , PropertyChangedEventArgs args )
8989 {
90- if ( args . PropertyName == BasePopup . VerticalOptionsProperty . PropertyName ||
91- args . PropertyName == BasePopup . HorizontalOptionsProperty . PropertyName ||
92- args . PropertyName == BasePopup . SizeProperty . PropertyName ||
93- args . PropertyName == BasePopup . ColorProperty . PropertyName )
90+ if ( Element is BasePopup basePopup && ! isDisposed )
9491 {
95- ConfigureControl ( ) ;
92+ if ( args . PropertyName == BasePopup . VerticalOptionsProperty . PropertyName ||
93+ args . PropertyName == BasePopup . HorizontalOptionsProperty . PropertyName ||
94+ args . PropertyName == BasePopup . SizeProperty . PropertyName ||
95+ args . PropertyName == BasePopup . ColorProperty . PropertyName )
96+ {
97+ ConfigureControl ( ) ;
98+ }
9699 }
97100
98101 ElementPropertyChanged ? . Invoke ( this , args ) ;
Original file line number Diff line number Diff line change @@ -108,18 +108,21 @@ protected virtual void OnElementChanged(ElementChangedEventArgs<BasePopup?> e)
108108
109109 protected virtual void OnElementPropertyChanged ( object ? sender , PropertyChangedEventArgs args )
110110 {
111- if ( args . PropertyName == BasePopup . VerticalOptionsProperty . PropertyName ||
112- args . PropertyName == BasePopup . HorizontalOptionsProperty . PropertyName )
111+ if ( Element is BasePopup basePopup && ! isDisposed )
113112 {
114- SetLayout ( ) ;
115- }
116- else if ( args . PropertyName == BasePopup . SizeProperty . PropertyName )
117- {
118- SetSize ( ) ;
119- }
120- else if ( args . PropertyName == BasePopup . ColorProperty . PropertyName )
121- {
122- SetBackgroundColor ( ) ;
113+ if ( args . PropertyName == BasePopup . VerticalOptionsProperty . PropertyName ||
114+ args . PropertyName == BasePopup . HorizontalOptionsProperty . PropertyName )
115+ {
116+ SetLayout ( ) ;
117+ }
118+ else if ( args . PropertyName == BasePopup . SizeProperty . PropertyName )
119+ {
120+ SetSize ( ) ;
121+ }
122+ else if ( args . PropertyName == BasePopup . ColorProperty . PropertyName )
123+ {
124+ SetBackgroundColor ( ) ;
125+ }
123126 }
124127
125128 ElementPropertyChanged ? . Invoke ( this , args ) ;
You can’t perform that action at this time.
0 commit comments