I have VS 2015 Community Edition and installed Xamarin to create Android applications, I installed Android SDK and emulators and setup them, I have 2 questions:
Do I have to start a device in emulator first and then debug the android application in VS 2015?
For form and controls to add to android application have to use the Xamarin forms or where can I find any 3rd party controls, I have SyncFusion community package are there any controls for Xamarin?
Thank you
1.) No. You don't need to start the emulator first. If there is not emulator running, VS will start the current selected Emulator.
2.) Xamarin.Forms and Android/iOS/WinPhone projects are different approaches.
When you make a Xamarin.Forms app, then you create one UI and customize it for every platform (e.g. padding to the top edge). So you share the UI AND yor cross plattform code (e.g. custom datat service like fetching feeds/database entries/...).
An Crossplattform App (New Project -> Visual C# -> Crossplatform -> Blank App (Native Portable)) is meant to create a project for each platform and create your UI for each target. Additionally (like the Xamarin.Forms) you can share your buisness code across them as a PCL (portable class libary). So if you have to request some data from a webservice then you can implement them in the PCL and access it from your Android, WinPhone and iOS app.
In Xamarin.Forms you can design your own custom controls by just inheriting from a existing control and making a renderer for each platform by yourselfe or try the Xamarin Component Store.
In the cross platform approach you can/have to design them on each platform by yourselfe.
In Xamarin.Forms you have
One UI for multiple platforms
Portion of Code you can shar increases
The UI looks absolutly native
BUT:
You can only use the least common denominator (things that are possible unter Android can't be used under Android since iOS and WinPhone don't support them
sometimes the UI does not work as it is intended
When you create your app with the Crossplatform approach:
You have the full control about the things and how they work in each device
BUT:
You have to have knowledge about the application life time and how the OS really works.
Take a look at the developer page of xamarin: Xamarin.Forms
Xamarin.Forms is best for:
- Data entry apps
- Prototypes and proofs-of-concept
- Apps that require little platform-specific functionality
- Apps where code sharing is more important than custom UI
Xamarin.iOS & Xamarin.Android are best for:
- Apps that require specialized interactions
- Apps with highly polished design
- Apps that use many platform-specific APIs
- Apps where custom UI is more important than code sharing
Related
I'm currently developing a UWP application that now needs access to APIs that are normally not accessible by apps in an AppContainer.
As I'm not (yet) able to migrate to WinUI3, I want to try using DesktopBridge to do the otherwise restricted work.
As both processes have to communicate with each other, I thought of COM as it should make things relatively seamless once everything has been set up.
According to this page this should be possible using "Packaged Com".
I now have...
An Out-of-Process Com Server (c# net5.0) that is accessible by non-packaged win32 apps (e.g., PowerShell) but not my own UWP App.
The UWP App with the main logic and UI.
A Packaging Project, which creates a package out of both projects.
(Manifest)
The code is on GitHub: Repo.
Does someone have an idea how to solve this problem or got an alternative for IPC?
PS: Tutorials I used
Packaged Com
Out-Of-Proc COM in c#
Packaging / DesktopBridge
So if I understand you correctly, you want to communicate between a UWP app and a Win32 app, and these two apps are packaged inside a Windows Application Package Project. Please let me know if it is not correct.
For your scenario, since the two apps are packaged together with desktop bridge, I'd suggest you use the App Service. App service could be used not only between UWP apps but also between the UWP app and desktop app.
These are the detailed steps:
You need to declare the AppService connection in the Manifest file of the package project.
You need to call the App service API in the win32 application.
You need to handle the connection in the App.xaml.cs in the UWP app
You could check the detailed code and sample from Stefan Wick's blog - UWP with Desktop Extension – Part 3.
I am new to Xamarin and I have successfully created an application in Xamarin for iOS. What I need is a way for this application to be viewed in the browser as a PWA. I figured to learn xamarin because I thought that this was a useful resource.
I have looked in to ooui but I can't successfully attach my Xamarin project to ooui.
At the end of this project I will have a running PWA coded in c# for iOS in the browser.
A link to the Xamarin can be found here:
https://github.com/SunRhythms/iosslidingpuzzle/tree/master/iOSSlidingPuzzle-3
Welcome to Xamarin! Your github repo is set to Private in it's setting.
Gathering from your other question as well, it's clear that you are using Native Xamarin.iOS and not Xamarin.Forms. (They have several differences if you check this)
Presently, there is no way of porting your Xamarin.iOS project into a PWA that has been made public. If you do convert your project manually into a Xamarin.Forms project, you could potentially use Ooui to convert Xamarin Forms into high performance WebAssembly code.
It seems like you have a sliding puzzle game, so it would be cool if you do end up doing it! Share it with us and the rest of the Xamarin community
I've developed a WinForms application with C# in Visual Studio on Windows and I need a version for macOS but I don't know which way is the best.
I also have a Mac machine so don't have problems about the compiler: I already used VS2017 with integrated Xamarin to develop an iOS app using my mac as the required build server but didn't find any such method for developing a Mac desktop application. NET core only works with console application and even Visual Studio for Mac is different from Visual Studio for Windows and doesn't provide any visual designer. Am I forced to redo the whole application using an Apple product?
There are multiple solutions to building desktop apps targeting a Mac using .NET.
Mono is an alternative implementation of the .NET Framework that reimplements the underlying Windows API calls that Win Forms makes. It's probably the most straightfoward way to port an existing Win Forms app to Mac.
ElectronNET is a combination of Electron and .NET. Electron provides a desktop development framework combining a Chromium rendering engine with NodeJS. It's best if you have a lot of familiarity with web development. It's notable that major companies that want to build cross platform apps are using Electron (Visual Studio Code, Slack, Atom etc) so those with the time to invest in researching how to do a cross platform app seem to choose this option.
Avalonia is a .NET desktop framework that is inspired by WPF, but it's cross platform.
So no, you aren't forced to redo your application. Hopefully you've done a good job of separating UI logic from business logic, which will make using one of these other technologies easier.
Note that even though .NET Core 3 (which is cross platform) has support for Win Forms and WPF, that functionality will only be working on Windows. Win Forms still depends on the underlying Windows APIs, and WPF still depends on DirectX.
Beginner question here, I'm learning to code and have been working with C# for a few weeks.
Now I am trying out with Windows.Forms and so far I haven't been sure on what kind of solution I am suppose to load. I am using a Mac and Tamarin Studio. Xamarin only offers Xamarin.Forms but I'm not sure about that.
Any helping hands out there ?
Xamarin Studio is only for cross platform app development. Meaning you can code in C# your Android and iOS app. At most, you can develop a Console project but that's about it.
Xamarin.Forms is not to be confused with Windows Forms (WinForms).
Xamarins.Forms 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. (Source)
WindowsForms Windows Forms (WinForms) is a graphical (GUI) class library included as a part of Microsoft .NET Framework, providing a platform to write rich client applications for desktop, laptop, and tablet PCs. (Source)
So to answer your question, if you want to build a Windows App using Windows Forms (though I would recommend using WPF as it's more modern), you will need to do that on Windows using either Visual Studio or another compatible IDE.
I'm writing a universal app by using windows 10, visual studio 2015 and C#. I would like to run this app on windows, Linux and mac. I know mono doesn't implements windows presentation framework, so, if I write a WPF app it runs onluy on windows. Now, if I write a universal app, can mono run that? If yes, how?
The holy grail .Net UI question :-)
TL;DR Answer = No.
Universal Windows Platform (UWP) core APIs (also known as Windows Runtime / WinRT) and the resulting APPX based applications only target Windows 10 platforms (Phone, PC, Tablet...) as those APIs and runtime do not exist on the other desktops.
Using Xamarin/Mono you could reuse a portion of the C# app's 'business' level logic but the presentation layer and GUI logic would have to be re-written using a different GUI (Native Widgets, GTK#, QTSharp, HTML/CSS/NodeJs, etc...). Same model that people have been using Xamarin for C# based mobile development applies, share your C# app logic across platforms and use Xamarin.Mac to build a native OS-X UI, and/or build a UI using GTK#, embed your app's runtime logic into a Electron/Blink shell, etc..
Currently the Windows 10 for Apache Cordova project which is HTML, JavaScript, and CSS, only targets Mobile (WinPhone, iOS, Android) and Windows 10 PC/Tablet platforms. That is not to say someone could not develop a new Cordova target to include OS-X and Linux desktop manager support (but I do not know of any that have not already stalled) :-/
Even Microsoft's xplat-based Visual Studio Code for Linux and OS-X uses Electron (Chromium based) to deploy the io.js based application along with the Blink layout engine to render the UI, all done in HTML/CSS/JS.