Skip to content

Commit cd1f7de

Browse files
committedDec 5, 2023
Added sample for SfTabView
1 parent e3b9a1a commit cd1f7de

39 files changed

+1224
-0
lines changed
 

‎SfTabviewSample/App.xaml

+14
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:SfTabviewSample"
5+
x:Class="SfTabviewSample.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>

‎SfTabviewSample/App.xaml.cs

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

‎SfTabviewSample/AppShell.xaml

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?xml version="1.0" encoding="UTF-8" ?>
2+
<Shell
3+
x:Class="SfTabviewSample.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:SfTabviewSample"
7+
Shell.FlyoutBehavior="Disabled"
8+
Title="SfTabviewSample">
9+
10+
<ShellContent
11+
Title="Home"
12+
ContentTemplate="{DataTemplate local:MainPage}"
13+
Route="MainPage" />
14+
15+
</Shell>

‎SfTabviewSample/AppShell.xaml.cs

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
namespace SfTabviewSample {
2+
public partial class AppShell : Shell {
3+
public AppShell() {
4+
InitializeComponent();
5+
}
6+
}
7+
}

‎SfTabviewSample/MainPage.xaml

+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
3+
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
4+
x:Class="SfTabviewSample.MainPage"
5+
xmlns:core="clr-namespace:Syncfusion.Maui.Core;assembly=Syncfusion.Maui.Core"
6+
xmlns:local="clr-namespace:SfTabviewSample"
7+
xmlns:tabView="clr-namespace:Syncfusion.Maui.TabView;assembly=Syncfusion.Maui.TabView">
8+
9+
10+
<ContentPage.BindingContext>
11+
<local:ViewModel />
12+
</ContentPage.BindingContext>
13+
14+
<ContentPage.Content>
15+
<Grid>
16+
<Grid.RowDefinitions>
17+
<RowDefinition Height="0.1*"/>
18+
<RowDefinition Height="0.9*"/>
19+
</Grid.RowDefinitions>
20+
<Grid Grid.Row="0">
21+
<Grid.ColumnDefinitions>
22+
<ColumnDefinition Width="*"/>
23+
<ColumnDefinition Width="*"/>
24+
<ColumnDefinition Width="*"/>
25+
</Grid.ColumnDefinitions>
26+
<Button Text="Add TabItem" Grid.Column="0" x:Name="Additem" Clicked="Additem_Clicked"/>
27+
<Button Text="Remove TabItem" Grid.Column="1" x:Name="Removeitem" Clicked="Removeitem_Clicked"/>
28+
<Button Text="Insert TabItem" Grid.Column="2" x:Name="Insertitem" Clicked="Insertitem_Clicked"/>
29+
</Grid>
30+
<StackLayout Grid.Row="1">
31+
<tabView:SfTabView x:Name="tabView" VerticalOptions="FillAndExpand">
32+
<tabView:SfTabItem Header="Contacts">
33+
<tabView:SfTabItem.Content>
34+
<ListView Margin="0,20,0,0" RowHeight="70" x:Name="listView" ItemsSource="{Binding ContactList}">
35+
<ListView.ItemTemplate>
36+
<DataTemplate>
37+
<ViewCell>
38+
<StackLayout Orientation="Vertical" Margin="30,0,0,0">
39+
<Label Text="{Binding Name}" FontSize="24" />
40+
<Label Text="{Binding Number}" FontSize="20" TextColor="LightSlateGray" />
41+
</StackLayout>
42+
</ViewCell>
43+
</DataTemplate>
44+
</ListView.ItemTemplate>
45+
</ListView>
46+
</tabView:SfTabItem.Content>
47+
</tabView:SfTabItem>
48+
<tabView:SfTabItem Header="Calls">
49+
<tabView:SfTabItem.Content>
50+
<StackLayout BackgroundColor="LightGray" x:Name="AllCallsGrid">
51+
</StackLayout>
52+
</tabView:SfTabItem.Content>
53+
</tabView:SfTabItem>
54+
<tabView:SfTabItem Header="Favorites">
55+
<tabView:SfTabItem.Content>
56+
<Grid BackgroundColor="LightGreen" x:Name="FavoritesGrid" />
57+
</tabView:SfTabItem.Content>
58+
</tabView:SfTabItem>
59+
</tabView:SfTabView>
60+
</StackLayout>
61+
</Grid>
62+
</ContentPage.Content>
63+
</ContentPage>

‎SfTabviewSample/MainPage.xaml.cs

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
using Syncfusion.Maui.TabView;
2+
using System.Collections.ObjectModel;
3+
using System.ComponentModel;
4+
5+
namespace SfTabviewSample
6+
{
7+
public partial class MainPage : ContentPage {
8+
9+
ViewModel model;
10+
11+
public MainPage() {
12+
InitializeComponent();
13+
model = new ViewModel();
14+
this.BindingContext = model;
15+
model.IsSelected = true;
16+
}
17+
private void Additem_Clicked(object sender, EventArgs e)
18+
{
19+
SfTabItem tabitem = new SfTabItem();
20+
tabitem.Header = "New Item Added";
21+
StackLayout stacklayout = new StackLayout();
22+
stacklayout.BackgroundColor = Colors.LightBlue;
23+
tabitem.Content = stacklayout;
24+
tabView.Items.Add(tabitem);
25+
}
26+
27+
private void Insertitem_Clicked(object sender, EventArgs e)
28+
{
29+
SfTabItem insertitem = new SfTabItem();
30+
insertitem.Header = "New Item Inserted";
31+
StackLayout stacklayout1 = new StackLayout();
32+
stacklayout1.BackgroundColor = Colors.PaleGreen;
33+
insertitem.Content = stacklayout1;
34+
if (tabView.Items.Count > 0)
35+
tabView.Items.Insert(1, insertitem);
36+
else
37+
tabView.Items.Insert(0, insertitem);
38+
}
39+
40+
private void Removeitem_Clicked(object sender, EventArgs e)
41+
{
42+
if (model.IsSelected && tabView.Items.Count > 0)
43+
{
44+
var s = tabView.SelectedIndex;
45+
tabView.Items.RemoveAt((int)s);
46+
}
47+
}
48+
49+
}
50+
51+
}
52+

‎SfTabviewSample/MauiProgram.cs

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
using Microsoft.Extensions.Logging;
2+
using Syncfusion.Maui.Core.Hosting;
3+
4+
namespace SfTabviewSample {
5+
public static class MauiProgram {
6+
public static MauiApp CreateMauiApp() {
7+
var builder = MauiApp.CreateBuilder();
8+
builder
9+
.UseMauiApp<App>()
10+
.ConfigureSyncfusionCore()
11+
.ConfigureFonts(fonts => {
12+
fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
13+
fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");
14+
});
15+
16+
#if DEBUG
17+
builder.Logging.AddDebug();
18+
#endif
19+
20+
return builder.Build();
21+
}
22+
}
23+
}
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+
<application android:allowBackup="true" android:icon="@mipmap/appicon" android:roundIcon="@mipmap/appicon_round" android:supportsRtl="true"></application>
4+
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
5+
<uses-permission android:name="android.permission.INTERNET" />
6+
</manifest>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
using Android.App;
2+
using Android.Content.PM;
3+
using Android.OS;
4+
5+
namespace SfTabviewSample {
6+
[Activity(Theme = "@style/Maui.SplashTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize | ConfigChanges.Density)]
7+
public class MainActivity : MauiAppCompatActivity {
8+
}
9+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
using Android.App;
2+
using Android.Runtime;
3+
4+
namespace SfTabviewSample {
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,8 @@
1+
using Foundation;
2+
3+
namespace SfTabviewSample {
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,11 @@
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+
<!-- Enable this value to use browser developer tools while debugging.-->
6+
<!-- See https://aka.ms/blazor-hybrid-developer-tools -->
7+
<key>com.apple.security.get-task-allow</key>
8+
<true/>
9+
</dict>
10+
</plist>
11+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
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+
<!-- See https://aka.ms/maui-publish-app-store#add-entitlements for more information about adding entitlements.-->
5+
<dict>
6+
<key>com.apple.security.app-sandbox</key>
7+
<true/>
8+
<key>com.apple.security.network.client</key>
9+
<true/>
10+
</dict>
11+
</plist>
12+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
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+
<!-- The Mac App Store requires you specify if the app uses encryption. -->
6+
<!-- Please consult https://developer.apple.com/documentation/bundleresources/information_property_list/itsappusesnonexemptencryption -->
7+
<!-- <key>ITSAppUsesNonExemptEncryption</key> -->
8+
<!-- Please indicate <true/> or <false/> here. -->
9+
10+
<!-- Specify the category for your app here. -->
11+
<!-- Please consult https://developer.apple.com/documentation/bundleresources/information_property_list/lsapplicationcategorytype -->
12+
<!-- <key>LSApplicationCategoryType</key> -->
13+
<!-- <string>public.app-category.YOUR-CATEGORY-HERE</string> -->
14+
<key>UIDeviceFamily</key>
15+
<array>
16+
<integer>2</integer>
17+
</array>
18+
<key>UIRequiredDeviceCapabilities</key>
19+
<array>
20+
<string>arm64</string>
21+
</array>
22+
<key>UISupportedInterfaceOrientations</key>
23+
<array>
24+
<string>UIInterfaceOrientationPortrait</string>
25+
<string>UIInterfaceOrientationLandscapeLeft</string>
26+
<string>UIInterfaceOrientationLandscapeRight</string>
27+
</array>
28+
<key>UISupportedInterfaceOrientations~ipad</key>
29+
<array>
30+
<string>UIInterfaceOrientationPortrait</string>
31+
<string>UIInterfaceOrientationPortraitUpsideDown</string>
32+
<string>UIInterfaceOrientationLandscapeLeft</string>
33+
<string>UIInterfaceOrientationLandscapeRight</string>
34+
</array>
35+
<key>XSAppIconAssets</key>
36+
<string>Assets.xcassets/appicon.appiconset</string>
37+
</dict>
38+
</plist>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
using ObjCRuntime;
2+
using UIKit;
3+
4+
namespace SfTabviewSample {
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+
}
+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
using Microsoft.Maui;
2+
using Microsoft.Maui.Hosting;
3+
using System;
4+
5+
namespace SfTabviewSample {
6+
internal class Program : MauiApplication {
7+
protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
8+
9+
static void Main(string[] args) {
10+
var app = new Program();
11+
app.Run(args);
12+
}
13+
}
14+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest package="maui-application-id-placeholder" version="0.0.0" api-version="7" xmlns="http://tizen.org/ns/packages">
3+
<profile name="common" />
4+
<ui-application appid="maui-application-id-placeholder" exec="SfTabviewSample.dll" multiple="false" nodisplay="false" taskmanage="true" type="dotnet" launch_mode="single">
5+
<label>maui-application-title-placeholder</label>
6+
<icon>maui-appicon-placeholder</icon>
7+
<metadata key="http://tizen.org/metadata/prefer_dotnet_aot" value="true" />
8+
</ui-application>
9+
<shortcut-list />
10+
<privileges>
11+
<privilege>http://tizen.org/privilege/internet</privilege>
12+
</privileges>
13+
<dependencies />
14+
<provides-appdefined-privileges />
15+
</manifest>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<maui:MauiWinUIApplication
2+
x:Class="SfTabviewSample.WinUI.App"
3+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
4+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
5+
xmlns:maui="using:Microsoft.Maui"
6+
xmlns:local="using:SfTabviewSample.WinUI">
7+
8+
</maui:MauiWinUIApplication>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
using Microsoft.UI.Xaml;
2+
3+
// To learn more about WinUI, the WinUI project structure,
4+
// and more about our project templates, see: http://aka.ms/winui-project-info.
5+
6+
namespace SfTabviewSample.WinUI {
7+
/// <summary>
8+
/// Provides application-specific behavior to supplement the default Application class.
9+
/// </summary>
10+
public partial class App : MauiWinUIApplication {
11+
/// <summary>
12+
/// Initializes the singleton application object. This is the first line of authored code
13+
/// executed, and as such is the logical equivalent of main() or WinMain().
14+
/// </summary>
15+
public App() {
16+
this.InitializeComponent();
17+
}
18+
19+
protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
20+
}
21+
22+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Package
3+
xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
4+
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
5+
xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest"
6+
xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
7+
IgnorableNamespaces="uap rescap">
8+
9+
<Identity Name="maui-package-name-placeholder" Publisher="CN=User Name" Version="0.0.0.0" />
10+
11+
<mp:PhoneIdentity PhoneProductId="2926B301-B464-479F-8CD1-31623863A9B3" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>
12+
13+
<Properties>
14+
<DisplayName>$placeholder$</DisplayName>
15+
<PublisherDisplayName>User Name</PublisherDisplayName>
16+
<Logo>$placeholder$.png</Logo>
17+
</Properties>
18+
19+
<Dependencies>
20+
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.17763.0" MaxVersionTested="10.0.19041.0" />
21+
<TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.17763.0" MaxVersionTested="10.0.19041.0" />
22+
</Dependencies>
23+
24+
<Resources>
25+
<Resource Language="x-generate" />
26+
</Resources>
27+
28+
<Applications>
29+
<Application Id="App" Executable="$targetnametoken$.exe" EntryPoint="$targetentrypoint$">
30+
<uap:VisualElements
31+
DisplayName="$placeholder$"
32+
Description="$placeholder$"
33+
Square150x150Logo="$placeholder$.png"
34+
Square44x44Logo="$placeholder$.png"
35+
BackgroundColor="transparent">
36+
<uap:DefaultTile Square71x71Logo="$placeholder$.png" Wide310x150Logo="$placeholder$.png" Square310x310Logo="$placeholder$.png" />
37+
<uap:SplashScreen Image="$placeholder$.png" />
38+
</uap:VisualElements>
39+
</Application>
40+
</Applications>
41+
42+
<Capabilities>
43+
<rescap:Capability Name="runFullTrust" />
44+
</Capabilities>
45+
46+
</Package>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
3+
<assemblyIdentity version="1.0.0.0" name="SfTabviewSample.WinUI.app"/>
4+
5+
<application xmlns="urn:schemas-microsoft-com:asm.v3">
6+
<windowsSettings>
7+
<!-- The combination of below two tags have the following effect:
8+
1) Per-Monitor for >= Windows 10 Anniversary Update
9+
2) System < Windows 10 Anniversary Update
10+
-->
11+
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true/PM</dpiAware>
12+
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitorV2, PerMonitor</dpiAwareness>
13+
</windowsSettings>
14+
</application>
15+
</assembly>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
using Foundation;
2+
3+
namespace SfTabviewSample {
4+
[Register("AppDelegate")]
5+
public class AppDelegate : MauiUIApplicationDelegate {
6+
protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
7+
}
8+
}
+32
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>
+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
using ObjCRuntime;
2+
using UIKit;
3+
4+
namespace SfTabviewSample {
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+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"profiles": {
3+
"Windows Machine": {
4+
"commandName": "MsixPackage",
5+
"nativeDebugging": false
6+
}
7+
}
8+
}
Loading
Loading
Binary file not shown.
Binary file not shown.
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Any raw assets you want to be deployed with your application can be placed in
2+
this directory (and child directories). Deployment of the asset to your application
3+
is automatically handled by the following `MauiAsset` Build Action within your `.csproj`.
4+
5+
<MauiAsset Include="Resources\Raw\**" LogicalName="%(RecursiveDir)%(Filename)%(Extension)" />
6+
7+
These files will be deployed with you package and will be accessible using Essentials:
8+
9+
async Task LoadMauiAsset()
10+
{
11+
using var stream = await FileSystem.OpenAppPackageFileAsync("AboutAssets.txt");
12+
using var reader = new StreamReader(stream);
13+
14+
var contents = reader.ReadToEnd();
15+
}
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
<?xml version="1.0" encoding="UTF-8" ?>
2+
<?xaml-comp compile="true" ?>
3+
<ResourceDictionary
4+
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
5+
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml">
6+
7+
<!-- Note: For Android please see also Platforms\Android\Resources\values\colors.xml -->
8+
9+
<Color x:Key="Primary">#512BD4</Color>
10+
<Color x:Key="Secondary">#DFD8F7</Color>
11+
<Color x:Key="Tertiary">#2B0B98</Color>
12+
<Color x:Key="White">White</Color>
13+
<Color x:Key="Black">Black</Color>
14+
<Color x:Key="Gray100">#E1E1E1</Color>
15+
<Color x:Key="Gray200">#C8C8C8</Color>
16+
<Color x:Key="Gray300">#ACACAC</Color>
17+
<Color x:Key="Gray400">#919191</Color>
18+
<Color x:Key="Gray500">#6E6E6E</Color>
19+
<Color x:Key="Gray600">#404040</Color>
20+
<Color x:Key="Gray900">#212121</Color>
21+
<Color x:Key="Gray950">#141414</Color>
22+
<SolidColorBrush x:Key="PrimaryBrush" Color="{StaticResource Primary}"/>
23+
<SolidColorBrush x:Key="SecondaryBrush" Color="{StaticResource Secondary}"/>
24+
<SolidColorBrush x:Key="TertiaryBrush" Color="{StaticResource Tertiary}"/>
25+
<SolidColorBrush x:Key="WhiteBrush" Color="{StaticResource White}"/>
26+
<SolidColorBrush x:Key="BlackBrush" Color="{StaticResource Black}"/>
27+
<SolidColorBrush x:Key="Gray100Brush" Color="{StaticResource Gray100}"/>
28+
<SolidColorBrush x:Key="Gray200Brush" Color="{StaticResource Gray200}"/>
29+
<SolidColorBrush x:Key="Gray300Brush" Color="{StaticResource Gray300}"/>
30+
<SolidColorBrush x:Key="Gray400Brush" Color="{StaticResource Gray400}"/>
31+
<SolidColorBrush x:Key="Gray500Brush" Color="{StaticResource Gray500}"/>
32+
<SolidColorBrush x:Key="Gray600Brush" Color="{StaticResource Gray600}"/>
33+
<SolidColorBrush x:Key="Gray900Brush" Color="{StaticResource Gray900}"/>
34+
<SolidColorBrush x:Key="Gray950Brush" Color="{StaticResource Gray950}"/>
35+
36+
<Color x:Key="Yellow100Accent">#F7B548</Color>
37+
<Color x:Key="Yellow200Accent">#FFD590</Color>
38+
<Color x:Key="Yellow300Accent">#FFE5B9</Color>
39+
<Color x:Key="Cyan100Accent">#28C2D1</Color>
40+
<Color x:Key="Cyan200Accent">#7BDDEF</Color>
41+
<Color x:Key="Cyan300Accent">#C3F2F4</Color>
42+
<Color x:Key="Blue100Accent">#3E8EED</Color>
43+
<Color x:Key="Blue200Accent">#72ACF1</Color>
44+
<Color x:Key="Blue300Accent">#A7CBF6</Color>
45+
46+
</ResourceDictionary>

‎SfTabviewSample/Resources/Styles/Styles.xaml

+408
Large diffs are not rendered by default.
+76
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<TargetFrameworks>net8.0-android;net8.0-ios;net8.0-maccatalyst</TargetFrameworks>
5+
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net8.0-windows10.0.19041.0</TargetFrameworks>
6+
<!-- Uncomment to also build the tizen app. You will need to install tizen by following this: https://github.com/Samsung/Tizen.NET -->
7+
<!-- <TargetFrameworks>$(TargetFrameworks);net8.0-tizen</TargetFrameworks> -->
8+
9+
<!-- Note for MacCatalyst:
10+
The default runtime is maccatalyst-x64, except in Release config, in which case the default is maccatalyst-x64;maccatalyst-arm64.
11+
When specifying both architectures, use the plural <RuntimeIdentifiers> instead of the singular <RuntimeIdentifer>.
12+
The Mac App Store will NOT accept apps with ONLY maccatalyst-arm64 indicated;
13+
either BOTH runtimes must be indicated or ONLY macatalyst-x64. -->
14+
<!-- For example: <RuntimeIdentifiers>maccatalyst-x64;maccatalyst-arm64</RuntimeIdentifiers> -->
15+
16+
<OutputType>Exe</OutputType>
17+
<RootNamespace>SfTabviewSample</RootNamespace>
18+
<UseMaui>true</UseMaui>
19+
<SingleProject>true</SingleProject>
20+
<ImplicitUsings>enable</ImplicitUsings>
21+
22+
<!-- Display name -->
23+
<ApplicationTitle>SfTabviewSample</ApplicationTitle>
24+
25+
<!-- App Identifier -->
26+
<ApplicationId>com.companyname.sftabviewsample</ApplicationId>
27+
28+
<!-- Versions -->
29+
<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
30+
<ApplicationVersion>1</ApplicationVersion>
31+
32+
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">11.0</SupportedOSPlatformVersion>
33+
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">13.1</SupportedOSPlatformVersion>
34+
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">21.0</SupportedOSPlatformVersion>
35+
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</SupportedOSPlatformVersion>
36+
<TargetPlatformMinVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</TargetPlatformMinVersion>
37+
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'tizen'">6.5</SupportedOSPlatformVersion>
38+
</PropertyGroup>
39+
40+
<ItemGroup>
41+
<!-- App Icon -->
42+
<MauiIcon Include="Resources\AppIcon\appicon.svg" ForegroundFile="Resources\AppIcon\appiconfg.svg" Color="#512BD4" />
43+
44+
<!-- Splash Screen -->
45+
<MauiSplashScreen Include="Resources\Splash\splash.svg" Color="#512BD4" BaseSize="128,128" />
46+
47+
<!-- Images -->
48+
<MauiImage Include="Resources\Images\*" />
49+
<MauiImage Update="Resources\Images\dotnet_bot.svg" BaseSize="168,208" />
50+
51+
<!-- Custom Fonts -->
52+
<MauiFont Include="Resources\Fonts\*" />
53+
54+
<!-- Raw Assets (also remove the "Resources\Raw" prefix) -->
55+
<MauiAsset Include="Resources\Raw\**" LogicalName="%(RecursiveDir)%(Filename)%(Extension)" />
56+
</ItemGroup>
57+
58+
<ItemGroup>
59+
<PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiVersion)" />
60+
<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="$(MauiVersion)" />
61+
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="8.0.0-rc.2.23479.6" />
62+
<PackageReference Include="Syncfusion.Maui.Core" Version="23.2.6" />
63+
<PackageReference Include="Syncfusion.Maui.TabView" Version="23.2.6" />
64+
</ItemGroup>
65+
66+
<!-- Build Properties must be defined within these property groups to ensure successful publishing
67+
to the Mac App Store. See: https://aka.ms/maui-publish-app-store#define-build-properties-in-your-project-file -->
68+
<PropertyGroup Condition="$(TargetFramework.Contains('-maccatalyst')) and '$(Configuration)' == 'Debug'">
69+
<CodesignEntitlements>Platforms/MacCatalyst/Entitlements.Debug.plist</CodesignEntitlements>
70+
</PropertyGroup>
71+
72+
<PropertyGroup Condition="$(TargetFramework.Contains('-maccatalyst')) and '$(Configuration)' == 'Release'">
73+
<CodesignEntitlements>Platforms/MacCatalyst/Entitlements.Release.plist</CodesignEntitlements>
74+
<UseHardenedRuntime>true</UseHardenedRuntime>
75+
</PropertyGroup>
76+
</Project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup>
4+
<IsFirstTimeProjectOpen>False</IsFirstTimeProjectOpen>
5+
<ActiveDebugFramework>net8.0-windows10.0.19041.0</ActiveDebugFramework>
6+
<ActiveDebugProfile>Windows Machine</ActiveDebugProfile>
7+
<SelectedPlatformGroup>Emulator</SelectedPlatformGroup>
8+
<DefaultDevice>pixel_5_-_api_34</DefaultDevice>
9+
</PropertyGroup>
10+
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net8.0-android|AnyCPU'">
11+
<DebuggerFlavor>ProjectDebugger</DebuggerFlavor>
12+
</PropertyGroup>
13+
<ItemGroup>
14+
<None Update="Platforms\Windows\Package.appxmanifest">
15+
<SubType>Designer</SubType>
16+
</None>
17+
</ItemGroup>
18+
</Project>

‎SfTabviewSample/SfTabviewSample.sln

+27
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.8.34212.112
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SfTabviewSample", "SfTabviewSample.csproj", "{4D13A604-493F-4D5B-8602-2585EBFEA07B}"
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+
{4D13A604-493F-4D5B-8602-2585EBFEA07B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{4D13A604-493F-4D5B-8602-2585EBFEA07B}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{4D13A604-493F-4D5B-8602-2585EBFEA07B}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
17+
{4D13A604-493F-4D5B-8602-2585EBFEA07B}.Release|Any CPU.ActiveCfg = Release|Any CPU
18+
{4D13A604-493F-4D5B-8602-2585EBFEA07B}.Release|Any CPU.Build.0 = Release|Any CPU
19+
{4D13A604-493F-4D5B-8602-2585EBFEA07B}.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 = {6FD456CA-E5ED-49A5-8F26-06056C500C3B}
26+
EndGlobalSection
27+
EndGlobal
+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
using System.Collections.ObjectModel;
2+
3+
namespace SfTabviewSample;
4+
5+
6+
public class ContactInfo {
7+
public string Name { get; set; }
8+
public long Number { get; set; }
9+
}
10+
public class ViewModel {
11+
public ObservableCollection<ContactInfo> contactlist;
12+
public ObservableCollection<ContactInfo> ContactList {
13+
get { return contactlist; }
14+
set { contactlist = value; }
15+
}
16+
17+
public bool IsSelected {
18+
get { return isSelected; }
19+
set { isSelected = value; }
20+
}
21+
22+
public bool isSelected { get; set; }
23+
24+
public ViewModel() {
25+
ContactList = new ObservableCollection<ContactInfo>();
26+
ContactList.Add(new ContactInfo { Name = "Aaron", Number = 7363750 });
27+
ContactList.Add(new ContactInfo { Name = "Adam", Number = 7323250 });
28+
ContactList.Add(new ContactInfo { Name = "Adrian", Number = 7239121 });
29+
ContactList.Add(new ContactInfo { Name = "Alwin", Number = 2329823 });
30+
ContactList.Add(new ContactInfo { Name = "Alex", Number = 8013481 });
31+
ContactList.Add(new ContactInfo { Name = "Alexander", Number = 7872329 });
32+
ContactList.Add(new ContactInfo { Name = "Barry", Number = 7317750 });
33+
ContactList.Add(new ContactInfo { Name = "Adrian", Number = 7239121 });
34+
ContactList.Add(new ContactInfo { Name = "Alwin", Number = 2329823 });
35+
ContactList.Add(new ContactInfo { Name = "Alex", Number = 8013481 });
36+
ContactList.Add(new ContactInfo { Name = "Alwin", Number = 2329823 });
37+
ContactList.Add(new ContactInfo { Name = "Alex", Number = 8013481 });
38+
ContactList.Add(new ContactInfo { Name = "Alexander", Number = 7872329 });
39+
ContactList.Add(new ContactInfo { Name = "Barry", Number = 7317750 });
40+
}
41+
}

0 commit comments

Comments
 (0)
Please sign in to comment.