Skip to content

Commit 433f1f5

Browse files
authored
Merge pull request #1 from Lakshminatarajan/sample
Sample added
2 parents c795cec + adbe0d9 commit 433f1f5

Some content is hidden

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

52 files changed

+1284
-2
lines changed

ListViewMaui/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", "{BB80D341-A1CA-467C-B555-AEFCDCD4F28C}"
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+
{BB80D341-A1CA-467C-B555-AEFCDCD4F28C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{BB80D341-A1CA-467C-B555-AEFCDCD4F28C}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{BB80D341-A1CA-467C-B555-AEFCDCD4F28C}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
17+
{BB80D341-A1CA-467C-B555-AEFCDCD4F28C}.Release|Any CPU.ActiveCfg = Release|Any CPU
18+
{BB80D341-A1CA-467C-B555-AEFCDCD4F28C}.Release|Any CPU.Build.0 = Release|Any CPU
19+
{BB80D341-A1CA-467C-B555-AEFCDCD4F28C}.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/ListViewMaui/App.xaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
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 Source="Resources/Styles.xaml" />
8+
</Application.Resources>
9+
</Application>
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 MainPage();
10+
}
11+
}
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<TargetFrameworks>net6.0-android;net6.0-ios;net6.0-maccatalyst</TargetFrameworks>
5+
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows')) and '$(MSBuildRuntimeType)' == 'Full'">$(TargetFrameworks);net6.0-windows10.0.19041</TargetFrameworks>
6+
<OutputType>Exe</OutputType>
7+
<RootNamespace>ListViewMaui</RootNamespace>
8+
<UseMaui>true</UseMaui>
9+
<SingleProject>true</SingleProject>
10+
<ImplicitUsings>enable</ImplicitUsings>
11+
12+
<!-- Display name -->
13+
<ApplicationTitle>ListViewMaui</ApplicationTitle>
14+
15+
<!-- App Identifier -->
16+
<ApplicationId>com.companyname.listviewmaui</ApplicationId>
17+
<ApplicationId Condition="$(TargetFramework.Contains('-windows'))">5884ABA5-1FD3-4BF1-B232-4CF1C2A53C2C</ApplicationId>
18+
19+
<!-- Versions -->
20+
<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
21+
<ApplicationVersion>1</ApplicationVersion>
22+
23+
<SupportedOSPlatformVersion Condition="'$(TargetFramework)' == 'net6.0-ios'">14.2</SupportedOSPlatformVersion>
24+
<SupportedOSPlatformVersion Condition="'$(TargetFramework)' == 'net6.0-maccatalyst'">14.0</SupportedOSPlatformVersion>
25+
<SupportedOSPlatformVersion Condition="'$(TargetFramework)' == 'net6.0-android'">21.0</SupportedOSPlatformVersion>
26+
<SupportedOSPlatformVersion Condition="$(TargetFramework.Contains('-windows'))">10.0.18362.0</SupportedOSPlatformVersion>
27+
<TargetPlatformMinVersion Condition="$(TargetFramework.Contains('-windows'))">10.0.18362.0</TargetPlatformMinVersion>
28+
</PropertyGroup>
29+
30+
<ItemGroup>
31+
<!-- App Icon -->
32+
<MauiIcon Include="Resources\appicon.svg" ForegroundFile="Resources\appiconfg.svg" Color="#512BD4" />
33+
34+
<!-- Splash Screen -->
35+
<MauiSplashScreen Include="Resources\appiconfg.svg" Color="#512BD4" BaseSize="128,128" />
36+
37+
<!-- Images -->
38+
<MauiImage Include="Resources\Images\*" />
39+
<MauiImage Update="Resources\Images\dotnet_bot.svg" BaseSize="168,208" />
40+
41+
<!-- Custom Fonts -->
42+
<MauiFont Include="Resources\Fonts\*" />
43+
44+
<!-- Raw Assets (also remove the "Resources\Raw" prefix) -->
45+
<MauiAsset Include="Resources\Raw\**" LogicalName="%(RecursiveDir)%(Filename)%(Extension)" />
46+
</ItemGroup>
47+
48+
<ItemGroup>
49+
<PackageReference Include="Syncfusion.Maui.ListView" Version="20.1.51-preview" />
50+
</ItemGroup>
51+
52+
</Project>
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
using Syncfusion.Maui.ListView.Hosting;
2+
3+
namespace ListViewMaui;
4+
5+
public static class MauiProgram
6+
{
7+
public static MauiApp CreateMauiApp()
8+
{
9+
var builder = MauiApp.CreateBuilder();
10+
builder
11+
.UseMauiApp<App>()
12+
.ConfigureFonts(fonts =>
13+
{
14+
fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
15+
fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");
16+
});
17+
18+
builder.ConfigureSyncfusionListView();
19+
return builder.Build();
20+
}
21+
}
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.ComponentModel;
4+
using System.Linq;
5+
using System.Text;
6+
using System.Threading.Tasks;
7+
8+
namespace ListViewMaui
9+
{
10+
#region Contacts
11+
public class Contacts : INotifyPropertyChanged
12+
{
13+
#region Fields
14+
15+
private string contactName;
16+
private string contactNumber;
17+
private ImageSource image;
18+
private int age;
19+
20+
#endregion
21+
22+
#region Constructor
23+
public Contacts(string name, string number)
24+
{
25+
contactName = name;
26+
contactNumber = number;
27+
}
28+
#endregion
29+
30+
#region Properties
31+
public string ContactName
32+
{
33+
get { return contactName; }
34+
set
35+
{
36+
if (contactName != value)
37+
{
38+
contactName = value;
39+
this.RaisedOnPropertyChanged("ContactName");
40+
}
41+
}
42+
}
43+
44+
public string ContactNumber
45+
{
46+
get { return contactNumber; }
47+
set
48+
{
49+
if (contactNumber != value)
50+
{
51+
contactNumber = value;
52+
this.RaisedOnPropertyChanged("ContactNumber");
53+
}
54+
}
55+
}
56+
57+
public ImageSource ContactImage
58+
{
59+
get { return this.image; }
60+
set
61+
{
62+
this.image = value;
63+
this.RaisedOnPropertyChanged("ContactImage");
64+
}
65+
}
66+
67+
public int Age
68+
{
69+
get { return age; }
70+
set
71+
{
72+
age = value;
73+
this.RaisedOnPropertyChanged("Age");
74+
}
75+
}
76+
#endregion
77+
78+
#region INotifyPropertyChanged Members
79+
80+
public event PropertyChangedEventHandler PropertyChanged;
81+
82+
public void RaisedOnPropertyChanged(string _PropertyName)
83+
{
84+
if (PropertyChanged != null)
85+
{
86+
PropertyChanged(this, new PropertyChangedEventArgs(_PropertyName));
87+
}
88+
}
89+
#endregion
90+
}
91+
92+
#endregion
93+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
3+
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="31" />
4+
<application android:allowBackup="true" android:icon="@mipmap/appicon" android:roundIcon="@mipmap/appicon_round" android:supportsRtl="true"></application>
5+
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
6+
</manifest>
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
using Android.App;
2+
using Android.Content.PM;
3+
using Android.OS;
4+
5+
namespace ListViewMaui;
6+
7+
[Activity(Theme = "@style/Maui.SplashTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize | ConfigChanges.Density)]
8+
public class MainActivity : MauiAppCompatActivity
9+
{
10+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
using Android.App;
2+
using Android.Runtime;
3+
4+
namespace ListViewMaui;
5+
6+
[Application]
7+
public class MainApplication : MauiApplication
8+
{
9+
public MainApplication(IntPtr handle, JniHandleOwnership ownership)
10+
: base(handle, ownership)
11+
{
12+
}
13+
14+
protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
15+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<resources>
3+
<color name="colorPrimary">#512BD4</color>
4+
<color name="colorPrimaryDark">#2B0B98</color>
5+
<color name="colorAccent">#2B0B98</color>
6+
</resources>

0 commit comments

Comments
 (0)