Xamarin, Android BottomNavigationBar 3rd-party library goes down in special situation - xamarin.android

I used this link to implement BottomNavigationBar in xamarin forms, I need to have the BottomNavigationBar in all of my pages, in this case I have a problem:
If I define MainPage in App as a non-NavigationPage, and all inner pages as NavigationPage, the bottomNavigation goes down and only it’s icons are visible!
(image1, image2)
If I define MainPage in App as a NavigationPage, and all inner pages as non-NavigationPage I'll not be able to see bottomNavigation in inner pages!
(image1, image2)
If I define both MainPage and inner pages as NavigationPage, I will have two toolbars in inner pages.
I prefer the first option if it's possible, but I cannot handle that!

Since you want your tabs to be visible all the time I would put your MainPage as a Tabbed page and then use NavigationPages as the tabs. This will allow you to have navigation in the tabs. You then place all your content in ContentPages, don't place your xaml in NavigationPages.
Navigation Pages, TabbedPages and MasterDetailsPages should contain only ContentPages.
You can find a sample in the Xamarin website: https://developer.xamarin.com/samples/xamarin-forms/Navigation/TabbedPageWithNavigationPage/

Related

ag-grid in a Material Tab

I have an app that has two ag-grids in two tabs using Angular Material tabs. When the user switches between tabs the items in one of the columns get rendered outside of the grid (but inside the tab body). The difference in the column is that it uses a custom cell renderer. It only effects the grid in the first tab because that is the grid that uses the cell renderer. So you have to switch to the second tab then back to the first tab to see it.
Stackblitz example here
It's hard to see because the column elements get rendered at the bottom of the tab window, you can barely see them poking out at the bottom of the grid. Also, if you page to the next page of the grid they are rendered properly, even on the first page when you page back.
I've tried executing gridApi.refreshCells() after the tab has switched but it doesn't do anything.
The fix turned out to be simple and I hope this is the best method for doing so. I simply execute the grid API's redrawRows method.

Route to another widget while Drawer stays on the appbar

I have the following drawer. it works as it should as long as i only want to hop between the widgets of my main drawer items.
Navigation with drawer
but inside those widgets i want to route to a new one, with a button click for example, while the drawer stays in my corner. So basically is there any way to reproduce a sticky android drawer in flutter ?
Drawer is a Scaffold property.
So when you go to another page you will normally have another Scaffold widget with its own Drawerand the previous one will be disposed.
In the new page you need to create and display the Drawer for this Scaffold but you can't keep the previous one in the corner.
Since the two widgets are independent of each other, you cannot use the same exact Drawer in the second widget.
Either you can create the exact copy of that Drawer in second one and open it on initState method or if possible instead of switching to the second, you can make the second widget as a subview inside firstWidget.

Xamarin forms Master detail Icon

I am trying to add an image next to the hamburger menu in my app. I am using a master detail page and it renders fine in ios and android. I tried using setting the icons for the detail pages. but the icons never showed. How do I achive this. I am looking to add an image similar to the amazon app.
I checked out this app on my phone and it uses a lot of custom constructions that aren't supported by out of the box Xamarin Forms controls. Something like the back arrow next to the hamburger menu is not a standard thing (on iOS at least). Also looking at the actual menu that the hamburger button triggers it becomes clear that its not an out of the box hamburger menu. Theirs pops over the content instead of sliding it out of view as the built-in one does.
More than likely they implemented their own hamburger menu and navigation structure which gave them the freedom to add buttons next to it. If you want to achieve this with out of the box controls you will most likely need custom renderers for each platform to create a replica of this navigation structure.
What is built-in in Xamarin Forms is that you can set the page title to an image instead of text by using the NavigationPage.SetTitleIcon method, which could be used to achieve what you want:
public class MyPage : NavigationPage
{
public MyPage ()
{
var myContentPage = new MyContentPage (Color.White);
this.Push (myContentPage);
var s = "icon.png";
NavigationPage.SetTitleIcon (myContentPage, s);
}
}
Even then, this is limited in functionality. If you want to fiddle with the alignment of the image e.g. you would also need to resort to a custom renderer.

Left side is a treeview menu and right side need to be the content

I'm developing a ASP.NET MVC5 razor project and I have a cshtml divided into two parts, left part has a div with a treeview with options like a menu and the right part is a div that I would like to load cshtml that correspond to the option selected in treeview, ¿how can I do to achieve this?
Thanks
I am making the assumption that this is a simple navigation that is consistent amongst all pages, for which you can put the common navigation in the _Layout.cshtml. This file contains all the common , , tags used for each page. If you put your navigation in here then it will also be displayed on each page.
The navigation options can then link to your normal actions which display the corresponding views within the layout page.
In this tutorial the author discusses adding a simple navigation (in the section "Using a Layout for common site elements") in the _Layout with the difference that the navigation is at the top and not at the side. You can use css to style the page differently.

Umbraco 6 MVC Nav Sub Links go nowhere

I am using Umbraco 6 for MVC. My problem arises in my Navigation. It works as expected except on mobile devices. The navigation is modeled after the one seen here: http://htmlstream.com/unify/
On Mobile Devices, the dropdown sub nav links don't navigate to any other pages. When you expand a nav element with subpages and touch a sub nav link, it simply closes the dropdown.
I generate the navigation using a Razor partial view for each of the pages. It will start at the root and loop through creating a link for each visible node one level under the root. Upon reaching a node that has child nodes, the razor script will create sub nav items before moving along. This leaves me with a nice collapsible dropdown navigation that translates well to mobile devices.
The Urls for each of the nodes whether it is a main nav element or a sub nav element, are created in the foreach loop using #var.NiceUrl()
Perhaps this causes a problem but I can't figure out why all of the other links, whether on the main navigation or as buttons throughout the page, would work fine despite being created with the same .NiceUrl() method.
Anyone have any insight?
Please try to add the following code, in your style sheet:
.dropdown-backdrop
{
position: static;
}

Resources