/// <summary> /// Create shadow border which is behind child container /// </summary> private ShadowView CreateShadowBorder() { ShadowView shadowView = new ShadowView(); Binding bind = new Binding("Popup.BackgroundColor"); bind.Source = this; shadowView.SetBinding(ShadowView.BorderBackgroundColorProperty, bind); bind = new Binding("Popup.CornerRadius"); bind.Source = this; shadowView.SetBinding(ShadowView.CornerRadiusProperty, bind); bind = new Binding("Popup.ShadowColor"); bind.Source = this; shadowView.SetBinding(ShadowView.ShadowColorProperty, bind); bind = new Binding("Popup.ShadowOpacity"); bind.Source = this; shadowView.SetBinding(ShadowView.ShadowOpacityProperty, bind); bind = new Binding("Popup.ShadowLenght"); bind.Source = this; shadowView.SetBinding(ShadowView.ShadowLenghtProperty, bind); bind = new Binding("Popup.IsShadowEnabled"); bind.Source = this; shadowView.SetBinding(ShadowView.IsShadowEnabledProperty, bind); return(shadowView); }
public PopupRootLayout() { _shadowBorder = CreateShadowBorder(); Children.Add(_shadowBorder); _border = CreateBorder(); Children.Add(_border); // Create container for content _contentContainer = new Container(); CompressedLayout.SetIsHeadless(_contentContainer, true); _border.Content = _contentContainer; }