generate functionTue, 07 Feb 2023

listcollectionview filtering current month

public class NameOfClass : ListCollectionView { public override bool PassesFilter(object item) { var date = ((MyObject)item).Date; var currentMonth = DateTime.Now.Month; return date.Month == currentMonth; } }

Want to kickstart your project?Use the new AI Studio to create your code