Forget ToolbarItem you don’t need it any more.

We help lots of custom to create their own Apps. In their designs, the navigation bar can be any style. Some custom doesn’t want the icon in navigation bar, some customer wants to put ToolbarItem in to left, some custom wants to change Page title’s font. In the old time, I was tired to change them by custom renderer, in iOS is OK, but in Android, it’s very hard to change layout of navigation bar.

Until one day, I came up a idea, why not use a full screen page and put all ToolbarItem into a view, then use Control Template to apply them to all pages? In that view we can do whatever we want.

I tried control template, but I found it hard to change different layouts by different pages, unless you create many templates.

How about we do like ListView, it has Header and Footer, put views into them. So I create a BasePage class, use Grid layout and it works, beyond this I also put pop-up view into BasePage. Cause this custom ask me to change the alert window designs.

After finish that, I’m very happy with using that, I can do binding, change layout, do custom navigation and pop-up different windows.

Then I think of should I put into FreshEssential?

We create it, when I maintain it I found lot feature requests are add API to change some control’s font, or change some default color. That is not good, I mean the API designs is not good, it should allow user to change everything they want, but if I allow user to change everything, it means I need to put more logic to keep it works fine and test every scenarios.

So in this time, I decide to share code instead of put it into Nuget. Two reasons, one the code is small and logic is simple, another the alert window has a lots of style we can change.

The code I put on Github,

Here are some demo images for that

Hope everybody can enjoy it.

Advertisements