I have a UITabBarController with various views to navigate around my application.
I wish to add a nice title to the top of these and figured the nicest way is with the UINavigationController.
Found a nice article in xcode to do this: http://b00gizm.posterous.com/how-to-embed-a-navigation-controller-inside-a
Obviously tried following the article above with no luck... does anyone know how to do this on Mono using C#?
If you want to display titles on the top side of your views, it would be better to just create other views for this purpose alone.
The UINavigationController has a specific purpose and that is to provide navigation among various controllers in its stack, which means it will also need at least a root view controller.
Related
Is there any View on Xamarin.Forms to use like wizard? I must use Xamarin.Forms (not Xamarin.Android). Any suggestions?
I have seen this post but it looks like a bit complicated to me (Xamarin step by step wizard android views)
Update 17.04.2019:
Beginning with Xamarin.Forms 4.0, there is a new CarouselView control! This makes my old answer obsolete.
Old answer (obsolete):
The closest to what you're looking for is a CarouselPage. It holds several pages and you can navigate between them by swiping the screen to the left or the right.
Unfortunately, CarouselPage doesn't contain indicators which show on which page you are right now. You will have to implement this on your own if you need it. Your best choise are Custom Renderers.
I am exploring the use of Sections to create optional content in my site's layout, as explained quite neatly in ScottGu's article here:
http://weblogs.asp.net/scottgu/asp-net-mvc-3-layouts-and-sections-with-razor
However, what I'm trying to do is add a sidebar to the views related to a specific controller, where the sidebar contains static information relevant to the controller. The data won't be tied to the model - it'll just be some links to external pages, and some static 'helper' text.
I don't want the Sidebar on every page / view - just on some views (in my case, it's the view related to a specific controller).
What I don't want to do is have to declare the same Section and content for each view that needs this. I was trying to find some way of creating a 'shared section' - that I could reference neatly in the views that require it, and pass back to the _Layout when the View is returned by the controller.
Partial Views seemed to be the way forward with this:
Injecting content into specific sections from a partial view ASP.NET MVC 3 with Razor View Engine
But I'm not sure if this is the right way to go about this, or if there's more succinct way to achieve what I'm aiming for.
I have been searching for answers on this, but as ever with this sort of thing, I am 100% sure I am not using the correct terminology in my search attempts for this - so apologies if this is duplicate post, basic stuff, or has already been answered elsewhere.
Any pointers on this - even if it's just to give me some direction on the terms to search on - would be welcome !
I've not provided any example code here, but could possibly knock something up if it helps articulate things.
Cheers
It sounds like you need Layout nesting, rather than sections.
You can create a master layout, then have a layout that contains the sidebar, making it's Layout property point to your master layout. Then, you can choose which layout for your content pages to use, simply by specifying Layout = Master.cshtml or Layout = Sidebar.cshtml
I think the approach outlined in the link you provided is very feasible.
Another alternative, depending on the complexity involved in getting the sidebar in your layout, you could create a separate layout.
I've been playing around with UISplitViewController for a while, but it's not customizable enough for my needs, so I was thinking I could create my own custom UISplitViewController, and what it would take to do so. Is it just a matter of creating 2 view controllers next to each other, with the master view keeping a reference to the detail view, and handling rotations properly (to show and hide the popover), or is there more to it than that?
I would take a look at Matt Legend Gemmell's custom splitview controller that was made last year for some pointers:
https://github.com/mattgemmell/MGSplitViewController
I am to create a website with ASP.net, I have the design with myself. It is a normal website
It is my first time and I do not know to start from where.
I mean what are the steps, like first menu then master page or header, footer.....
Appreciate in order way answer.
Create a prototype in HTML. No master pages, no routing, no views, controllers, inheritance. None of that.
Make a prototype of the most complex page and of the simplest page. You'll then see how to organise your layout. I'm not going to speak about architecture of the application as the topic is too broad. I assume that all this is already in place and you are asking how to build your presentation layer.
Create a basic master page that would just have a wrapper. Inherit from that master page so that you have header, main content and footer. Then adapt this to your need by introducing further inheritance if needed.
In regards to views and controllers and stuff.
I'd create those in the following way:
View model
View
Controller
Routing
This is very basic and by no means a template that will always work, but hopefully it'll give you something to think about.
i have this situation: i have to build a menu with datasource from the db, because i have to filter them among the user that is loged in. i have tried building a menu using repeater, and all this works fine till i realized that i wanted the menu with more than two levels. i have also tried with treeview, but i really don't want this solution (problem with the style and the treeview doesn't have a pretty view).
Could anyone give me just the idea ?
thnx in advance.
If you are securing your pages in the conventional sense (ie--using ASP.NET's builtin permissions system), you can just use the normal SiteMapProviders as they will security trim menus for you.
If you need to do custom, try making a class that implements IHeirarchicalDataSource and then bind anything appropriate (eg--ASP.BulletedList) to that.