Windows Forms App Visual Studio For Mac

-->

When you create a picture viewer, the first step is to create a Windows Forms App project.

I purchased a cloud mac from macincloud.com for debug my xamarin forms iOS project.And I am using windows with Visual studio 2015 professional. 1)so do I need to install Visual studio on mac machine? 2)can I install xamarin studio on mac? And does it works with visual studio 2015 on windows machine?

Open Visual Studio 2017

  1. On the menu bar, choose File > New > Project. The dialog box should look similar to the following screenshot.


    New projectdialog box

  2. On the left side of the New Project dialog box, choose either Visual C# or Visual Basic, and then choose Windows Desktop.

  3. In the project templates list, choose Windows Forms App (.NET Framework). Name the new form PictureViewer, and then choose the OK button.

    Note

    If you don't see the Windows Forms App (.NET Framework) template, use the Visual Studio Installer to install the .NET desktop development workload.
    For more information, see the Install Visual Studio page.

Open Visual Studio 2019

  1. On the start window, choose Create a new project.

  2. On the Create a new project window, enter or type Windows Forms in the search box. Next, choose Desktop from the Project type list.

    After you apply the Project type filter, choose the Windows Forms App (.NET Framework) template for either C# or Visual Basic, and then choose Next.

    Note

    If you don't see the Windows Forms App (.NET Framework) template, you can install it from the Create a new project window. In the Not finding what you're looking for? message, choose the Install more tools and features link.

    Next, in the Visual Studio Installer, choose the Choose the .NET desktop development workload.

    After that, choose the Modify button in the Visual Studio Installer. You might be prompted to save your work; if so, do so. Next, choose Continue to install the workload.

  3. In the Configure your new project window, type or enter PictureViewer in the Project name box. Then, choose Create.

Visual Studio creates a solution for your app. A solution acts as a container for all of the projects and files needed by your app. These terms will be explained in more detail later in this tutorial.

About the Windows Forms App project

  1. The development environment contains three windows: a main window, Solution Explorer, and the Properties window.

    If any of these windows are missing, you can restore the default window layout. On the menu bar, choose Window > Reset Window Layout.

    You can also display windows by using menu commands. On the menu bar, choose View > Properties Window or Solution Explorer.

    If any other windows are open, close them by choosing the Close (x) button in their upper-right corners.

    • Main window In this window, you'll do most of your work, such as working with forms and editing code. The window shows a form in the Form Editor. At the top of the window, the Start Page tab and the Form1.cs [Design] tab appear. (In Visual Basic, the tab name ends with .vb instead of .cs.)
    • Main window In this window, you'll do most of your work, such as working with forms and editing code. The window shows a form in the Form Editor.
    • Solution Explorer window In this window, you can view and navigate to all items in your solution.

    If you choose a file, the contents of the Properties window changes. If you open a code file (which ends in .cs in C# and .vb in Visual Basic), the code file or a designer for the code file appears. A designer is a visual surface onto which you can add controls such as buttons and lists. For Visual Studio forms, the designer is called the Windows Forms Designer.

    • Properties window In this window, you can change the properties of items that you choose in the other windows. For example, if you choose Form1, you can change its title by setting the Text property, and you can change the background color by setting the Backcolor property.

      Note

      The top line in Solution Explorer shows Solution 'PictureViewer' (1 project), which means that Visual Studio created a solution for you. A solution can contain more than one project, but for now, you'll work with solutions that contain only one project.

  2. On the menu bar, choose File > Save All.

    As an alternative, choose the Save All button on the toolbar, which the following image shows.


    Save Alltoolbar button

    Visual Studio automatically fills in the folder name and the project name and then saves the project in your projects folder.

Next steps

Forms
  • To go to the next tutorial step, see Step 2: Run your app.

  • To return to the overview topic, see Tutorial 1: Create a picture viewer.

See also

-->

Windows Forms App Visual Studio For Mac Windows 10

First-class support for Xamarin allows you to develop rich native experiences for Android, macOS, iOS, tvOS, and watchOS. Xamarin.Forms cross-platform applications help you share XAML-based UI code between Android, iOS, and macOS without limiting access to native functionality.

Windows Forms App Visual Studio For Mac

Xamarin.Forms

XAML Hot Reload for Xamarin.Forms is built into Visual Studio for Mac in version 8.3 and later. With this feature enabled changes are instantly reflected in your running app every time you save the file.

XAML Hot Reload can be enabled by checking the Enable Xamarin Hot Reload checkbox at Visual Studio > Preferences > Projects > Xamarin Hot Reload.

For more information on Hot Reload, see the XAML Hot Reload for Xamarin.Forms guide within the documentation.

Microsoft Visual Studio For Mac

Android

Visual Studio for Mac has its own integrated Android SDK manager, allowing you access to the SDKs you want your app to target.

For Android applications, Visual Studio for Mac includes its own designer, which works with Android .axml files tovisually construct user interfaces. Visual Studio for Mac will open these files in its Android Designer, as illustrated in the following image:

For more information on the Android Designer, see the Xamarin.Android Designer Overview guide.

iOS

The iOS Designer is fully integrated with Visual Studio for Mac and enables visual editing of .xib and Storyboard files to create iOS, tvOS, and WatchOS UIs and transitions. The entire user interface can be built using drag-and-drop functionality between the Toolbox and Design Surface, while using an intuitive approach to handling events. The iOS Designer also supports custom controls with the added benefit of design-time rendering.

For more information on using the iOS Designer, see the Designer guides.

Mac

Xamarin provides native Mac API bindings that allow you to create beautiful Mac applications.

For more information on writing Mac applications with Visual Studio for Mac, refer to the Xamarin.Mac guides.

Xamarin Enterprise features

Note

These products can only be used with a Visual Studio Enterprise subscription.

Profiler

The Xamarin Profiler has three instruments available for profiling. The Introduction to the Xamarin Profiler guide explores what these instruments measure and how they analyze your application, and clarifies the meaning of the data presented on each screen.

Inspector

The Xamarin Inspector provides an interactive C# console with user tools. It can be used as a debugging or diagnostics aid when inspecting live applications, as a teaching tool, as a documentation tool, or an experimentation tool.

It consists of a standalone application that provides a rich C# console that can target various programming platforms (Android, iOS, Mac, and Windows) and integrate into your IDEs debugging workflow.

Visual Studio Mac Os

For more information, see the Xamarin Inspector guide.