xamarin.forms

How to set all the item template data into a single view in Xamarin Carousel

梦想的初衷 提交于 2021-02-10 06:46:05
问题 I have tried to make all the items in the itemtemplate into a single view as like in the below image, how to achieve this by using Xamarin CarouselView, i am using like this carousel = new CarouselView(); carousel.BindingContext = this; carousel.ItemTemplate = itemTemplate; carousel.SetBinding(CarouselView.ItemsSourceProperty, new Binding(nameof(this.Items), mode: BindingMode.OneWay)); LinearItemsLayout linearItemsLayout = new LinearItemsLayout(ItemsLayoutOrientation.Horizontal);

How to show and hide a StackLayout based on ListView scroll direction in Xamarin.Forms?

雨燕双飞 提交于 2021-02-10 06:40:57
问题 I have a screen with a ListView that shows a collection of comments. Also, I have a StackLayout overlapping the end of the ListView , which has an Entry and a Button to add a new comment. I want to hide/show this StackLayout depending on the ListView scrolling direction: If the user scrolls down -> hide the StackLayout . If the user scrolls up -> show the StackLayout . Anyone knows a way to accomplish that behavior? Thanks in advance! 回答1: Xamarin.Forms ListView provides an OnItemAppearing

Bind properties to elements inside a Listview DataTemplate

空扰寡人 提交于 2021-02-10 06:22:06
问题 I can't get databinding to work within a DataTemplate in Xamarin forms. I can get it to work with the ListView (i.e. binding the RowHeight ), but once in the DataTemplate , setting things to a property of my ViewModel has no affect. In the below example, if I set the ColumnDefinition.Width to a property, it is completely ignored, but setting it to a hard value works fine. I have put in a label to see what the property value is and it turns out blank when inside the Datatemplate , and I have

How to change background Color of Navigationbar programmatically in Xamarin?

杀马特。学长 韩版系。学妹 提交于 2021-02-10 05:51:49
问题 I created a navigationbar in UWP project on Xamarin. App.xaml.cs ... public app() { InitializeComponent(); MainPage = new NavigationPage(new LoginPage()){ BarBackgroundColor = Color.Black; } } So If I am in Setting Page, I need to change the color of Navigationbar programmatically. SettingPage.xaml.cs ... private void clicked_btn(sender, e) { ... // how can I get the handle of navigationbar and then change the attribute of one??? } Is that possible? Is there a way I can do? 回答1: Its better

Change language runtime with wrapped language resources Xamarin Forms

和自甴很熟 提交于 2021-02-10 05:42:09
问题 We are developing several mobile apps, with Common .NET Standard library between them, which holds the common functionallity. (MVVM) The Common project has a TranslationManager Class, and a Resource file, which holds the common translations. TranslationManager uses constructor injection, to inject the app specific translation resources. public TranslationManager(ResourceManager appSpecificLanguageResources) { _commonResources = CommonTranslationResources.ResourceManager;

Task does not contain a definition for Content

我们两清 提交于 2021-02-08 15:17:38
问题 How to overcome the error below? I have follow below tutorial but I get the red line that state that does not contain definition of Content . https://www.youtube.com/watch?v=IVvJX4CoLUY private void UploadFile_Cliked(object sender, EventArgs e) { var content = new MultipartFormDataContent(); content.Add(new StreamContent(_mediaFile.GetStream()), "\"file\"", $"\"{_mediaFile.Path}\""); var httpClient = new HttpClient(); var uploadServiceBaseAddress = "http://192.168.137.1/pic/"; var

Failed to parse altool output: Failed to parse PList data type: /

生来就可爱ヽ(ⅴ<●) 提交于 2021-02-08 12:37:11
问题 I have a Xamarin.Forms application. I am up to date on my VSMac, XCode, Xamarin, Xamarin.Forms, Mac, and everything else that I can think of. I am stumped regarding where to go resolve this issue. It is happening when I attempt to deploy the application to the iOS app store. I have checked my plist file with "plutil -lint" and it comes back as OK. any ideas are greatly appreciated. TIA. 回答1: Increase the build number in the info.plist file 回答2: I had the same issue, increasing the build

How to compress(Zip) a video in xamarin forms

∥☆過路亽.° 提交于 2021-02-08 12:16:17
问题 I want to compress a large sized video and upload it into the server.How can I do this, I have no idea about this. Please help me.... 回答1: Firstly - Zipping of video content is unlikely to reduce its size in any meaningful way. What you should be looking at is different codecs and encoding mechanisms for reducing its size. Look at ffmpeg : ffmpeg dot org You can call this tool on the command line via the System.Diagnostics.Process class. You can then tell it to process a video file. This will

How to compress(Zip) a video in xamarin forms

坚强是说给别人听的谎言 提交于 2021-02-08 12:14:27
问题 I want to compress a large sized video and upload it into the server.How can I do this, I have no idea about this. Please help me.... 回答1: Firstly - Zipping of video content is unlikely to reduce its size in any meaningful way. What you should be looking at is different codecs and encoding mechanisms for reducing its size. Look at ffmpeg : ffmpeg dot org You can call this tool on the command line via the System.Diagnostics.Process class. You can then tell it to process a video file. This will

Android image localisation in Xamarin Form

别来无恙 提交于 2021-02-08 11:44:18
问题 I have a Xamarin Form application which has a language dropdown so user can select the application language. When user select a language I call: CultureInfo culture = CultureInfo.CreateSpecificCulture(language); System.Globalization.CultureInfo.CurrentUICulture = culture; Thread.CurrentThread.CurrentCulture = culture; Thread.CurrentThread.CurrentUICulture = culture; AppResources.Culture = culture; The application works fine and picks the strings from AppResources.{language}.resx My problem is