Skip to content

Instantly share code, notes, and snippets.

@kosorin
kosorin / ItemClickAction.cs
Created January 18, 2019 21:45
UWP behavior
public class ItemClickAction : DependencyObject, IAction
{
public ICommand Command
{
get { return (ICommand)GetValue(CommandProperty); }
set { SetValue(CommandProperty, value); }
}
public static readonly DependencyProperty CommandProperty =
DependencyProperty.Register(nameof(Command), typeof(ICommand), typeof(ItemClickAction), new PropertyMetadata(null));
public class DateRange : IEquatable<DateRange>
{
public DateTime Start { get; }
public DateTime End { get; }
public double Days { get; }
public DateRange(DateTime start, DateTime end)
{
// https://stackoverflow.com/a/3670089/1933104
public static bool ScrambledEquals<T>(this ICollection<T> self, ICollection<T> other)
{
if (self == null)
{
throw new ArgumentNullException(nameof(self));
}
if (other == null)