コード例 #1
0
 protected override void OnElementChanged(ElementChangedEventArgs <BorderView> e)
 {
     base.OnElementChanged(e);
     if (e.NewElement == null)
     {
         return;
     }
     BorderRendererVisual.UpdateBackground(Element, this);
 }
コード例 #2
0
 protected override void OnElementPropertyChanged(object sender, PropertyChangedEventArgs e)
 {
     base.OnElementPropertyChanged(sender, e);
     if (e.PropertyName == BorderView.BorderColorProperty.PropertyName ||
         e.PropertyName == BorderView.BorderWidthProperty.PropertyName ||
         e.PropertyName == BorderView.CornerRadiusProperty.PropertyName ||
         e.PropertyName == VisualElement.BackgroundColorProperty.PropertyName)
     {
         BorderRendererVisual.UpdateBackground(Element, this);
     }
 }