According to the docs, the property IsGrouped is available on the new(ish) XF CollectionView class (only on iOS for now as the docs state)
I'm however getting a compiler error with this code:
<CollectionView ItemsSource="{Binding Data}" IsGrouped="true">
<!--<..../>-->
</CollectionView>
No property, bindable property, or event found for 'IsGrouped', or mismatching type between value and property.
Both Android and iOS, seems the IsGrouped property may not be in the API yet, I guess.
Tried on Xamarin Forms 4.1.0.581479/673156
You should update your Xamarin.Forms version to v4.2
From the latest release notes regarding v4.2.0.709249 (4.2.0)
"CollectionView Grouping iOS" (#6590)
The grouping functionality is in development right now. I think the implementation for iOS is merged and the Android one is about to be merged.
Funny that the property is already mentioned in the Docs already. Sorry about that. The grouping for iOS seems to be also merged into 4.2 that was released yesterday. For Android it should be there soon so don't expect it to work there for now.
Related
This is the shared touch effect files
This is the android platforms specific code
This is where I register the effect and the handler
This is where I used toucheffect nativeanimation property
Some properties are working , for example : the PressedOpacityBackgroundColor. Is there a way to make the native animation property to work
I tried from someone's code from where this issue was mentioned. I implemented as it is but the native animation property isn't working and also some other properties as well.
You can also use the Toutheffect in the MAUI.
You can add the Xamarin.CommunityToolkit.MauiCompat 2.0.2-preview1013 to your project. It is the .NET MAUI Compatible version of Xamarin.CommunityToolkit.
I am using Xam.Tabview plugin in my project.
Everything works fine except the header is not scrollable.
Below is my code:
<control:XFTabControl
x:Name="Tabcomponent"
VerticalOptions="FillAndExpand"
TabClicked="Tab_TabClicked"
HeaderHeight="40" FlowDirection="LeftToRight"
SelectedIndex="{Binding Index}">
<control:XFTabControl.XFTabPages>
**//Page1**
<tabview:XFTabPage>
<tabview:XFTabPage.Header>
<tabview:XFTabHeader>
<Label Text="Tab1"/>
</tabview:XFTabHeader>
</tabview:XFTabPage.Header>
<tabview:XFTabPage.Content>
<template:Page1></template:Page1>
</tabview:XFTabPage.Content>
</tabview:XFTabPage>
</control:XFTabControl.XFTabPages>
**//Page2**
<tabview:XFTabPage>
<tabview:XFTabPage.Header>
<tabview:XFTabHeader>
<Label Text="Tab1"/>
</tabview:XFTabHeader>
</tabview:XFTabPage.Header>
<tabview:XFTabPage.Content>
<template:Page2></template:Page2>
</tabview:XFTabPage.Content>
</tabview:XFTabPage>
</control:XFTabControl.XFTabPages>
</control:XFTabControl>
Any help is appreciated!
I am not sure if that package is still maintained or has documentation but the last update is 10 months ago, as an alternative you can try TabView from XamarinCommunityToolkit which is officially maintained by Xamarin.Forms team and the community.
Getting Started with the Xamarin Community Toolkit
TabView Docs https://learn.microsoft.com/en-us/xamarin/community-toolkit/views/tabview
Another option would be Sharpnado.Tabs package, Repo
I have an Xamarin Application together with MvvmCross 5.7 and wanted to moved it completly to Xamarin Forms. It builds and starts as expected, but the first page isn't loaded.
I created the projects based this template: https://github.com/martijn00/MvxForms
Also I created a test project to see if something is wrong with my existing project: https://github.com/NPadrutt/XFTestProject
Can anyone point out what I am missing?
Either add a SplashScreen Activity who inherits from MvxSplashScreenActivity and with the method override:
protected override void TriggerFirstNavigate()
{
StartActivity(typeof(MainActivity));
base.TriggerFirstNavigate();
}
Or add these lines to the OnCreate Method in the MainActivity:
var startup = Mvx.Resolve<IMvxAppStart>();
startup.Start();
InitializeForms(bundle);
You don't neet to call startup.Start() in your MainActivity nor you need to init xamarin forms. It's done for you now (check RunAppStart method in mvvmcross sources for MvxFormsAppCompatActivity class).
From a quick glimpse at your GitHub repo, it looks like you're not decorating your view (i.e. WelcomView) with [MvxContentPagePresentation()] attribute (e.g. example from MvvmCross Playground). Add it in your WelcomeView.xaml.cs file and check if that helped
If it's a fresh project, you might want to consider using latest version of MvvmCross (v6). There's an awesome step by step guide to setup Xamarin.Forms with it by Nick Randolph
I have written an Android custom renderer for a checkbox control.
I set the checkbox disabled color like so
Control.ButtonTintList = ColorStateList.ValueOf(element.DisabledColor.ToAndroid());
where Control is an Android.Widget.CheckBox
This does not work prior to Lollipop and I get an error
CheckboxRenderer.SetDisabledColor (Incident.UserControls.Checkbox
element) Java.Lang.LinkageError: no method with
name='setButtonTintList'
signature='(Landroid/content/res/ColorStateList;)V' in class
Landroid/widget/CompoundButton; no method with
name='setButtonTintList'
signature='(Landroid/content/res/ColorStateList;)V' in class
Landroid/widget/CompoundButton;
I have found some mention of using DrawableCompat to do this but can't figure out how to do it in Xamarin/C#
Any ideas?
using Android.Support.V7.Widget.AppCompactCheckbox instead of Your base Android.Widget.Checkbox might do the trick.
Also to change colour at runtime you could use this:
ViewCompat.SetBackgroundTintList(_YourView , ColorStateList.ValueOf(Color.ParseColor(Resources.GetString(Resource.Color.blueLine))));
Actually, the problem with things not working pre-lollipop is that Android KitKat is obsolete and so are the rest of the versions below so to have features that are new to Android you need to use the Appcompact library for backward compatibility.
Anyways, Goodluck! Happy coding
This is just as the title suggests. I've updated my Xamarin Forms project to a 1.6 NetStandard project and now the tapped event on my SfListView isn't working (It just doesn't fire at all).
Does anyone has any suggestions of what could be wrong or have faced anything like this?
EDIT
this is xaml code for SfListView:
<StackLayout HeightRequest="15" Grid.Row="0" HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand">
<xForms:SfListView Orientation="Horizontal" ItemSize="128" ItemsSource="{Binding Categories}" SelectionBackgroundColor="Transparent" IsScrollBarVisible="False">
<xForms:SfListView.ItemTemplate>
<DataTemplate>
<cells:CategoryCell />
</DataTemplate>
</xForms:SfListView.ItemTemplate>
<xForms:SfListView.Behaviors>
<behaviors:SfSelectedItemBehavior Command="{Binding FilterCommand}" />
</xForms:SfListView.Behaviors>
</xForms:SfListView>
</StackLayout>
this structure was working before the update. I use a behavior for item selection.
We have checked with the reported query “SfListView ItemTapped event does not trigger after updating the NetStandard Library” from our side. Unfortunately the reported issue does not occur at our end and the ItemTapped event is fired as expected.
For your reference, we have attached the working sample link below.
Sample link: http://www.syncfusion.com/downloads/support/directtrac/190562/ze/SfListViewSample-670965361
Can you please check in your device whether the issue reproduces in our sample also?
If so, Can you please share the below details?
Whether the reported issue occurs in particular device or all devices? (Can you please share the details of your tested device)
Whether the issue is produced in particular platform?
Whether the issue is produced in particular version of Xamarin.Forms and SfListView? (In our sample, we used XForms (v2.3.4.280) and SfListView(v15.3.0.33))
Also can you please share the share the template in which the SfListView items are loaded?