xamarin.forms

Change TextColor & Use Command on IsEnabled in Button in Xamarin

廉价感情. 提交于 2021-01-07 02:43:09
问题 I'm using IsEnabled on Button in Xamarin App and there is 2 things I can't do. Change the TextColor when the IsEnabled = false , but I can change the BackgroundColor . The solution is to use the Custom Entry and there is great article for that => https://docs.microsoft.com/en-us/xamarin/xamarin-forms/app-fundamentals/custom-renderer/entry But it only works with: public class MyEntry : Entry { } and the code behind my Page is: public class MyEntry : ContentPage { } and also I can't use

Change TextColor & Use Command on IsEnabled in Button in Xamarin

喜夏-厌秋 提交于 2021-01-07 02:41:38
问题 I'm using IsEnabled on Button in Xamarin App and there is 2 things I can't do. Change the TextColor when the IsEnabled = false , but I can change the BackgroundColor . The solution is to use the Custom Entry and there is great article for that => https://docs.microsoft.com/en-us/xamarin/xamarin-forms/app-fundamentals/custom-renderer/entry But it only works with: public class MyEntry : Entry { } and the code behind my Page is: public class MyEntry : ContentPage { } and also I can't use

justify text without custom render

。_饼干妹妹 提交于 2021-01-07 02:41:17
问题 I wanted to know if there is no way other than custom rendering to arrange the ends of the texts in xamarinforms? Because the modification does not support Android 7 and below. Thanks to those who respond! This code is related to my CustomRendering , which in Android 7, my app crashes: [assembly: ExportRenderer(typeof(CustomLabel), typeof(CustomLabelRender))] namespace Liko.Droid { public class CustomLabelRender : LabelRenderer { public CustomLabelRender(Context context) : base(context) { }

justify text without custom render

廉价感情. 提交于 2021-01-07 02:37:16
问题 I wanted to know if there is no way other than custom rendering to arrange the ends of the texts in xamarinforms? Because the modification does not support Android 7 and below. Thanks to those who respond! This code is related to my CustomRendering , which in Android 7, my app crashes: [assembly: ExportRenderer(typeof(CustomLabel), typeof(CustomLabelRender))] namespace Liko.Droid { public class CustomLabelRender : LabelRenderer { public CustomLabelRender(Context context) : base(context) { }

Unable to save push notification in SQLite when Xamarin Android App is Swiped or closed

天涯浪子 提交于 2021-01-07 01:32:17
问题 I am having issues saving and displaying push notification in my apps UI when the app is swiped from memory or closed. I still receive the notifications in this state, but upon opening the app or tapping the notification to open the app, the message does not display. Everything works fine when the app is running or in the background. I've followed the documentation here https://docs.microsoft.com/en-us/xamarin/xamarin-forms/data-cloud/azure-services/azure-notification-hub with a few

Xamarin bug-ish behaviour in CarouselView - CurrentItemChanged event fired unexpectedly?

心不动则不痛 提交于 2021-01-07 00:59:25
问题 While I was trying to implement an infinite scroll page I've encountered a strange behaviour with the CurrentItemChanged event of Xamarin.Forms.CarouselView . While the user scrolls, new items are added to the ItemSource and old items are removed (for low memory consumption). After I encountered the strange behaviour I've debugged and narrowed down the problem. So here are the steps to replicate the situation. Create a CarouselView . Create a ObservableCollection<T> in the code behind and

No property, BindableProperty, or event found for “HeightRequest”, or mismatching type between value and property error in Xamarin.Forms

旧街凉风 提交于 2021-01-06 03:30:54
问题 Not a duplicate of Xamarin Forms No property, bindable property, or event found for 'Sku', or mismatching type between value and property I am completely new to Xamarin.Forms and am trying my first Hello World app. I wrote the following code: <?xml version="1.0" encoding="utf-8" ?> <ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="hello_world.MainPage"> <StackLayout> <Label Text="Welome" BackgroundColor="Yellow"

No property, BindableProperty, or event found for “HeightRequest”, or mismatching type between value and property error in Xamarin.Forms

旧巷老猫 提交于 2021-01-06 03:25:54
问题 Not a duplicate of Xamarin Forms No property, bindable property, or event found for 'Sku', or mismatching type between value and property I am completely new to Xamarin.Forms and am trying my first Hello World app. I wrote the following code: <?xml version="1.0" encoding="utf-8" ?> <ContentPage xmlns="http://xamarin.com/schemas/2014/forms" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" x:Class="hello_world.MainPage"> <StackLayout> <Label Text="Welome" BackgroundColor="Yellow"

Only rounded bottom corners?

牧云@^-^@ 提交于 2021-01-05 12:44:08
问题 I am trying to make my Stacklayout 's background rounded (only right and left bottom sides). I looked for how to search but couldn't make sure. How can I do it? 回答1: You can use Xamarin.Forms.PancakeView package: 1- Install it in your shared as in your platform projects (latest version require Xamarin.Forms 4.8.0.1451 and upper). 2- Include the namespace for that package in your xaml: xmlns:pancake="clr-namespace:Xamarin.Forms.PancakeView;assembly=Xamarin.Forms.PancakeView" 3- Create a

When using the new ColumnDefinition syntax, how can I represent <ColumnDefinition />

萝らか妹 提交于 2021-01-05 09:12:33
问题 I have this code: <Grid.ColumnDefinitions> <ColumnDefinition /> <ColumnDefinition Width="50" /> </Grid.ColumnDefinitions> Can someone tell me how I can represent this using the new shortcut? <Grid ColumnDefinitions=" ,50"> In particular I am not sure what to put for the first ColumnDefinition which in my code is currently just a space before the slash. Related: Proposal: Simplify Grid Column and Row Definitions #673 回答1: As noted on the Grid Docs page the default value for Width (or Height in