Xamarin Templates -IOS - xamarin.forms

I am currently learning app-building basics with Xamarin. My question is what is the difference between "Blank-App (iPhone)" and "Master-Detail App (iPhone)".
Thanks for taking the time to answer my question.

These are two different templates for you to choose.
Blank-App (iPhone) means you just create an empty project without storyboard, RootViewController or other extensions. You can customize it whatever you want. If you are new to Xamarin.iOS and unsure about what template to use, try to use Single View Application.
Master-Detail App (iPhone) means when you choose this template. System will automatically create a UISplitViewController with a default Detail and Master for you. So there's no need to configure the rootView. It's a type of showing the ViewController.
You can try to create these two template projects then run to see the difference between them.

Related

master detail xamarin forms using mvvmCross

I already start using mvvmcross and i want to learn how to use a master/detail navigation. I can't find MvxMasterDetailPage described in this solution.
I have spent two days trying to start a master/detail navigation and nothing. I wouold like to do it with Xamarin Forms; i don't want to create any other presenter class but use the MvxFormsDroidMasterDetailPagePresenter for android. I had tried create a MvxFormsDroidMasterDetailPagePresenter in setup and also use MvxMasterDetailViewModel and nothing work.
Can some one please explain me or guide me to others options. Thanks.

Sync fusion Xamarin forms standard entry/editor

I’m enjoying the control suite from sync fusion for their auto complete and numeric editor. Just wanting a standard text entry and a multi line entry but there doesn’t seem to be any in their controls, unless I’m missing something?
The main problem is when I go and use the base entry and editor controls with Xamarin forms they totally look and behave differently and make it look quite jarring in the app so want to find these standard controls to keep it the same through out the app.
Anyone got any ideas?

Xamarin Forms Maps - Custom Pin Images

Is there a way to change the image of the pins in Xamarin Forms Maps. I want to make the pin a custom image, if it has to be done natively, can someone give me a simple example of it. Thank you.
To anyone coming to the later, this is now well supported in Xamarin Forms.
In essence you need to create a custom map class in your PCL or shared code that inherits from the Xamarin Forms Map and then create a Custom Renderer in each of the platforms' projects.
Those custom renderers will be different for each platform, dealing with the specifics of rendering icons and any pop up information shown when you click on that pin for that particular platform. You are not obliged to create a custom renderer for all platforms, for any that you don't a normal map will be displayed.
This is all now really well documented in the Custom Renderers | Customizing a Map section of the Xamarin Forms Developers Guide. That documentation walks through creating a custom renderer for Android, iOS and UWP and explains the code needed in detail. There's a lot of it, so I won't reproduce it here. There is also an accompanying sample solution here.
One point worth noting is that if you are trying to reproduce that code in your own project you will also need to add the images in the various drawable folders in the ProjectName\Droid\Resources directory, and also the two axml files in the layout directory.
Apparently this is quite locked down and you have to look at custom renderers to achieve what you are needing.
There is a discussion about this on the following link:-
http://forums.xamarin.com/discussion/17916/customization-of-xamarin-forms-maps-pins
, with specific reference to a project at the following link which someone has implemented custom image pins from the Assets folder:-
https://github.com/paulpatarinski/ShouldIWashMyCar/blob/master/Android/Renderers/MapViewRenderer.cs
I haven't tried this yet, however this would probably be a good place to start when looking to customize map rendering.
This project might be helpful to you. raechten/BindableMapTest
From the description:
Small sample for binding a collection to a Xamarin Forms Maps pins
(valid until binding directly to the Pins property will be supported
by Xamarin Forms directly).
Includes custom and clickable pins.
It has Android and iOS implementations.

MvvmCross - MonoGame

I'm trying to build a MonoGame view inside MvvmCross on Android,iOS and WP8. On Windows side it's relatively easy to use dependency properties as a binding target, but how can I achieve a cross platform data binding solution that I can use on all platform?
This was covered in a previous MvvmCross version - see Insert a Monogame view inside MvvmCross monodroid Activity
The technical details have changes a bit since that post, but the core of the advice remains the same - use inheritance to add data-binding.
For example, if you want to adapt a FooActivity or FooViewController base class so that it can be used for MvvmCross data-binding, then you need to:
inherit from FooActivity to provide EventSourceFooActivity - to do this you need to add event notifications like those shown in MvxEventSourceFragmentActivity.cs
inherit from EventSourceFooActivity to provide BindingFooActivity - to do this you need to add all the members like DataContext from MvxFragmentActivity.cs
The process for Touch/iOS is very similar, but with iOS specific events and members. Take a look at any of the Mvx*ViewController classes to see what is involved.
This technique is also discussed in: Integrating Google Mobile Analytics with MVVMCross

A newbie question on cairngorm

I am very new to Flex (started learning a couple of days back), I now have some understanding on how to create user interfaces with Flex and how to do MVC with Cairngorm and I really started liking it. But I am still lost with changing views using Cairngorm or entirely in Flex. Being a Java/J2EE developer for more than 10 years, it helps me understanding new technologies comparing it with Java. Typically in java world or in any MVC framework, the controller once got the updated modal it redirects or sets the new view to the user. Lets say once I added a new movie to movie database, I want to show the user a view Movie screen and when he deletes a movie I want to take user to list of all movies. The example which I have seen so far(including the diagram explorer) are just changing the modal values and the data is updating in the same view (using [Bindable]), but my question is how to change the view depending on the result or if it's a fault I want to take user to a different screen. How to do that in flex and in Cairngorm. Are there any best practices available and somebody please point me to right direction/resource. Thanks in advance.
The usual way to do this with Cairngorm is to put the data about the state of the application (eg. the screen the user is on) in the model too. You can, for example, use the ViewStack as the main container of the different parts of your application and bind it's selectedIndex to a variable in the model which will be used to control the screen that is displayed to the user. Putting it shortly - the state of the application is a reflection of the model.
You may also want to take a look at the Mate framework. We recently switched to Mate after using Cairngorm because we found it was a much easier framework to use and understand.
For your example, you would have a faultHandler event listener that would call whatever method you wanted in your model. You could easily use that to show or hide whatever you needed to.

Resources