protected override void OnElementPropertyChanged(PropertyChangedEventArgs args)
 {
     base.OnElementPropertyChanged(args);
     if (args.PropertyName == NavigationBarEffect.ColorProperty.PropertyName)
     {
         SetColor(NavigationBarEffect.GetColor(Element));
     }
     else if (args.PropertyName == NavigationBarEffect.StyleProperty.PropertyName)
     {
         SetStyle(NavigationBarEffect.GetStyle(Element));
     }
 }
 protected override void OnAttached()
 {
     SetColor(NavigationBarEffect.GetColor(Element));
     SetStyle(NavigationBarEffect.GetStyle(Element));
 }