Comments (10)
This also works:
[assembly: Xamarin.Forms.Platform.UWP.ExportRenderer(typeof(DLToolkit.Forms.Controls.FlowListView), typeof(App.UWP.Controls.AlternateListViewRenderer))]
namespace App.UWP.Controls
{
using Xamarin.Forms.Platform.UWP;
public class AlternateListViewRenderer : ListViewRenderer
{
protected override void OnElementChanged(ElementChangedEventArgs<Xamarin.Forms.ListView> e)
{
base.OnElementChanged(e);
if (List != null)
List.SelectionMode = Windows.UI.Xaml.Controls.ListViewSelectionMode.None;
}
}
}
from dltoolkit.forms.controls.
@daniel-luberda Little update : I managed to do it for a normal listview this should be the same way to implement it on your FlowListView.
public class AlternateListViewRenderer : ListViewRenderer
{
protected override void OnElementChanged(ElementChangedEventArgs<Xamarin.Forms.ListView> e)
{
base.OnElementChanged(e);
if (this.List != null)
this.List.ItemContainerStyle = (Style)App.Current.Resources["ListViewItemStyle1"];
}
}
this is the CustomRenderer i'm using for my listview
And the style is this :
<Style x:Key="ListViewItemStyle1" TargetType="ListViewItem">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ListViewItem">
<ContentPresenter/>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
Normally the ContentPresenter is a ListViewItemPresenter by changing it to a ContentPresenter i'm disabling all animations on the cell since i don't want it to be clicked.
I think that for the issue i asked first (disabling row animation but keeping item animation) maybe it can be done at a cell level or disabling all native animations then adding animations from xamarin. I'll try to do it with the FlowListView when i have a little more time
from dltoolkit.forms.controls.
Can you link to this on the front page (Readme)? I just lost an hour trying to write my own CustomRenderer for ViewCellRenderer on UWP.
from dltoolkit.forms.controls.
Something like this (but from code): http://stackoverflow.com/questions/38705396/how-to-change-selectedbackground-in-listviewitempresenter-inside-a-gridview
from dltoolkit.forms.controls.
Well i can't seem to make that work in my custom renderer, i'll try to post on XF Forums for other ideas, maybe someone will be able to help. I'll update here anyway as soon as i fix this :)
Thanks,
from dltoolkit.forms.controls.
@R3VV Any news about this?
from dltoolkit.forms.controls.
@daniel-luberda unfortunately no. I changed my way of approach and created a WrapLayout with an ItemsSource to get a semblant of gallery without the animations from the Windows ListView. But it's pretty annoying to do it this way since you can't get all the nice features from the listview. It's the same with normal listview. If you want to create some repeated content without clickable animation on the cell itself.
from dltoolkit.forms.controls.
@R3VV @YZahringer That's cool. Thanks! :)
from dltoolkit.forms.controls.
I just lost an hour looking for how to do this as well.
from dltoolkit.forms.controls.
Also this 6798761 should help. I'll also add @YZahringer solution to README.md
Thanks
from dltoolkit.forms.controls.
Related Issues (20)
- UWP, Disable row highlight does not work. HOT 1
- DLToolkit.Forms.Controls.FlowListView not working in UWP
- ImageCropView: "Can not access a closed stream." HOT 1
- How do you use FlowListView with design time data
- UWP issue - FlowLoadingCommand keeps loading 5 times ahead of the page size
- Footer is suddenly missing after updating Xamarin.Forms
- Does not move or zoom in XF 4 HOT 2
- Long pressing AND tap command in a list item using effects ?
- ImageCircleCrop Pan and Pinch doesnt seem to be working with latest version HOT 1
- Unable to spy items with Appium HOT 1
- Long tap event with FlowListView
- TagEntryView loses focus when a new tag is added on UWP.
- Extra new elements from OnElementChanged in UIView on iOS HOT 6
- Binding subproperty of object to FlowItemsSource throws NullRefenceException HOT 1
- Creating sections with different layouts but no grouping
- Add column in Flowlistview
- Heavy lags when connected with debugger to Android on VS2019 16.9.2 and newer HOT 2
- it won't work with ios 15 anymore, are you planning to fix it?
- Since ios 15 reload from event handler leads to immense flickering! HOT 2
- InfiniteScroll, binding FlowTotalRecords doesn't work
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dltoolkit.forms.controls.