@@ -188,29 +188,31 @@ public PopupPageLayout(in Popup popupContent, in IPopupOptions options, in IComm
188188 tappableBackground . GestureRecognizers . Add ( new TapGestureRecognizer { Command = tapOutsideOfPopupCommand } ) ;
189189 Children . Add ( tappableBackground ) ; // Add the Tappable Background to the PopupPageLayout Grid before adding the Border to ensure the Border is displayed on top
190190
191- var border = new Border
191+ PopupBorder = new Border
192192 {
193193 BackgroundColor = popupContent . BackgroundColor ??= PopupDefaults . BackgroundColor ,
194194 Content = popupContent
195195 } ;
196196
197197 // Bind `Popup` values through to Border using OneWay Bindings
198- border . SetBinding ( Border . MarginProperty , static ( Popup popup ) => popup . Margin , source : popupContent , mode : BindingMode . OneWay ) ;
199- border . SetBinding ( Border . PaddingProperty , static ( Popup popup ) => popup . Padding , source : popupContent , mode : BindingMode . OneWay ) ;
200- border . SetBinding ( Border . BackgroundProperty , static ( Popup popup ) => popup . Background , source : popupContent , mode : BindingMode . OneWay ) ;
201- border . SetBinding ( Border . BackgroundColorProperty , static ( Popup popup ) => popup . BackgroundColor , source : popupContent , mode : BindingMode . OneWay ) ;
202- border . SetBinding ( Border . VerticalOptionsProperty , static ( Popup popup ) => popup . VerticalOptions , source : popupContent , mode : BindingMode . OneWay ) ;
203- border . SetBinding ( Border . HorizontalOptionsProperty , static ( Popup popup ) => popup . HorizontalOptions , source : popupContent , mode : BindingMode . OneWay ) ;
198+ PopupBorder . SetBinding ( Border . MarginProperty , static ( Popup popup ) => popup . Margin , source : popupContent , mode : BindingMode . OneWay ) ;
199+ PopupBorder . SetBinding ( Border . PaddingProperty , static ( Popup popup ) => popup . Padding , source : popupContent , mode : BindingMode . OneWay ) ;
200+ PopupBorder . SetBinding ( Border . BackgroundProperty , static ( Popup popup ) => popup . Background , source : popupContent , mode : BindingMode . OneWay ) ;
201+ PopupBorder . SetBinding ( Border . BackgroundColorProperty , static ( Popup popup ) => popup . BackgroundColor , source : popupContent , mode : BindingMode . OneWay ) ;
202+ PopupBorder . SetBinding ( Border . VerticalOptionsProperty , static ( Popup popup ) => popup . VerticalOptions , source : popupContent , mode : BindingMode . OneWay ) ;
203+ PopupBorder . SetBinding ( Border . HorizontalOptionsProperty , static ( Popup popup ) => popup . HorizontalOptions , source : popupContent , mode : BindingMode . OneWay ) ;
204204
205205 // Bind `PopupOptions` values through to Border using OneWay Bindings
206- border . SetBinding ( Border . ShadowProperty , static ( IPopupOptions options ) => options . Shadow , source : options , mode : BindingMode . OneWay ) ;
207- border . SetBinding ( Border . StrokeProperty , static ( IPopupOptions options ) => options . Shape , source : options , converter : new BorderStrokeConverter ( ) , mode : BindingMode . OneWay ) ;
208- border . SetBinding ( Border . StrokeShapeProperty , static ( IPopupOptions options ) => options . Shape , source : options , mode : BindingMode . OneWay ) ;
209- border . SetBinding ( Border . StrokeThicknessProperty , static ( IPopupOptions options ) => options . Shape , source : options , converter : new BorderStrokeThicknessConverter ( ) , mode : BindingMode . OneWay ) ;
206+ PopupBorder . SetBinding ( Border . ShadowProperty , static ( IPopupOptions options ) => options . Shadow , source : options , mode : BindingMode . OneWay ) ;
207+ PopupBorder . SetBinding ( Border . StrokeProperty , static ( IPopupOptions options ) => options . Shape , source : options , converter : new BorderStrokeConverter ( ) , mode : BindingMode . OneWay ) ;
208+ PopupBorder . SetBinding ( Border . StrokeShapeProperty , static ( IPopupOptions options ) => options . Shape , source : options , mode : BindingMode . OneWay ) ;
209+ PopupBorder . SetBinding ( Border . StrokeThicknessProperty , static ( IPopupOptions options ) => options . Shape , source : options , converter : new BorderStrokeThicknessConverter ( ) , mode : BindingMode . OneWay ) ;
210210
211- Children . Add ( border ) ;
211+ Children . Add ( PopupBorder ) ;
212212 }
213213
214+ public Border PopupBorder { get ; }
215+
214216 sealed partial class BorderStrokeThicknessConverter : BaseConverterOneWay < Shape ? , double >
215217 {
216218 public override double DefaultConvertReturnValue { get ; set ; } = PopupOptionsDefaults . BorderStrokeThickness ;
0 commit comments