StyledTabbedPageRenderer.cs 673 B

1234567891011121314151617181920
  1. using FormulaOneApp.Controls.StyledTabbedPageAbstraction;
  2. using FormulaOneApp.WinPhone.Controls;
  3. using Xamarin.Forms;
  4. using Xamarin.Forms.Platform.WinPhone;
  5. using Application = System.Windows.Application;
  6. using Style = System.Windows.Style;
  7. [assembly: ExportRenderer(typeof(StyledTabbedPage), typeof(StyledTabbedPageRenderer))]
  8. namespace FormulaOneApp.WinPhone.Controls
  9. {
  10. public class StyledTabbedPageRenderer : TabbedPageRenderer
  11. {
  12. protected override void OnElementChanged(VisualElementChangedEventArgs e)
  13. {
  14. base.OnElementChanged(e);
  15. this.Style = Application.Current.Resources["PivotStyle"] as Style;
  16. }
  17. }
  18. }