In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-11 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article introduces how to achieve XAML in Visual Studio in Xamarin XAML language. The content is very detailed. Interested friends can use it for reference. I hope it will be helpful to you.
Implementation of XAML Preview in Xamarin XAML language tutorial Visual Studio
It takes a lot of time to check the effect of the XAML file each time it is compiled and run. If developers use XAML to lay out and design UI, they can view the XAML through a preview. This section explains how to implement previews in Visual Studio and Xamarin Studio.
Implement Preview in Visual Studio
Below we will take the Hello project as an example to implement the preview in Visual Studio. When implementing the preview, you need to select "View (V)" | "other windows (E)" | Xamarin.Forms Previewer command to open the Forms Previewer window, as shown in figure 1.17.
Figure 1.17 Forms Previewer window
Note: developers need to be patient for a while when the XAML file is loaded for the first time, and the Forms Previewer window will read the SDKs of iOS or Android, as shown in figure 1.18.
Figure 1.18 Forms Previewer window
At this point, we will see that there are six options in the Forms Previewer window, and the functions of these six options are described as follows:
Phone: present in a screen the size of a mobile phone.
Tablet: rendered in the tablet screen (notice that there is a zoom control in the lower right corner of the pane).
Android: displays the Android version of the screen.
IOS: displays the iOS version of the screen.
Portait (icon): preview using portrait orientation.
Landscape (icon): preview with landscape orientation.
Developers can choose these options according to the needs of their own code. Figure 1.18 selects Phone, iOS, and Portait (icon) modes.
Note: it is very likely that the content in the XAML will not be displayed in the Forms Previewer window that opens. If you encounter the problem of non-display, developers can have two solutions:
Before you try to preview the XAML file, you should build (compile) the project.
Try to close and reopen the XAML file.
Implement Preview in Xamarin Studio
If the developer wants to implement the preview in Xamarin Studio, click the Preview button in the .xaml file, and the preview window will appear on the right side of the XAML code, as shown in figure 1.19.
Figure 1.19 Preview window
So much for sharing about how to implement XAML in Visual Studio in the Xamarin XAML language. I hope the above content can be of some help and learn more knowledge. If you think the article is good, you can share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.