Xamarin.Forms Previewer - xamarin.forms

It is really not practical to write a Xamarin.Forms application without a UI previewer. All platforms offer a design preview option, especially if the code needs to be compiled. As far as I know, currently Xamarin only released a previewer for Xamarin Studio for Mac in its alpha channel, which we can't even use in Visual Studio. Why is it that Xamarin still does not provide a previewer? We should not be forced to use a third party tool for this process. (And even the third party tools are in their beta releases.)
Shouldn't there be at least a roadmap or a planned date announced since it is such a fundamental part of the product? It would be nice if someone from Xamarin would answer.

Using the latest version of Xamarin you can use the following steps:
Use the View > Other Windows > Xamarin.Forms Previewer menu in Visual Studio to open the preview window.

The Xamarin.Forms Previewer is there on Windows (it has been for a few years), but it now contains several improvements in Visual Studio 2019, many focused on making it more reliable.
To show the Previewer, click the design buttons on the bottom right of the .xaml file pane, like chucky mentioned. It's no longer under View > Other Windows, instead now using the same split pane tabbed UI used by the UWP/WPF designers.
See here for more on how to use the Previewer:
https://learn.microsoft.com/en-us/xamarin/xamarin-forms/xaml/xaml-previewer/?tabs=vswin&pivots=windows

Related

Using SDK made for Android in Xamarin

I'm currently developing a little project, i've bought a "smart lock" with works with Bluetooth and uses an open platform called TTLock. The resources are here: https://open.ttlock.com/doc/userGuide
The idea is to create my own App to control this "smart lock" using the methods created by TTLock.
The web page gives SDK resources for Android and IOS, but i want to program my App in Xamarin.Forms. My question is, can I "add" the Android SDK and the IOS SDK to my Xamarin.Forms solution and work with that methods, or i have to program first in Android Studio and later in an IOS IDE?
Thank you so much for your time and your responses. I'm learning about programming APPs on IDE, so all knowledge will be appreciated.
My question is, can I "add" the Android SDK and the IOS SDK to my Xamarin.Forms solution and work with that methods,
The answer of the first question is Yes. You could refer to Binding a .JAR document to use it in Android, and refer to Binding iOS Libraries document to use it in iOS.
or i have to program first in Android Studio and later in an IOS IDE?
The second question is depends on you. You will not need to use native IDE to do that.
For Android, there are two ways to get the native library:
Using Android Studio to download it
Going to Source repository website to download it
First method, I think you already know that, from the document you will find the sample steps:
The Second method, the shared document is chineses language. Therefore, you could find the source repository website here: https://maven.aliyun.com/mvn/search, and search by typing tongtonglock you will see the navtive libraries as follows. Then you can pick one to download.
For iOS, you could refer to its sample link to get the framework.

Is Xamarin.Forms a simple sum of Xamarin.Android, Xamarin.IoS and Xamarin.Win?

Is Xamarin.Forms considered a simple sum of Xamarin.Android and Xamarin.IoS with a shared code library wrapper? or is there more under the hood than meets the eye?
I am not talking about the shared code library because I realize it is specific to Xamarin.Forms but rather (for example) if I am to compare a Xamarin.Droid project to an android codebase of a Xamarin.Forms solution, will I find any considerable differences? Will I find any differences. Same goes for IoS & Windows...
Just to provide context; I am interested in utilizing some tools which were originally designed for Xamarin.android however my projects are Xamarin.forms solutions and it would be cool to know in advance if I am running into a rathole.
Thanks in advance you fine people.
Xamarin Forms, in the end, is a wrapper over the native API's so if you have something in Xamarin Forms you can of course port it to Xamarin Android, iOS or Windows.
Is Xamarin.Forms considered a simple sum of Xamarin.Android and Xamarin.IoS with a shared code library wrapper? or is there more under the hood than meets the eye?
At its simplest, Xamarin.Forms is a mobile application framework for building user interfaces. The definition from Xamarin's website is:
Xamarin.Forms is a cross-platform UI toolkit that allows developers to easily create native user interface layouts that can be shared across Android, iOS, and Windows Phone.
But don't simply focus on the term "UI" in that definition and think only on-screen controls. Instead, focus on the word "toolkit" as Xamarin. Forms offer so much more in addition to user interface controls that work across platforms.
Xamarin.Forms will emit a 100% native iOS, Android or UWP app – in fact the starting point of any Xamarin.Forms app is within one of those platform projects. However, that's as far as the platform-specific code needs to go. The rest of the code can all be written in one of the layers that are shared amongst all the applications.
if I am to compare a Xamarin.Droid project to an android codebase of a Xamarin.Forms solution, will I find any considerable differences? Will I find any differences. Same goes for IoS & Windows...
Just Basic API differences, which are different between forms and native
You shoud see Xamarin.Forms as the abstraction of the UI over the actual platform. Xamarin.Forms (XF) renders the UI in native platforms controls, but they are created using XF XAML.
Coding against XF is like coding for a different platform with a different set of tools, at the UI level!
You can, if needed go deep in platform specific details if needs be via interface implementation and injection.

how is Wunderlist source code protected?

I am trying to build a simple app using tidesdk , but unfortunately as stated here :
https://stackoverflow.com/a/14207566/1724929
that currently there is no way to protect the source code which is visible to the app users.
but after taking a look at wunderlist for Windows which is built using tidesdk and .net framework , i saw that the source code is not visible also i searched if it were hidden somewhere but i found nothing , so any one have an idea how they protect the source code from being visible . is there any tool or something to achive that ?
Latest version of Wunderlist is not built using TideSDK. They have re-implemented all different versions pure natively on each platform they are supporting.
TideSDK currently does not support Code hiding however the Developers of TideSDK are developing TideKit which is releasing soon with a new CLI, app and will provide platform builds. It will also provide Code Hiding. You can follow recent developments at http://www.tidekit.com. The video of what is coming is here: http://youtu.be/aE7gN-d0GhU. This will give you modern tools to use where the experience of creating and your projects is much better.

Visual Studio 2008 not rendering right on window resize

Visual Studio 2008 is not rendering right on window resize or maximize.
This happens a lot -- does anyone know how to fix it? It's very annoying.
(Note I blurred the code, that's usually fine, but the code pane keeps the previous size while the rest of the window resizes.
Also, SSMS does the same thing and I know they are build on the same technology.
EDIT: I'm on Windows 7 x64 Professional.
Visual Studio 2008 Professional with resharper 5.
Doing some googling, it seems the problem might be related to an nVidia graphics driver.
That doesn't really make sense to me though, it's just 2D standard winforms isn't it?
Newer versions of Visual Studio do use the graphics card for rendering, and the Aero theme (which you have enabled) uses it as well.
I suspect two possibilities: either a buggy combination of extensions or a combination of extension and buggy graphics card driver. If this does not happen in any other applications using the Visual Studio shell (i.e. Sql Server Studio), I would try disabling your extensions, starting with ReSharper. I would suggest upgrading to the latest version of ReSharper.
As a workaround, you can resize the window by dragging it to full screen.
Same happened to me, and it was driving me crazy. I solved it by just dissabling aero from the tool bar
(Right click on the tool bar -> properties -> uncheck use Aero Peek to
preview the desktop)
and all seems fine now, i hope for a long long time.

What technology for a rich UI desktop application?

For an internship, I'm gonna have to develop a desktop application. The focus is creating a rich UI ( cool effects, sound etc ). Which tech should I go with ?
- Flash ? ( in this case, shoud I go with a flex project ? AIR ? what is the gain between this and a simple raw flash project )
- C#/Silverlight ?
Any other possibility ?
If experienced developers could give their advice, that would be great thanks.
The best technology to use is probably the one you're most familiar with, unless you mean you're going to be learning on the fly. But for the various options I'll take a stab.
Flash itself (the runtime) is a browser plugin, so that's not what you want, but if you build your application in Flash or Flex (the authoring tools), then you can publish it as an AIR application. AIR is also a runtime - basically it's Flash, plus a bunch of extra APIs for running outside the browser. The advantages to making an AIR app are:
The same app runs on win/mac/linux
You can make it with the same skills/tools you use for Flash (dubious utility if you don't have those skills/tools, of course)
Close tool integration with other Adobe tools (photoshop, after effects, etc.)
The main disadvantage is incomplete access to native (i.e. OS) capabilities. The way a runtime allows you to run the same app on win/mac/linux is by restricting you from doing some of the things that you could do with a native application.
As for Flex, whether you use Flex or not is a separate question. Flex is a framework within Flash - an AIR app can be made using Flex or not using it. Basically, if you expect your app to have a lot of controls, slider bars, charts, accordion panels, etc., you might look into Flex. If you expect it to have a lot of animations and pictures and sounds, plain-old-Flash may be better.
Apart from Flash, the other main choice for a runtime is Silverlight. The advantages there are, to be honest, basically the same. You use .NET instead of ActionScript, and the tooling integration is with MS' Expression suite instead of Adobe's creative suite, but the development process and the results are quite similar. The choice between AIR and Silverlight is really a choice between Adobe tools and MS tools, and between two programming languages of entirely comparable power. Most everyone simply uses the one they're more familiar with.
Finally, the other set of options is not to use a runtime, and to simply compile an app from any language/development environment you like - C, C++, .NET, Python, anything. The advantage here is you get (in general) full access to OS capabilities. The disadvantages are, you (in general) need to do extra development to run on multiple platforms, and also I don't think you'll find a language/environment that lets you work with multimedia as easily as you can in AIR and Silverlight.
Depends what programming languages are you proficient in. If you are .NET/C#/VB.NET guy go with SilverLight or WPF. If you know ActionScript, go with Adobe line of products.
My preference goes to the (slightly) most opened universe. Assumed that you know how to write Object-oriented programs, Adobe is using Eclipse as a base for his tools, using plugins.
Actionscript is just like Javascript syntax. You just have to learn the flex 4 libraries.
Then, publish you app as an Air desktop application that can run everywhere. Really everywhere
The only thing to know about MS tools and languages and libraries is that they are very well designed and usable. and it runs on Win and mac also. and Only.
If the main request is to have a rich UI the simplest approach is to build a Flex application running under Adobe AIR platform. The answer to the questions Flash or Flex is very simple: if you are a designer go with Flash, if you are a developer stay away from Flash and use Flex. The Flex framework was created for developers, and is really hard to replicate all its features in Flash (think only what you have to do in Flash if you want to resize your app).
On the other hand if you are coming from a .NET background it will make more sense to stick with Silverlight/C#
I'm not sure if this helps but I'm developing in Flex and now I have started to learn Silverlight and I can say that developing in Flex Builder is much more faster then developing in Silverlight( Visual Studios ) . For me Flex Builder is much better because you use only one IDE to develop both back and front end. And that's when it comes to web development. If you want to do desktop applications then you do the same thing and a plus is that you get everything in only one file. You also have a small SQL database that comes with it.
But on the other hand when you develop in Silverlight you have to use several IDE's or tools outside Visual Studios to make awesome graphics. But if you want to have more time for design then I would suggest to use Flex Builder and not Silverlight.

Resources