Does Xamarin.Forms have designer support on VS?

2020-04-03 04:01发布

I recently downloaded Xamarin.Forms as Microsoft made it free. I am looking around in Visual Studio for a visual designer, that is usually included in Xamarin.Droid and Xamarin.IOS. Is there no such feature for Xamarin.Forms? Surely I must be missing something ?

5条回答
我欲成王,谁敢阻挡
2楼-- · 2020-04-03 04:26

You can find a "Design" named button under your source code. Click on it and you will be able to use drag and drop from the tool box on the left.

查看更多
孤傲高冷的网名
3楼-- · 2020-04-03 04:30

No, Xamarin Forms does not have a drag and drop design surface. There is a live XAML previewer, but it is still in alpha release.

查看更多
我只想做你的唯一
4楼-- · 2020-04-03 04:44

Xamarin does not have a designer for Xamarin.Forms at this time, but is working on the Xamarin.Forms Previewer which renders a live preview of a Xamarin.Forms page side-by-side with the XAML markup directly inside the Visual Studio and Xamarin Studio IDEs.

You can open the Xamarin.Forms Previewer by clicking on View -> Other Windows -> Xamarin.Forms Previewer in the Visual Studio menu or alternatively just searching for Xamarin.Forms in the Visual Studio quicklaunch box.

In addition to the official Xamarin.Forms Previewer, there is at least one other third party tool that exists in this space as well:

  • Gorilla Player by UX Divers is a real time Xamarin.Forms previewer currently in beta that runs in both a simulator and on hardware devices.

Update (2018): There is now also the Xamarin Live Player for Xamarin.Forms that allows you visualize your XAML layouts running live on a physical device as you are developing them.

查看更多
你好瞎i
5楼-- · 2020-04-03 04:46

A Xamarin previewer (while not a designer, it is still VERY handy) is available in the latest version of Visual Studio. To access it go to View > Other Windows > Xamarin.Forms Previewer.

When you open a XAML page, you can see it in the previewer (make sure your project is built first or you will get an error.)

The preview will update automagically as you edit your XAML, no save is required. When working with lists etc, you will want to create some dummy data to ensure you can see how it will work. There is an example at https://xamarinhelp.com/xamarin-forms-previewer/

查看更多
Animai°情兽
6楼-- · 2020-04-03 04:49

There are options to view your Xamarin

  1. Xamarin Form Previewer - you view it on visual studio
  2. Xamarin Live Player - you can view it on the target devices
  3. Gorilla Player - you can view it on target devices with real-time update

However all comes with limitation, if you're using third party controls than it may not be supported.

查看更多
登录 后发表回答