Skip to content

Commit cf965e6

Browse files
committed
new examples added
1 parent 04c2c08 commit cf965e6

File tree

415 files changed

+12450
-27
lines changed

Some content is hidden

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

415 files changed

+12450
-27
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<TargetFrameworks>net7.0-android;net7.0-ios</TargetFrameworks>
5+
<OutputType>Exe</OutputType>
6+
<UseMaui>true</UseMaui>
7+
<ImplicitUsings>enable</ImplicitUsings>
8+
<SingleProject>true</SingleProject>
9+
<RootNamespace>AdvancedColumnLayout</RootNamespace>
10+
11+
<!-- Display name -->
12+
<ApplicationTitle>AdvancedColumnLayout</ApplicationTitle>
13+
14+
<!-- App Identifier -->
15+
<ApplicationId>com.companyname.AdvancedColumnLayout</ApplicationId>
16+
<ApplicationIdGuid>2590F31D-61D7-45FF-B883-93A093D7F459</ApplicationIdGuid>
17+
<!-- Versions -->
18+
<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
19+
<ApplicationVersion>1</ApplicationVersion>
20+
21+
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">14.2</SupportedOSPlatformVersion>
22+
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">21.0</SupportedOSPlatformVersion>
23+
</PropertyGroup>
24+
<ItemGroup>
25+
<!-- App Icon -->
26+
<MauiImage Include="Resources\appicon.svg" IsAppIcon="true" ForegroundFile="Resources\splashscreen.svg" Color="#FFFFFF" />
27+
28+
<!-- Splash Screen -->
29+
<MauiSplashScreen Include="Resources\splashscreen.svg" Color="#5B27D9" />
30+
31+
<!-- Images -->
32+
<MauiImage Include="Resources\Images\*" />
33+
34+
<!-- Custom Fonts -->
35+
<MauiFont Include="Resources\Fonts\*" />
36+
</ItemGroup>
37+
<ItemGroup>
38+
<None Remove="Employees.json" />
39+
</ItemGroup>
40+
<ItemGroup>
41+
<EmbeddedResource Include="Employees.json">
42+
<LogicalName>employees</LogicalName>
43+
</EmbeddedResource>
44+
45+
</ItemGroup>
46+
47+
48+
<ItemGroup>
49+
<PackageReference Include="DevExpress.Maui.Core" Version="22.2.*" />
50+
<PackageReference Include="DevExpress.Maui.DataGrid" Version="22.2.*" />
51+
<PackageReference Include="DevExpress.Data" Version="22.2.*" />
52+
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
53+
</ItemGroup>
54+
<PropertyGroup>
55+
<UseInterpreter Condition="$(TargetFramework.Contains('-ios'))">True</UseInterpreter>
56+
<UseInterpreter Condition="$(TargetFramework.Contains('-android'))">False</UseInterpreter>
57+
<RuntimeIdentifiers Condition="$(TargetFramework.Contains('-android'))">android-arm;android-arm64;android-x86;android-x64</RuntimeIdentifiers>
58+
</PropertyGroup>
59+
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net7.0-ios|AnyCPU'">
60+
<CreatePackage>false</CreatePackage>
61+
</PropertyGroup>
62+
</Project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 16
4+
VisualStudioVersion = 25.0.1705.0
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AdvancedColumnLayout", "AdvancedColumnLayout.csproj", "{82427B4E-D70D-48CE-B9D7-578E7A5F9E25}"
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+
{82427B4E-D70D-48CE-B9D7-578E7A5F9E25}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{82427B4E-D70D-48CE-B9D7-578E7A5F9E25}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{82427B4E-D70D-48CE-B9D7-578E7A5F9E25}.Release|Any CPU.ActiveCfg = Release|Any CPU
17+
{82427B4E-D70D-48CE-B9D7-578E7A5F9E25}.Release|Any CPU.Build.0 = Release|Any CPU
18+
EndGlobalSection
19+
GlobalSection(SolutionProperties) = preSolution
20+
HideSolutionNode = FALSE
21+
EndGlobalSection
22+
GlobalSection(ExtensibilityGlobals) = postSolution
23+
SolutionGuid = {A6DF5741-ACBE-44A8-81FB-36ED434C1208}
24+
EndGlobalSection
25+
EndGlobal

CS/AdvancedColumnLayout/App.xaml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<Application xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
2+
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
3+
xmlns:windows="clr-namespace:Microsoft.Maui.Controls.PlatformConfiguration.WindowsSpecific;assembly=Microsoft.Maui.Controls"
4+
xmlns:local="clr-namespace:AdvancedColumnLayout"
5+
x:Class="AdvancedColumnLayout.App"
6+
windows:Application.ImageDirectory="Assets">
7+
<Application.Resources>
8+
<ResourceDictionary>
9+
10+
<Color x:Key="Primary">#512BD4</Color>
11+
<Color x:Key="PrimaryLight">#deedff</Color>
12+
<Color x:Key="NormalText">#55575c</Color>
13+
<Color x:Key="NormalHeaderText">#404144</Color>
14+
<Color x:Key="NormalLightText">#959aa0</Color>
15+
<Color x:Key="DrawerTitleTextColor">White</Color>
16+
<Style TargetType="NavigationPage">
17+
<Setter Property="BarBackgroundColor" Value="{StaticResource Primary}"/>
18+
<Setter Property="BarTextColor" Value="{StaticResource DrawerTitleTextColor}"/>
19+
</Style>
20+
<Style x:Key="PrimaryButton" TargetType="Button">
21+
<Setter Property="BackgroundColor" Value="{StaticResource Primary}"/>
22+
<Setter Property="TextColor" Value="White"/>
23+
</Style>
24+
25+
</ResourceDictionary>
26+
</Application.Resources>
27+
</Application>

CS/AdvancedColumnLayout/App.xaml.cs

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
namespace AdvancedColumnLayout {
2+
public partial class App : Application {
3+
public App() {
4+
InitializeComponent();
5+
6+
MainPage = new MainPage();
7+
}
8+
}
9+
}

CS/AdvancedColumnLayout/Employees.json

+441
Large diffs are not rendered by default.

CS/AdvancedColumnLayout/MainPage.xaml

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
2+
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
3+
xmlns:dxg="clr-namespace:DevExpress.Maui.DataGrid;assembly=DevExpress.Maui.DataGrid"
4+
xmlns:ios="clr-namespace:Microsoft.Maui.Controls.PlatformConfiguration.iOSSpecific;assembly=Microsoft.Maui.Controls"
5+
ios:Page.UseSafeArea="true"
6+
x:Class="AdvancedColumnLayout.MainPage">
7+
<dxg:DataGridView ItemsSource="{Binding Employees}">
8+
<dxg:DataGridView.AdvancedColumnLayout>
9+
<dxg:AdvancedColumnLayout>
10+
<dxg:AdvancedColumnLayout.ColumnDefinitions>
11+
<ColumnDefinition Width="100"/>
12+
<ColumnDefinition Width="6*"/>
13+
<ColumnDefinition Width="7*"/>
14+
<ColumnDefinition Width="6*"/>
15+
<ColumnDefinition Width="9*"/>
16+
</dxg:AdvancedColumnLayout.ColumnDefinitions>
17+
<dxg:AdvancedColumnLayout.RowDefinitions>
18+
<RowDefinition Height="Auto"/>
19+
<RowDefinition Height="Auto"/>
20+
<RowDefinition Height="Auto"/>
21+
<RowDefinition Height="Auto"/>
22+
</dxg:AdvancedColumnLayout.RowDefinitions>
23+
</dxg:AdvancedColumnLayout>
24+
</dxg:DataGridView.AdvancedColumnLayout>
25+
26+
<dxg:ImageColumn FieldName="Image" Caption="Photo" RowSpan="3"/>
27+
28+
<dxg:TextColumn FieldName="FullName" Column="1" ColumnSpan="2"/>
29+
<dxg:TextColumn FieldName="Phone" Column="3" ColumnSpan="2"/>
30+
31+
<dxg:TextColumn FieldName="JobTitle" Row="1" Column="1" ColumnSpan="4"/>
32+
33+
<dxg:DateColumn FieldName="BirthDate" Row="2" Column="1" ColumnSpan="2"/>
34+
<dxg:DateColumn FieldName="HireDate" Row="2" Column="3" ColumnSpan="2"/>
35+
36+
<dxg:TextColumn FieldName="AddressLine1" Caption="Address" Row="3" ColumnSpan="2"/>
37+
<dxg:TextColumn FieldName="City" Row="3" Column="2"/>
38+
<dxg:TextColumn FieldName="PostalCode" Caption="Code" Row="3" Column="3"/>
39+
<dxg:TextColumn FieldName="CountryRegionName" Caption="Country" Row="3" Column="4"/>
40+
41+
</dxg:DataGridView>
42+
</ContentPage>
+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+

2+
namespace AdvancedColumnLayout {
3+
public partial class MainPage : ContentPage {
4+
public MainPage() {
5+
InitializeComponent();
6+
BindingContext = new EmployeesRepository();
7+
}
8+
}
9+
}
+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
using DevExpress.Maui;
2+
using Microsoft.Maui;
3+
using Microsoft.Maui.Controls.Compatibility;
4+
using Microsoft.Maui.Controls.Compatibility.Hosting;
5+
using Microsoft.Maui.Controls.Hosting;
6+
using Microsoft.Maui.Hosting;
7+
8+
namespace AdvancedColumnLayout {
9+
public static class MauiProgram {
10+
public static MauiApp CreateMauiApp() {
11+
var builder = MauiApp.CreateBuilder();
12+
builder
13+
.UseMauiApp<App>()
14+
.UseDevExpress()
15+
.ConfigureFonts(fonts => {
16+
fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
17+
fonts.AddFont("univia-pro-regular.ttf", "Univia-Pro");
18+
fonts.AddFont("roboto-bold.ttf", "Roboto-Bold");
19+
fonts.AddFont("roboto-regular.ttf", "Roboto");
20+
})
21+
.UseMauiCompatibility();
22+
23+
return builder.Build();
24+
}
25+
}
26+
}

CS/AdvancedColumnLayout/Model.cs

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+

2+
namespace AdvancedColumnLayout {
3+
public class Employee {
4+
public int Id { get; set; }
5+
public int ParentId { get; set; }
6+
public string FirstName { get; set; }
7+
public string LastName { get; set; }
8+
public string JobTitle { get; set; }
9+
public string Phone { get; set; }
10+
public string EmailAddress { get; set; }
11+
public string AddressLine1 { get; set; }
12+
public string City { get; set; }
13+
public string PostalCode { get; set; }
14+
public string CountryRegionName { get; set; }
15+
public string GroupName { get; set; }
16+
public DateTime BirthDate { get; set; }
17+
public DateTime HireDate { get; set; }
18+
public string Gender { get; set; }
19+
public string MaritalStatus { get; set; }
20+
public string ImageData { get; set; }
21+
public string FullName {
22+
get {
23+
return FirstName + " " + LastName;
24+
}
25+
}
26+
public ImageSource Image {
27+
get {
28+
byte[] bytes = Convert.FromBase64String(ImageData);
29+
MemoryStream ms = new MemoryStream(bytes);
30+
return ImageSource.FromStream(() => ms);
31+
}
32+
}
33+
}
34+
}
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>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
using Android.App;
2+
using Android.Content.PM;
3+
using Android.OS;
4+
5+
namespace AdvancedColumnLayout {
6+
[Activity(Theme = "@style/Maui.SplashTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize)]
7+
public class MainActivity : MauiAppCompatActivity {
8+
protected override void OnCreate(Bundle savedInstanceState) {
9+
base.OnCreate(savedInstanceState);
10+
Platform.Init(this, savedInstanceState);
11+
}
12+
13+
protected override void OnResume() {
14+
base.OnResume();
15+
16+
Platform.OnResume(this);
17+
}
18+
19+
protected override void OnNewIntent(Android.Content.Intent intent) {
20+
base.OnNewIntent(intent);
21+
22+
Platform.OnNewIntent(intent);
23+
}
24+
25+
public override void OnRequestPermissionsResult(int requestCode, string[] permissions, Permission[] grantResults) {
26+
Platform.OnRequestPermissionsResult(requestCode, permissions, grantResults);
27+
28+
base.OnRequestPermissionsResult(requestCode, permissions, grantResults);
29+
}
30+
}
31+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
using Android.App;
2+
using Android.Runtime;
3+
4+
namespace AdvancedColumnLayout {
5+
[Application]
6+
public class MainApplication : MauiApplication {
7+
public MainApplication(IntPtr handle, JniHandleOwnership ownership)
8+
: base(handle, ownership) {
9+
}
10+
11+
protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
12+
}
13+
}
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>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<resources>
3+
<!-- Base application theme. -->
4+
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
5+
<!-- Customize your theme here. -->
6+
<item name="colorPrimary">@color/colorPrimary</item>
7+
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
8+
<item name="colorAccent">@color/colorAccent</item>
9+
</style>
10+
<style name="AppTheme.NoActionBar">
11+
<item name="windowActionBar">false</item>
12+
<item name="windowNoTitle">true</item>
13+
</style>
14+
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
15+
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
16+
</resources>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
using Foundation;
2+
3+
namespace AdvancedColumnLayout {
4+
[Register("AppDelegate")]
5+
public class AppDelegate : MauiUIApplicationDelegate {
6+
protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
7+
}
8+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>LSRequiresIPhoneOS</key>
6+
<true/>
7+
<key>UIDeviceFamily</key>
8+
<array>
9+
<integer>1</integer>
10+
<integer>2</integer>
11+
</array>
12+
<key>UIRequiredDeviceCapabilities</key>
13+
<array>
14+
<string>arm64</string>
15+
</array>
16+
<key>UISupportedInterfaceOrientations</key>
17+
<array>
18+
<string>UIInterfaceOrientationPortrait</string>
19+
<string>UIInterfaceOrientationLandscapeLeft</string>
20+
<string>UIInterfaceOrientationLandscapeRight</string>
21+
</array>
22+
<key>UISupportedInterfaceOrientations~ipad</key>
23+
<array>
24+
<string>UIInterfaceOrientationPortrait</string>
25+
<string>UIInterfaceOrientationPortraitUpsideDown</string>
26+
<string>UIInterfaceOrientationLandscapeLeft</string>
27+
<string>UIInterfaceOrientationLandscapeRight</string>
28+
</array>
29+
<key>XSAppIconAssets</key>
30+
<string>Assets.xcassets/appicon.appiconset</string>
31+
</dict>
32+
</plist>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
using ObjCRuntime;
2+
using UIKit;
3+
4+
namespace AdvancedColumnLayout {
5+
public class Program {
6+
// This is the main entry point of the application.
7+
static void Main(string[] args) {
8+
// if you want to use a different Application Delegate class from "AppDelegate"
9+
// you can specify it here.
10+
UIApplication.Main(args, null, typeof(AppDelegate));
11+
}
12+
}
13+
}

0 commit comments

Comments
 (0)