Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
136 changes: 79 additions & 57 deletions DLToolkit.Forms.Controls.sln

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net7.0;</TargetFrameworks>
<!--<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net7.0-windows10.0.19041.0</TargetFrameworks>-->
<!-- Uncomment to also build the tizen app. You will need to install tizen by following this: https://github.com/Samsung/Tizen.NET -->
<!-- <TargetFrameworks>$(TargetFrameworks);net7.0-tizen</TargetFrameworks> -->
<UseMaui>true</UseMaui>
<ProjectType>Library</ProjectType>
<ImplicitUsings>enable</ImplicitUsings>

<!--<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">14.2</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">14.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">21.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</SupportedOSPlatformVersion>
<TargetPlatformMinVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</TargetPlatformMinVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'tizen'">6.5</SupportedOSPlatformVersion>-->
</PropertyGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.4.33110.190
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DLToolkit.Maui.Controls.FlowListView", "DLToolkit.Maui.Controls.FlowListView.csproj", "{C515707C-0F5F-4DB6-AB57-BA47C526992E}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{C515707C-0F5F-4DB6-AB57-BA47C526992E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C515707C-0F5F-4DB6-AB57-BA47C526992E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C515707C-0F5F-4DB6-AB57-BA47C526992E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C515707C-0F5F-4DB6-AB57-BA47C526992E}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {CEDB42AE-1F4A-49EC-A38D-A3B1C12C3974}
EndGlobalSection
EndGlobal
11 changes: 11 additions & 0 deletions DLToolkit.Maui.Controls.FlowListView/Epsilon.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
using System;

namespace DLToolkit.Maui.Controls.FlowListView
{
[Helpers.Preserve(AllMembers = true)]
internal struct Epsilon
{
public const double DoubleValue = 2.22044604925031E-16;
}
}

27 changes: 27 additions & 0 deletions DLToolkit.Maui.Controls.FlowListView/FlowCells/FlowGridCell.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
using System;
using Microsoft.Maui.Controls;

namespace DLToolkit.Maui.Controls.FlowListView.FlowCells
{
/// <summary>
/// FlowListView grid cell.
/// </summary>
[Helpers.Preserve(AllMembers = true)]
public class FlowGridCell : Grid, IFlowViewCell
{
/// <summary>
/// Initializes a new instance of the <see cref="DLToolkit.Maui.Controls.FlowListView.FlowGridCell"/> class.
/// </summary>
public FlowGridCell()
{
}

/// <summary>
/// Raised when cell is tapped.
/// </summary>
public virtual void OnTapped()
{
}
}
}

27 changes: 27 additions & 0 deletions DLToolkit.Maui.Controls.FlowListView/FlowCells/FlowScrollCell.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
using System;
using Microsoft.Maui.Controls;

namespace DLToolkit.Maui.Controls.FlowListView.FlowCells
{
/// <summary>
/// FlowListView scroll cell.
/// </summary>
[Helpers.Preserve(AllMembers = true)]
public class FlowScrollCell : ScrollView, IFlowViewCell
{
/// <summary>
/// Initializes a new instance of the <see cref="DLToolkit.Maui.Controls.FlowListView.FlowScrollCell"/> class.
/// </summary>
public FlowScrollCell()
{
}

/// <summary>
/// Raised when cell is tapped.
/// </summary>
public virtual void OnTapped()
{
}
}
}

27 changes: 27 additions & 0 deletions DLToolkit.Maui.Controls.FlowListView/FlowCells/FlowStackCell.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
using System;
using Microsoft.Maui.Controls;

namespace DLToolkit.Maui.Controls.FlowListView.FlowCells
{
/// <summary>
/// FlowListView stack cell.
/// </summary>
[Helpers.Preserve(AllMembers = true)]
public class FlowStackCell : StackLayout, IFlowViewCell
{
/// <summary>
/// Initializes a new instance of the <see cref="DLToolkit.Maui.Controls.FlowListView.FlowStackCell"/> class.
/// </summary>
public FlowStackCell()
{
}

/// <summary>
/// Raised when cell is tapped.
/// </summary>
public virtual void OnTapped()
{
}
}
}

27 changes: 27 additions & 0 deletions DLToolkit.Maui.Controls.FlowListView/FlowCells/FlowViewCell.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
using System;
using Microsoft.Maui.Controls;

namespace DLToolkit.Maui.Controls.FlowListView.FlowCells
{
/// <summary>
/// FlowListView content view cell.
/// </summary>
[Helpers.Preserve(AllMembers = true)]
public class FlowViewCell : ContentView, IFlowViewCell
{
/// <summary>
/// Initializes a new instance of the <see cref="DLToolkit.Maui.Controls.FlowListView.FlowViewCell"/> class.
/// </summary>
public FlowViewCell()
{
}

/// <summary>
/// Raised when cell is tapped.
/// </summary>
public virtual void OnTapped()
{
}
}
}

18 changes: 18 additions & 0 deletions DLToolkit.Maui.Controls.FlowListView/FlowCells/IFlowViewCell.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
using System;
using Microsoft.Maui.Controls;

namespace DLToolkit.Maui.Controls.FlowListView.FlowCells
{
/// <summary>
/// IFlowViewCell.
/// </summary>
[Helpers.Preserve(AllMembers = true)]
public interface IFlowViewCell
{
/// <summary>
/// Raised when cell is tapped.
/// </summary>
void OnTapped();
}
}

44 changes: 44 additions & 0 deletions DLToolkit.Maui.Controls.FlowListView/FlowColumnExpand.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
using System;

namespace DLToolkit.Maui.Controls.FlowListView
{
/// <summary>
/// FlowListView column expand mode.
/// </summary>
[Helpers.Preserve(AllMembers = true)]
public enum FlowColumnExpand
{
/// <summary>
/// None (default)
/// </summary>
None,

/// <summary>
/// Only first column is expanded
/// </summary>
First,

/// <summary>
/// Only last column is expanded
/// </summary>
Last,

/// <summary>
/// Columns are expanded proportionally
/// </summary>
Proportional,

/// <summary>
/// Columns are expanded proportionally
/// First column expand more to keep columns parallel
/// </summary>
ProportionalFirst,

/// <summary>
/// Columns are expanded proportionally
/// Last column expand more to keep columns parallel
/// </summary>
ProportionalLast,
}
}

41 changes: 41 additions & 0 deletions DLToolkit.Maui.Controls.FlowListView/FlowDataTemplateSelector.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
using System;
using System.Collections;
using System.Linq;
using Microsoft.Maui.Controls;

namespace DLToolkit.Maui.Controls.FlowListView
{
[Helpers.Preserve(AllMembers = true)]
public class FlowDataTemplateSelector : DataTemplateSelector
{
readonly WeakReference<FlowListView> _flowListViewRef;

private readonly DataTemplate _defaultTemplate;

public FlowDataTemplateSelector(WeakReference<FlowListView> flowListViewRef)
{
_flowListViewRef = flowListViewRef;
_defaultTemplate = new DataTemplate(() => new FlowListViewInternalCell(flowListViewRef));
}

protected override DataTemplate OnSelectTemplate(object item, BindableObject container)
{
if (item is IFlowLoadingModel)
{
if (_flowListViewRef.TryGetTarget(out FlowListView flowListView))
{
return flowListView.FlowLoadingTemplate;
}
}
else if (item is IFlowEmptyModel)
{
if (_flowListViewRef.TryGetTarget(out FlowListView flowListView))
{
return flowListView.FlowEmptyTemplate;
}
}

return _defaultTemplate;
}
}
}
19 changes: 19 additions & 0 deletions DLToolkit.Maui.Controls.FlowListView/FlowGroup.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
using System;
using System.Collections.ObjectModel;

namespace DLToolkit.Maui.Controls.FlowListView
{
[Helpers.Preserve(AllMembers = true)]
internal class FlowGroup : FlowObservableCollection<object>
{
public object Key { get; private set; }

public object Model { get; private set; }

public FlowGroup(object key, object model)
{
Key = key;
Model = model;
}
}
}
18 changes: 18 additions & 0 deletions DLToolkit.Maui.Controls.FlowListView/FlowGroupColumn.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
using System;
using System.Collections.ObjectModel;

namespace DLToolkit.Maui.Controls.FlowListView
{
[Helpers.Preserve(AllMembers = true)]
internal class FlowGroupColumn : FlowObservableCollection<object>
{
public int ColumnCount { get; set; }

public bool ForceInvalidateColumns { get; set; }

public FlowGroupColumn(int columnCount)
{
ColumnCount = columnCount;
}
}
}
Loading