コード例 #1
0
        protected override void InitializeNavbar()
        {
            CustomNavigationPage.SetTitleColor(this, (Color)Application.Current.Resources["TitleWhite"]);

            CustomNavigationPage.SetTitlePosition(this, CustomNavigationPage.TitleAlignment.Center);
            CustomNavigationPage.SetTitleMargin(this, new Thickness(0, 0, 100, 0));
            // CustomNavigationPage.SetTitleFont(this, (Font)Application.Current.Resources["oswald_semibold"]);
            CustomNavigationPage.SetTitleFontType(this, Device.RuntimePlatform == Device.Android ? "oswald_semibold.ttf" : "Oswald SemiBold");
        }
コード例 #2
0
 protected override void InitializeNavbar()
 {
     base.InitializeNavbar();
     if (Device.RuntimePlatform == Device.iOS)
     {
         CustomNavigationPage.SetTitleVisible(this, true);
     }
     CustomNavigationPage.SetTitleMargin(this, new Thickness(20, 0, 0, 0));
 }
コード例 #3
0
ファイル: Home.xaml.cs プロジェクト: davidvasquezr/ABMeter
        public Home()
        {
            CustomNavigationPage.SetTitleMargin(this, new Thickness(0, 0, 0, 0));
            InitializeComponent();

            map.MyLocationEnabled = true;
            map.UiSettings.MyLocationButtonEnabled = true;

            //Sets the title position to end
            CustomNavigationPage.SetTitlePosition(this, CustomNavigationPage.TitleAlignment.Center);

            //Sets shadow for bar bottom
            CustomNavigationPage.SetHasShadow(this, true);

            //Sets the title text font to Micro
            CustomNavigationPage.SetTitleFont(this, Font.SystemFontOfSize(NamedSize.Large));

            //Sets the title color
            CustomNavigationPage.SetTitleColor(this, Color.White);

            //Sets bar background opacity
            //CustomNavigationPage.SetBarBackgroundOpacity(this, 0.6f);

            CustomNavigationPage.SetGradientColors(this, new Tuple <Color, Color>(Color.FromHex("#00838f"), Color.FromHex("#00838f")));
            //CustomNavigationPage.SetGradientColors(this, new Tuple<Color, Color>(Color.FromHex("#00838f"), Color.FromHex("#4fb3bf")));
            CustomNavigationPage.SetGradientDirection(this, CustomNavigationPage.GradientDirection.LeftToRight);

            // Map Long clicked
            map.MapLongClicked += (sender, e) =>
            {
                var lat = e.Point.Latitude.ToString("0.000000");
                var lng = e.Point.Longitude.ToString("0.000000");
                //this.DisplayAlert("MapLongClicked", $"{lat}/{lng}", "CLOSE");
                latDestino.Text = lat;
                lonDestino.Text = lng;

                var pin = new Pin()
                {
                    Label    = "Destino",
                    Position = new Position(e.Point.Latitude, e.Point.Longitude)
                };

                map.Pins.Clear();
                map.Pins.Add(pin);
            };

            //Device.StartTimer(TimeSpan.FromSeconds(1), () =>
            //{
            //    // Do something
            //    CalculateLocation();

            //    return llego; // True = Repeat again, False = Stop the timer
            //});
        }
コード例 #4
0
        public RejectedAssignments()
        {
            CustomNavigationPage.SetSubtitleFont(this, Font.SystemFontOfSize(NamedSize.Micro));
            CustomNavigationPage.SetTitleMargin(this, new Thickness(0, 0, 5, 0));
            this.FormattedTitle = new FormattedString();
            this.FormattedTitle.Spans.Add(new Span()
            {
                FontSize = 10,
            });

            CustomNavigationPage.SetTitlePosition(this, TitleAlignment.Center);
            InitializeComponent();

            //GetIndigentDetailsAsync();
        }
コード例 #5
0
        protected override void InitializeNavbar()
        {
            base.InitializeNavbar();

            CustomNavigationPage.SetTitleVisible(this, true);
            CustomNavigationPage.SetTitleColor(this, (Color)Application.Current.Resources["TitleWhite"]);
            CustomNavigationPage.SetTitleBackground(this, "transparent");
            if (Device.RuntimePlatform == Device.Android)
            {
                CustomNavigationPage.SetTitleFontSize(this, 18);
            }

            CustomNavigationPage.SetTitlePosition(this, CustomNavigationPage.TitleAlignment.Center);
            CustomNavigationPage.SetTitleMargin(this, new Thickness(0, 0, 100, 0));
            // CustomNavigationPage.SetTitleFont(this, (Font)Application.Current.Resources["oswald_semibold"]);
            CustomNavigationPage.SetTitleFontType(this, Device.RuntimePlatform == Device.Android ? "oswald_semibold.ttf" : "Oswald-SemiBold");
        }
コード例 #6
0
        protected override void InitializeNavbar()
        {
            base.InitializeNavbar();
            if (Device.RuntimePlatform == Device.Android)
            {
                Title = "           ";
                CustomNavigationPage.SetTitleFontType(this, "opensans_regular.ttf");
                CustomNavigationPage.SetTitleFontSize(this, 18);
            }
            else
            {
                CustomNavigationPage.SetTitleFontType(this, "Oswald-SemiBold");
            }

            CustomNavigationPage.SetTitleColor(this, (Color)Application.Current.Resources["TitleWhite"]);

            CustomNavigationPage.SetTitlePosition(this, CustomNavigationPage.TitleAlignment.Center);
            CustomNavigationPage.SetTitleMargin(this, new Thickness(0, 0, 100, 0));
            // CustomNavigationPage.SetTitleFont(this, (Font)Application.Current.Resources["oswald_semibold"]);
        }