xamarin.forms

Shell navigation bottom and upper TabBar scroll behavior

≡放荡痞女 提交于 2021-01-28 02:39:16
问题 In follow-up of Shell navigation bar scroll behavior, I have created a custom Shell renderer toolbar with scroll behavior and I would like to know if it is possible to create the same for TabBar or Tab in Shell. See Gif https://android.jlelse.eu/scroll-your-bottom-navigation-view-away-with-10-lines-of-code-346f1ed40e9e using LP = Android.Views.ViewGroup.LayoutParams; public class CustomShell : ShellRenderer { public CustomShell(Context context) : base(context) { } protected override

Could not load assembly 'System.Buffers' during startup registration

依然范特西╮ 提交于 2021-01-28 01:48:12
问题 My Xamarin form apps was running like 5 minutes ago then all of sudden it stop working. The apps close instantly after it started. Below shows message display at Visual studio output, Assembly Loader probing location: 'System.Buffers'. Could not load assembly 'System.Buffers' during startup registration. This might be due to an invalid debug installation. A common cause is to 'adb install' the app directly instead of doing from the IDE. Things that I tried but failed to resolve the problem,

Creating a draggable map pin on UWP

放肆的年华 提交于 2021-01-28 00:40:31
问题 After following the instructions in the link here How to create draggable pin in windows 10 to give pick location functionality? I have a half working dragging pin. Currently the map pin (Grid) starts in the correct place on the map, however, upon dragging the map pin the pin initially pops up to the top left of the screen (0,0) and starts dragging from here. Upon dropping the pin it appears to have disconnected from the map element itself as you can then scroll the map and the pin stays in

Xamarin forms Add button in TabbedPage

会有一股神秘感。 提交于 2021-01-27 20:34:17
问题 I have a question. I created the following TabbedPage: <?xml version="1.0" encoding="utf-8" ?> <TabbedPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:d="http://xamarin.com/schemas/2014/forms/design" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:views="clr-namespace:MyApp.Views" mc:Ignorable="d" x:Class="MyApp.Views.MainPage" xmlns:android="clr-namespace:Xamarin.Forms.PlatformConfiguration

MVVM add elements dynamically to scrollview

梦想的初衷 提交于 2021-01-27 19:55:20
问题 Apologies ahead of time if this was asked before. The closest thing I found was (How to use vertical Scroll view to show binding data), which looks promising, though I am not sure if it will work because my understanding is that a template, as the name and definition would imply, has to follow a specific pattern and thus can't be dynamic. My issue : I am trying to rewrite some of our code to more closely follow MVVM patterns, this of course means making the view as dumb as possible. In my

Xamarin Forms CollectionView TapGestureRecognizer not firing on label

半世苍凉 提交于 2021-01-27 19:14:34
问题 I have a XF app with the following collection view defined. The 2nd label has a TapGestureRecognizer that doesn't fire DoSomethingInteresting in the model when I tap the label (trying this on Android). Can someone see what the issue is please? A working sample can be cloned from here. XAML <?xml version="1.0" encoding="utf-8" ?> <ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:local="clr-namespace:SampleApp" x:Class=

In Xamarin I need to set marker in the center of the map and get the position

最后都变了- 提交于 2021-01-27 19:06:11
问题 I'm trying in Xamarin to add a marker in the center of the map that marker will be fixe and can not be dragged, the map below that marker can be dragged normally. I need to get the position of the map that was chosen by the user, I searched a lot for the internet and found nothing that could help me. This feature is widely used in the Uber app. 回答1: On iOS , you can use the RegionChanged on a MKMapViewDelegate subclass to get updates as the user scrolls the map. Use the MKMapView.Region to

Xamarin Forms MVVM (Prism) with Media.Plugin - How to get a taken picture from device storage

流过昼夜 提交于 2021-01-27 18:34:47
问题 I am using Xamarin Forms PCL (MVVM Prism) with MediaPlugin (https://github.com/jamesmontemagno/MediaPlugin). I have a viewModel with a public property called ImagePath private string imagePath; public string ImagePath { get { return imagePath; } set { SetProperty(ref imagePath, value, "ImagePath"); } } in my XAML i have: <Image Source="{Binding ImagePath}" HeightRequest="100" WidthRequest="100"/> When i set a image url (from web) to ImagePath property, it works without problems. (I am setting

Binding: 'XXX' property not found on 'YYY', target property: 'Xamarin.Forms.Label.Text'

一笑奈何 提交于 2021-01-27 17:10:27
问题 I'm using Xamarin Forms using MVVM. I'm getting the following in the log: Binding: 'XXX' property not found on 'YYY', target property: 'Xamarin.Forms.Label.Text' Not sure is it related but when I update a variable within my Command function, this variable's updated value is not being reflected in the view. This is not happening in my other viewmodels and views. I'm not sure why. Please help! This is how I define the variable in the viewmodel and binding in the view. ViewModel public string

Add a settings page looking like in native app

放肆的年华 提交于 2021-01-27 10:10:51
问题 I would like to create settings page which would look like the settings on native platform (eg. PreferenceActivity/Fragment with xml on Android). I am used to design the settings page by creating simple preference xml on Android which handles the basic settings flawlessly, however I am unable to find the similar mechanism in Xamarin.Forms which would do the same thing for all platforms natively (with the gui part). I just only found the SettingsPlugin which handles "Create and access settings