xamarin.forms

xamarin forms what is the difference content page and content view

落花浮王杯 提交于 2020-06-22 13:24:13
问题 What is the difference between: content page contentpage.content content view ? What I'm trying to do is to have some content that overlays the main content when an item is being tapped. I was thinking I could have all the content on in the same XMAL file and just make it visible or not depending on the button state. Or would it be better to split them into separate files? 回答1: A ContentPage is a Page that is intended to fill the display. A ContentView is a View that can be contained within a

How to load detailpage once in Xamarin Forms MasterDetailPage project

不问归期 提交于 2020-06-18 12:52:32
问题 I noticed detailpage is loaded from scratch everytime masterpage menu item is selected (so its constructor is called everytime). Is there a way to implement a detailpage which is loaded once, so everytime menu item is selected detailpage is simply showed/not showed? Thanks, Lewix 回答1: I solved implementing a dictionary page cache in MasterDetailPage: // in constructor MasterPageMenuCache = new Dictionary<Type, Page>(); // in OnItemSelected if (MasterPageMenuCache.Count == 0)

How to load detailpage once in Xamarin Forms MasterDetailPage project

☆樱花仙子☆ 提交于 2020-06-18 12:51:51
问题 I noticed detailpage is loaded from scratch everytime masterpage menu item is selected (so its constructor is called everytime). Is there a way to implement a detailpage which is loaded once, so everytime menu item is selected detailpage is simply showed/not showed? Thanks, Lewix 回答1: I solved implementing a dictionary page cache in MasterDetailPage: // in constructor MasterPageMenuCache = new Dictionary<Type, Page>(); // in OnItemSelected if (MasterPageMenuCache.Count == 0)

Bar/Linear chart with multiple entries in Xamarin Forms

余生长醉 提交于 2020-06-18 02:51:25
问题 I must implement a linear and a bar chart whit multiple data entries in Xamarin.Forms, I have seen multiple plugins like Microcharts but I think that doesn't afford multiple entries and Syncfusion which affords it but is not free. Any free plugin to do it? Example of the charts: Bar Chart Linear 回答1: Based on your demand, You could use PlotView to achieve that .Before you used it, please refer to following link to initialize the OxyPlot, http://docs.oxyplot.org/en/latest/getting-started/hello

How to show a video in each row in a stacklayout / listview [Xamarin.Forms]?

人走茶凉 提交于 2020-06-17 14:51:08
问题 I am using the plugin https://github.com/Baseflow/XamarinMediaManager where they have video support. I successfully use it and am able to play a video, but now that i try to display multiple videos in a stacklayout list (similiar to a instagram or twitter feed), then we are running into issues. So i bind each item in the list to a unique video URL, but once i scroll through the list, then the video appears 1st on top of eachother/the same video is reused on all rows, even though it should

Xamarin Forms CollectionView doesn't show properly

廉价感情. 提交于 2020-06-17 09:32:48
问题 I have a problem. I created a CollectionView with a custom ViewPage to place a grid with rowspan. The ItemSource is set using a ViewModel. Now when I scroll in the CollectionView the rows are randomly placed on the screen, even inside each other. Here is my xaml code: <CollectionView ItemsSource="{Binding agentOrderList}" Margin="5,0,5,0" HeightRequest="450"> <CollectionView.ItemsLayout> <LinearItemsLayout Orientation="Vertical" ItemSpacing="0"/> </CollectionView.ItemsLayout> <CollectionView

Update display of one item in a ListView's ObservableCollection

隐身守侯 提交于 2020-06-17 09:32:32
问题 I have a ListView which is bound to an ObservableCollection. Is there a way to update a single cell whenever a property of a SomeModel item changed, without reloading the ListView by changing the ObservableCollection? (Question is copied from https://forums.xamarin.com/discussion/40084/update-item-properties-in-a-listviews-observablecollection, as is my answer there.) 回答1: As I can see you are trying to use MVVM as a pattern for your Xamarin.Forms app. You are already using the

How to convert Xamarin Forms view to a Native view iOS/Android with the same size?

匆匆过客 提交于 2020-06-17 09:31:07
问题 I am using the example here, but I am struggeling to fill in the right size parameter here so that it represents the same size as the forms view. https://michaelridland.com/xamarin/creating-native-view-xamarin-forms-viewpage/ public static UIView ConvertFormsToNative(Xamarin.Forms.View view, CGRect size) { var renderer = RendererFactory.GetRenderer(view); renderer.NativeView.Frame = size; renderer.NativeView.AutoresizingMask = UIViewAutoresizing.All; renderer.NativeView.ContentMode =

How to resolve Xamarin Android linking problem

孤者浪人 提交于 2020-06-17 07:55:11
问题 My Xamarin Forms Android app works fine in Debug. But in Release, when deployed to either the emulator or to a device, the app is "stopped" after showing the splash screen. The debug log shows these errors, indicating that it can't find class FitWindowsLinearLayout... 10-23 22:24:59.270 14008 14008 E AndroidRuntime: Caused by: android.view.InflateException: Binary XML file line #14: Binary XML file line #14: Error inflating class android.support.v7.widget.FitWindowsLinearLayout 10-23 22:24:59

Can´t load plist file, Error Failed to parse Plist data type:key

折月煮酒 提交于 2020-06-17 06:05:06
问题 I get the error from the title in my xamarin forms app. It doesn't have that error before I update VS2017. I did this because I need some libraries for unity (and load all the others related to games). Now I can't even load the iOS part in Xamarin Forms, it says is not available. This is my Info.plist <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>UIDeviceFamily<