tabbedpage

Remove left space in title view xamarin forms

淺唱寂寞╮ 提交于 2021-02-08 10:08:01
问题 I had an issue in removing the extra left space in title view as shown in the image below please see the screenshot here Ps: I'm using tabbed page and that bar is the navigation title view. 回答1: Set the xml below in your Toolbar.xml of Android part. app:contentInsetLeft="0dp" app:contentInsetStart="0dp" app:contentInsetStartWithNavigation="0dp" Do not forget to add the namespace of app in your Toolbar.xaml . xmlns:app="http://schemas.android.com/apk/res-auto" And check the code below, it need

Remove left space in title view xamarin forms

情到浓时终转凉″ 提交于 2021-02-08 10:05:16
问题 I had an issue in removing the extra left space in title view as shown in the image below please see the screenshot here Ps: I'm using tabbed page and that bar is the navigation title view. 回答1: Set the xml below in your Toolbar.xml of Android part. app:contentInsetLeft="0dp" app:contentInsetStart="0dp" app:contentInsetStartWithNavigation="0dp" Do not forget to add the namespace of app in your Toolbar.xaml . xmlns:app="http://schemas.android.com/apk/res-auto" And check the code below, it need

Xamarin Forms - Pass Scope-Injected service from tabbedpageviewmodel to the viewmodels of the pages

我是研究僧i 提交于 2020-05-24 05:07:26
问题 In my xamarin forms application I have a tabbedpage with behind it a viewmodel. This viewmodel behind injects a service with dependency injection. That service is scoped. It should be scoped for the tabbedpageviewmodel. But the tabs should also make use of that scoped service. How can I achieve this? Should I pass the service to the tabbedpages-viewmodels? Singleton is not an option, because I work with notifications, the tabbedpageviewmodel can accur multiple times in the navigationstack,

Xamarin Forms - Pass Scope-Injected service from tabbedpageviewmodel to the viewmodels of the pages

做~自己de王妃 提交于 2020-05-24 05:07:00
问题 In my xamarin forms application I have a tabbedpage with behind it a viewmodel. This viewmodel behind injects a service with dependency injection. That service is scoped. It should be scoped for the tabbedpageviewmodel. But the tabs should also make use of that scoped service. How can I achieve this? Should I pass the service to the tabbedpages-viewmodels? Singleton is not an option, because I work with notifications, the tabbedpageviewmodel can accur multiple times in the navigationstack,

How to change color of tabbed page indicator in Xamarin.Droid?

断了今生、忘了曾经 提交于 2020-01-04 05:39:09
问题 I'm building an application with Xamarin.Forms and a Portable Class Library. I have a tabbed page. I want to change the color of the tabbed page indicator. Changing the rest of the layout is something I already managed, the only thing I do need is to change the light blue tabbed page indicator like shown below: I couldn't find anything that could work in Xamarin.Droid. This is the code that creates the tabbed page with content: class TabbedPageTry : TabbedPage { public TabbedPageTry() { Title

In Xamarin Forms 3.1, when using tabbed page with 4 tabs, how can I prevent “sliding” effect of tab bar on Android?

时光总嘲笑我的痴心妄想 提交于 2020-01-01 03:37:36
问题 I have an app with four pages, and I want it to look similar to my (non-Xamarin) iOS app, so to have toolbar at the bottom. Here is my MainPage.xaml file: <?xml version="1.0" encoding="utf-8" ?> <TabbedPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:local="clr-namespace:XaBLE1" x:Class="XaBLE1.MainPage" Title="Safe-T Sim" HeightRequest="768" WidthRequest="512" BarBackgroundColor="#F1F1F1" BarTextColor="Gray" xmlns:android="clr