Inject views in Xamarin.Forms - xamarin.ios

Is there any way to inject platform specific views into shared pages?
Say I have a TabbedPage in my shared project, and I would like to inject a Page/View into it that uses the platform specific 2D drawing features, how would this best be solved?

In the ContentPage you can add your own custom view control, to which you can then implement Custom Renderers - one for each platform from this shared view.
Its from within the Custom Renderers classes where you can then access all the native APIs such like overriding the OnDraw(canvas canvas) and do your custom 2D drawing on Android etc.
When you mention Page/View, I am going to assume you are really meaning View, as I don't believe its possible to render a ContentPage within an existing ContentPage.

Related

How to use ARCore and ARkit in content page of the xamarin forms?

I want to implement augmented reality with xamarin forms. I found ARKit and ARCore library for xamarin.ios and xamarin.android respectively.
Can I use these both library in my PCL class library of xamarin.forms?
Can I integrate my page (layout or activity or UIViewController) to content page of my xamarin.forms?
Does renderer help to achieve the functionality?
Can I use these both library in my PCL class library of xamarin.forms?
Most likely you can't. ARKit should be a native iOS library and ARCore is an Android library (Java)
Can I integrate my page (layout or activity or UIViewController) to content page of my xamarin.forms?
As far as I know not directly. You will need a custom renderer that will create the native view for your Xamarin.Forms view.
I'd suggest to have a look at Customizing a ContentPage.
The basic method is
Create a page type that is derived from ContentPage
Create custom renderers for each platform
Implement the OnElementChanged method
Create the native view
Add the native view with SetElement

Is there a grid system (much like that offered by Bootstrap) that accompanies google material components?

I'm implementing material-components-web into a web application and was wondering: is there is a grid system that integrates with the library of components? Material-components is developed by a team of designers and developers at Google, and I imagine there should be a way to implement a grid system with out having to drop in Bootstrap (which would redundantly include another set of UI components into my repository).
Yes, the layout-grid (demo) is the component you're looking for.

Custom MasterDetail Page in Xamarin Forms

I want to design a flyout menu which should have same look and feel in all platforms i.e. android, ios and windows. It should come out from top right corner. For that I have used Xamarin forms masterDetail page but it is rendering differently in all platforms and I am unable to do the customization. Can anyone guide me which approach should I follow, Xamarin forms with customisation or xamarin native with user control for all platforms. If customisation is possible the how?
Currently I am doing this in xamarin forms to get flyout menu and it is working in all platforms.
public class DashBoardView : MasterDetailPage
{
public DashBoardView()
{
Master = new ProfilePage();
Detail= new NavigationPage(new DetailPage())
{
BarBackgroundColor = Color.FromHex("#56c7f6"),
BarTextColor = Color.White
};
}
}
You will probably need to write a Custom Renderer for each platform, I don't think you will be able to get the behavior you want by customizing the stock MasterDetail page.
if you want rtl MasterPage in xamarin forms there're two ways to do that:
first ==>
you will make class in shared project that inherit from MasterDetailPage
you will go to each platform project and write class which renderer the class you made it in shared project and write some code for each platform that makes
watch these: https://www.codeproject.com/Articles/1100122/Xamarin-Master-Detail-Page
https://developer.xamarin.com/guides/xamarin-forms/application-fundamentals/custom-renderer/
Second ==>
- you Can do it by one class in Shared project but not by using MasterDetailPage
you will do it by Animation
You could try using the Slide Over Kit plugin.
Its free. Details here:
https://michaelridland.com/xamarin/announcing-slideoverkit-for-xamarin-forms/
Looks like this:

Customizing the front end of maximo anywhere apps

I have been working on maximo anywhere apps recently and have a requirement to completely change the look and feel of the work execution app, the oslc layer which talks to maximo in the backend remains the same and all the functionalities are the same but there are some new buttons, notification messages and all sorts of UX aspects to be added to the app, I have just started looking at the architecture and code of the app but does anyone know how can I make changes to the front-end or is it even possible? I could find very few documents available online and all of them spoke of customizing features and functionalities but I coudlnot find any document for adding UX aspects.
It would be great someone could point out any documents or kick-off points which I can start looking into.
Thanks.
Thanks for asking, if you're just talking about adding new fields, layouts, screens to the UI, you can do that all through the app.xml, and there are lots of examples on our knowledge center, for example this one:
http://www-01.ibm.com/support/knowledgecenter/SSPJLC_7.5.2/com.ibm.si.mpl.doc_7.5.2/config_apps/t_add_rw_fields.html?lang=en
If you're talking about changing the "look" of the existing widgets, this can all be done through css, by overriding our out of the box css classes. Use Chrome inspector to figure out which css class is being used for each element type, and just override it through standard css approaches.
If you're talking about more advanced customization, for example adding your own new widget types to our screens, it is possible to programmatically instantiate/destroy your own widgets through javascript and add them to our standard application views. This code is usually hooked on the initialize and back event of our views. But you'll be responsible for writing the code to synchronize the data layer with your custom widget. We unfortunately don't have a published example of this customization usecase yet.
We always adding new widget capabilities to our Anywhere UI framework, so I'd love to hear feedback on the new widget types you're interested in.

Stage Within Another Stage in javafx

All,
I am developing a client/server application in JavaFX. I have a main menu in a primaryStage and would like to load the contents (Designed a form in Screen Builder) when a menu is clicked in another stage? How do i do that? Also, I wish to make my client stage window to fit the size of primaryStage I already have? I am new to JavaFX and thanks in advance for your help.
Regards
PK
A couple of comments:
JavaFX is all about the client-side. While it is billed as a library on which to base Rich Internet Apps, its current incarnation, imo, does not live up to this promise. For enterprise-level client/server apps, you're likely to get better security and database flexibility by investing development time in the server-side middle-tier than by creating a heavyweight client-side app. It's just the way things are right now.
Secondly, JavaFX 2.2 currently provides no support for a Visual Studio-esque "Multi-document Interface" or a GUI with parent windows that can contain child windows.
If what you want is to display a Modal Dialog Window after selecting an option in your primary stage, you can certainly do that. Many people create helper classes to assist with the creation of modal dialogs because in JavaFX 2.2 it is a little awkward to create them. The helper class I used for modal dialogs holds two pairs of references:
References to the parent window's Stage and Controller object
References to this dialog's Stage and Controller object
Having these references handy makes it simpler to create the modal stage and it provides the references you may need to pass data between the controller objects for the parent and modal dialogs.

Resources