Skip to content

Commit 4b49368

Browse files
committed
Horizontal listview sample committed.
1 parent b42791a commit 4b49368

File tree

227 files changed

+7721
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

227 files changed

+7721
-0
lines changed

ListViewMaui.sln

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.0.31611.283
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ListViewMaui", "ListViewMaui\ListViewMaui.csproj", "{F3CCB63E-50CA-4002-B08A-0AC70115AC49}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|Any CPU = Debug|Any CPU
11+
Release|Any CPU = Release|Any CPU
12+
EndGlobalSection
13+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14+
{F3CCB63E-50CA-4002-B08A-0AC70115AC49}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{F3CCB63E-50CA-4002-B08A-0AC70115AC49}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{F3CCB63E-50CA-4002-B08A-0AC70115AC49}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
17+
{F3CCB63E-50CA-4002-B08A-0AC70115AC49}.Release|Any CPU.ActiveCfg = Release|Any CPU
18+
{F3CCB63E-50CA-4002-B08A-0AC70115AC49}.Release|Any CPU.Build.0 = Release|Any CPU
19+
{F3CCB63E-50CA-4002-B08A-0AC70115AC49}.Release|Any CPU.Deploy.0 = Release|Any CPU
20+
EndGlobalSection
21+
GlobalSection(SolutionProperties) = preSolution
22+
HideSolutionNode = FALSE
23+
EndGlobalSection
24+
GlobalSection(ExtensibilityGlobals) = postSolution
25+
SolutionGuid = {61F7FB11-1E47-470C-91E2-47F8143E1572}
26+
EndGlobalSection
27+
EndGlobal

ListViewMaui/App.xaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version = "1.0" encoding = "UTF-8" ?>
2+
<Application xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
3+
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
4+
xmlns:local="clr-namespace:ListViewMaui"
5+
x:Class="ListViewMaui.App">
6+
<Application.Resources>
7+
<ResourceDictionary>
8+
<ResourceDictionary.MergedDictionaries>
9+
<ResourceDictionary Source="Resources/Styles/Colors.xaml" />
10+
<ResourceDictionary Source="Resources/Styles/Styles.xaml" />
11+
</ResourceDictionary.MergedDictionaries>
12+
</ResourceDictionary>
13+
</Application.Resources>
14+
</Application>

ListViewMaui/App.xaml.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
namespace ListViewMaui;
2+
3+
public partial class App : Application
4+
{
5+
public App()
6+
{
7+
InitializeComponent();
8+
9+
MainPage = new HorizontalOrientation();
10+
}
11+
}

ListViewMaui/AppShell.xaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="UTF-8" ?>
2+
<Shell
3+
x:Class="ListViewMaui.AppShell"
4+
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
5+
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
6+
xmlns:local="clr-namespace:ListViewMaui"
7+
Shell.FlyoutBehavior="Disabled">
8+
9+
<ShellContent
10+
Title="Home"
11+
ContentTemplate="{DataTemplate local:MainPage}"
12+
Route="MainPage" />
13+
14+
</Shell>

ListViewMaui/AppShell.xaml.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
namespace ListViewMaui;
2+
3+
public partial class AppShell : Shell
4+
{
5+
public AppShell()
6+
{
7+
InitializeComponent();
8+
}
9+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Globalization;
4+
using System.Linq;
5+
using System.Text;
6+
using System.Threading.Tasks;
7+
8+
namespace ListViewMaui
9+
{
10+
#region BorderStrokeConverter
11+
public class BorderStrokeConverter : IValueConverter
12+
{
13+
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
14+
{
15+
return (bool)value ? Color.FromArgb("#1899EF") : Color.FromArgb("#FFFDFD");
16+
}
17+
18+
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
19+
{
20+
throw new NotImplementedException();
21+
}
22+
}
23+
#endregion
24+
}

ListViewMaui/Helper/Converter.cs

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Globalization;
4+
using System.Linq;
5+
using System.Text;
6+
using System.Threading.Tasks;
7+
8+
namespace ListViewMaui
9+
{
10+
public class BorderColorConverter : IValueConverter
11+
{
12+
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
13+
{
14+
var isSelected = (bool)value;
15+
if(isSelected)
16+
{
17+
return Color.FromArgb("#1899EF");
18+
}
19+
else
20+
{
21+
return Color.FromArgb("#FFFDFD");
22+
}
23+
}
24+
25+
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
26+
{
27+
throw new NotImplementedException();
28+
}
29+
}
30+
31+
}

ListViewMaui/Images/place.png

421 KB

ListViewMaui/Images/place101.jpg

80.3 KB

ListViewMaui/Images/place102.jpg

181 KB

0 commit comments

Comments
 (0)