This commit is contained in:
SyncfusionBuild 2023-11-21 05:24:32 +00:00
Родитель bd8a94adb6
Коммит 72c6e91384
210 изменённых файлов: 2360 добавлений и 1564 удалений

Просмотреть файл

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?>
<SyncfusionControls>
<ControlCategory Name="Layouts">
<Control Title="Accordion" ControlName="SfAccordion" Image="accordion.png" Description="Provides a vertical, collapsible panel with stacked headers for simultaneous expansion or collapse of one or multiple items, revealing related content.">
<Control Title="Accordion" ControlName="SfAccordion" Image="accordion.png" Description="Vertical collapsible panel with stacked headers for simultaneous expansion or collapse of items.">
<Sample SearchTags="GettingStarted" SampleName="GettingStarted" Title="Getting Started" CodeViewerPath="Accordion/GettingStarted/" />
</Control>
</ControlCategory>

Просмотреть файл

@ -27,5 +27,24 @@ public partial class App : MauiWinUIApplication
}
protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
protected override void OnLaunched(LaunchActivatedEventArgs args)
{
base.OnLaunched(args);
if (IPlatformApplication.Current != null)
{
foreach (var item in IPlatformApplication.Current.Application.Windows)
{
var platformWindow = (item?.Handler?.PlatformView as Microsoft.UI.Xaml.Window);
if (platformWindow != null)
{
platformWindow.ExtendsContentIntoTitleBar = false;
platformWindow.Title = ".NET MAUI Accordion Demo";
}
}
}
}
}

Просмотреть файл

@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net6.0-android;net6.0-ios;net6.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net6.0-windows10.0.19041.0</TargetFrameworks>
<TargetFrameworks>net8.0-android;net8.0-ios;net8.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net8.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);net6.0-tizen</TargetFrameworks> -->
<OutputType>Exe</OutputType>
@ -54,6 +54,10 @@
<WarningLevel>5</WarningLevel>
</PropertyGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net8.0' OR '$(TargetFramework)' == 'net8.0-android' OR '$(TargetFramework)' == 'net8.0-ios' OR '$(TargetFramework)' == 'net8.0-maccatalyst' OR '$(TargetFramework)' == 'net8.0-windows10.0.19041.0' ">
<PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiVersion)" />
</ItemGroup>
<ItemGroup>
<!-- App Icon -->
<MauiIcon Include="Resources\AppIcon\appicon.svg" ForegroundFile="Resources\AppIcon\appiconfg.svg" Color="#4822E3" />
@ -85,10 +89,10 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Syncfusion.Maui.Core" version="23.1.36" />
<PackageReference Include="Syncfusion.Maui.Expander" version="23.1.36" />
<PackageReference Include="Syncfusion.Maui.TabView" version="23.1.36" />
<PackageReference Include="SampleBrowser.Maui.Base" version="23.1.36" />
<PackageReference Include="Syncfusion.Maui.Core" version="23.2.4" />
<PackageReference Include="Syncfusion.Maui.Expander" version="23.2.4" />
<PackageReference Include="Syncfusion.Maui.TabView" version="23.2.4" />
<PackageReference Include="SampleBrowser.Maui.Base" version="23.2.4" />
</ItemGroup>
</Project>

Просмотреть файл

@ -36,14 +36,17 @@ public partial class App : MauiWinUIApplication
protected override void OnLaunched(LaunchActivatedEventArgs args)
{
base.OnLaunched(args);
foreach (var item in Application.Windows)
if (IPlatformApplication.Current != null)
{
var platformWindow = (item?.Handler?.PlatformView as Microsoft.UI.Xaml.Window);
if (platformWindow != null)
foreach (var item in IPlatformApplication.Current.Application.Windows)
{
platformWindow.ExtendsContentIntoTitleBar = false;
platformWindow.Title = ".NET MAUI Avatar View Demo";
var platformWindow = (item?.Handler?.PlatformView as Microsoft.UI.Xaml.Window);
if (platformWindow != null)
{
platformWindow.ExtendsContentIntoTitleBar = false;
platformWindow.Title = ".NET MAUI Avatar View Demo";
}
}
}
}

Просмотреть файл

@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net6.0-android;net6.0-ios;net6.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net6.0-windows10.0.19041.0</TargetFrameworks>
<TargetFrameworks>net8.0-android;net8.0-ios;net8.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net8.0-windows10.0.19041.0</TargetFrameworks>
<OutputType>Exe</OutputType>
<RootNamespace>SampleBrowser.Maui.AvatarView</RootNamespace>
<UseMaui>true</UseMaui>
@ -52,6 +52,10 @@
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<WarningLevel>5</WarningLevel>
</PropertyGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net8.0' OR '$(TargetFramework)' == 'net8.0-android' OR '$(TargetFramework)' == 'net8.0-ios' OR '$(TargetFramework)' == 'net8.0-maccatalyst' OR '$(TargetFramework)' == 'net8.0-windows10.0.19041.0' ">
<PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiVersion)" />
</ItemGroup>
<ItemGroup>
<!-- App Icon -->
@ -79,9 +83,9 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="SampleBrowser.Maui.Base" version="23.1.36" />
<PackageReference Include="Syncfusion.Maui.Core" version="23.1.36" />
<PackageReference Include="Syncfusion.Maui.TabView" version="23.1.36" />
<PackageReference Include="SampleBrowser.Maui.Base" version="23.2.4" />
<PackageReference Include="Syncfusion.Maui.Core" version="23.2.4" />
<PackageReference Include="Syncfusion.Maui.TabView" version="23.2.4" />
</ItemGroup>
</Project>

Просмотреть файл

@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net6.0-android;net6.0-ios;net6.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net6.0-windows10.0.19041.0</TargetFrameworks>
<TargetFrameworks>net8.0-android;net8.0-ios;net8.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net8.0-windows10.0.19041.0</TargetFrameworks>
<OutputType>Exe</OutputType>
<RootNamespace>SampleBrowser.Maui.Backdrop</RootNamespace>
<UseMaui>true</UseMaui>
@ -53,6 +53,10 @@
<WarningLevel>5</WarningLevel>
</PropertyGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net8.0' OR '$(TargetFramework)' == 'net8.0-android' OR '$(TargetFramework)' == 'net8.0-ios' OR '$(TargetFramework)' == 'net8.0-maccatalyst' OR '$(TargetFramework)' == 'net8.0-windows10.0.19041.0' ">
<PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiVersion)" />
</ItemGroup>
<ItemGroup>
<!-- App Icon -->
<MauiIcon Include="Resources\AppIcon\appicon.svg" ForegroundFile="Resources\AppIcon\appiconfg.svg" Color="#4822E3" />
@ -74,10 +78,10 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Syncfusion.Maui.Core" version="23.1.36" />
<PackageReference Include="SampleBrowser.Maui.Base" version="23.1.36" />
<PackageReference Include="Syncfusion.Maui.Sliders" version="23.1.36" />
<PackageReference Include="Syncfusion.Maui.TabView" version="23.1.36" />
<PackageReference Include="Syncfusion.Maui.Backdrop" version="23.1.36" />
<PackageReference Include="Syncfusion.Maui.Core" version="23.2.4" />
<PackageReference Include="SampleBrowser.Maui.Base" version="23.2.4" />
<PackageReference Include="Syncfusion.Maui.Sliders" version="23.2.4" />
<PackageReference Include="Syncfusion.Maui.TabView" version="23.2.4" />
<PackageReference Include="Syncfusion.Maui.Backdrop" version="23.2.4" />
</ItemGroup>
</Project>

Просмотреть файл

@ -16,7 +16,7 @@ namespace SampleBrowser.Maui.Backdrop
{
public class TitleConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
{
if (value != null)
{
@ -26,7 +26,7 @@ namespace SampleBrowser.Maui.Backdrop
return "";
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
public object? ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
{
return value;
}

Просмотреть файл

@ -36,14 +36,17 @@ public partial class App : MauiWinUIApplication
protected override void OnLaunched(LaunchActivatedEventArgs args)
{
base.OnLaunched(args);
foreach (var item in Application.Windows)
if (IPlatformApplication.Current != null)
{
var platformWindow = (item?.Handler?.PlatformView as Microsoft.UI.Xaml.Window);
if (platformWindow != null)
foreach (var item in IPlatformApplication.Current.Application.Windows)
{
platformWindow.ExtendsContentIntoTitleBar = false;
platformWindow.Title = ".NET MAUI Badge View Demo";
var platformWindow = (item?.Handler?.PlatformView as Microsoft.UI.Xaml.Window);
if (platformWindow != null)
{
platformWindow.ExtendsContentIntoTitleBar = false;
platformWindow.Title = ".NET MAUI Badge View Demo";
}
}
}
}

Просмотреть файл

@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net6.0-android;net6.0-ios;net6.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net6.0-windows10.0.19041.0</TargetFrameworks>
<TargetFrameworks>net8.0-android;net8.0-ios;net8.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net8.0-windows10.0.19041.0</TargetFrameworks>
<OutputType>Exe</OutputType>
<RootNamespace>SampleBrowser.Maui.BadgeView</RootNamespace>
<UseMaui>true</UseMaui>
@ -53,6 +53,10 @@
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<WarningLevel>5</WarningLevel>
</PropertyGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net8.0' OR '$(TargetFramework)' == 'net8.0-android' OR '$(TargetFramework)' == 'net8.0-ios' OR '$(TargetFramework)' == 'net8.0-maccatalyst' OR '$(TargetFramework)' == 'net8.0-windows10.0.19041.0' ">
<PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiVersion)" />
</ItemGroup>
<ItemGroup>
<!-- App Icon -->
@ -75,9 +79,9 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="SampleBrowser.Maui.Base" version="23.1.36" />
<PackageReference Include="Syncfusion.Maui.Core" version="23.1.36" />
<PackageReference Include="Syncfusion.Maui.TabView" version="23.1.36" />
<PackageReference Include="SampleBrowser.Maui.Base" version="23.2.4" />
<PackageReference Include="Syncfusion.Maui.Core" version="23.2.4" />
<PackageReference Include="Syncfusion.Maui.TabView" version="23.2.4" />
</ItemGroup>
<ItemGroup>

Просмотреть файл

@ -31,7 +31,7 @@
Style="{StaticResource DemoLabelStyle}"/>
</Grid>
<badge:SfBadgeView.BadgeSettings>
<badge:BadgeSettings CornerRadius="10"/>
<badge:BadgeSettings CornerRadius="12"/>
</badge:SfBadgeView.BadgeSettings>
</badge:SfBadgeView>

Просмотреть файл

@ -19,7 +19,7 @@
<VerticalStackLayout WidthRequest="350"
VerticalOptions="Center"
HorizontalOptions="Center">
<Grid RowDefinitions="90,90" RowSpacing="20" ColumnSpacing="20"
<Grid RowDefinitions="90,90" RowSpacing="20" ColumnSpacing="18"
ColumnDefinitions="*,*">
<badge:SfBadgeView Grid.Row="0"
Grid.Column="0"

Просмотреть файл

@ -36,14 +36,17 @@ public partial class App : MauiWinUIApplication
protected override void OnLaunched(LaunchActivatedEventArgs args)
{
base.OnLaunched(args);
foreach (var item in Application.Windows)
if (IPlatformApplication.Current != null)
{
var platformWindow = (item?.Handler?.PlatformView as Microsoft.UI.Xaml.Window);
if (platformWindow != null)
foreach (var item in IPlatformApplication.Current.Application.Windows)
{
platformWindow.ExtendsContentIntoTitleBar = false;
platformWindow.Title = ".NET MAUI Barcode Demo";
var platformWindow = (item?.Handler?.PlatformView as Microsoft.UI.Xaml.Window);
if (platformWindow != null)
{
platformWindow.ExtendsContentIntoTitleBar = false;
platformWindow.Title = ".NET MAUI Barcode Demo";
}
}
}
}

Просмотреть файл

@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net6.0-android;net6.0-ios;net6.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net6.0-windows10.0.19041.0</TargetFrameworks>
<TargetFrameworks>net8.0-android;net8.0-ios;net8.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net8.0-windows10.0.19041.0</TargetFrameworks>
<OutputType>Exe</OutputType>
<RootNamespace>SampleBrowser.Maui.Barcode</RootNamespace>
<UseMaui>true</UseMaui>
@ -53,6 +53,10 @@
<WarningLevel>5</WarningLevel>
</PropertyGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net8.0' OR '$(TargetFramework)' == 'net8.0-android' OR '$(TargetFramework)' == 'net8.0-ios' OR '$(TargetFramework)' == 'net8.0-maccatalyst' OR '$(TargetFramework)' == 'net8.0-windows10.0.19041.0' ">
<PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiVersion)" />
</ItemGroup>
<ItemGroup>
<!-- App Icon -->
<MauiIcon Include="Resources\AppIcon\appicon.svg" ForegroundFile="Resources\AppIcon\appiconfg.svg" Color="#4822E3" />
@ -74,10 +78,10 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="SampleBrowser.Maui.Base" version="23.1.36" />
<PackageReference Include="Syncfusion.Maui.Core" version="23.1.36" />
<PackageReference Include="Syncfusion.Maui.TabView" version="23.1.36" />
<PackageReference Include="Syncfusion.Maui.Barcode" version="23.1.36" />
<PackageReference Include="SampleBrowser.Maui.Base" version="23.2.4" />
<PackageReference Include="Syncfusion.Maui.Core" version="23.2.4" />
<PackageReference Include="Syncfusion.Maui.TabView" version="23.2.4" />
<PackageReference Include="Syncfusion.Maui.Barcode" version="23.2.4" />
</ItemGroup>
<ItemGroup>

Просмотреть файл

@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net6.0-android;net6.0-ios;net6.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net6.0-windows10.0.19041.0</TargetFrameworks>
<TargetFrameworks>net8.0-android;net8.0-ios;net8.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net8.0-windows10.0.19041.0</TargetFrameworks>
<OutputType>Exe</OutputType>
<RootNamespace>SampleBrowser.Maui.BulletChart</RootNamespace>
<UseMaui>true</UseMaui>
@ -53,6 +53,10 @@
<WarningLevel>5</WarningLevel>
</PropertyGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net8.0' OR '$(TargetFramework)' == 'net8.0-android' OR '$(TargetFramework)' == 'net8.0-ios' OR '$(TargetFramework)' == 'net8.0-maccatalyst' OR '$(TargetFramework)' == 'net8.0-windows10.0.19041.0' ">
<PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiVersion)" />
</ItemGroup>
<ItemGroup>
<!-- App Icon -->
<MauiIcon Include="Resources\AppIcon\appicon.svg" ForegroundFile="Resources\AppIcon\appiconfg.svg" Color="#4822E3" />
@ -74,10 +78,10 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="SampleBrowser.Maui.Base" version="23.1.36" />
<PackageReference Include="Syncfusion.Maui.Core" version="23.1.36" />
<PackageReference Include="Syncfusion.Maui.TabView" version="23.1.36" />
<PackageReference Include="Syncfusion.Maui.Gauges" version="23.1.36" />
<PackageReference Include="SampleBrowser.Maui.Base" version="23.2.4" />
<PackageReference Include="Syncfusion.Maui.Core" version="23.2.4" />
<PackageReference Include="Syncfusion.Maui.TabView" version="23.2.4" />
<PackageReference Include="Syncfusion.Maui.Gauges" version="23.2.4" />
</ItemGroup>
<ItemGroup>

Просмотреть файл

@ -36,14 +36,16 @@ public partial class App : MauiWinUIApplication
protected override void OnLaunched(LaunchActivatedEventArgs args)
{
base.OnLaunched(args);
foreach (var item in Application.Windows)
{
var platformWindow = (item?.Handler?.PlatformView as Microsoft.UI.Xaml.Window);
if (platformWindow != null)
if (IPlatformApplication.Current != null) {
foreach (var item in IPlatformApplication.Current.Application.Windows)
{
platformWindow.ExtendsContentIntoTitleBar = false;
platformWindow.Title = ".NET MAUI Busy Indicator Demo";
var platformWindow = (item?.Handler?.PlatformView as Microsoft.UI.Xaml.Window);
if (platformWindow != null)
{
platformWindow.ExtendsContentIntoTitleBar = false;
platformWindow.Title = ".NET MAUI Busy Indicator Demo";
}
}
}
}

Просмотреть файл

@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net6.0-android;net6.0-ios;net6.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net6.0-windows10.0.19041.0</TargetFrameworks>
<TargetFrameworks>net8.0-android;net8.0-ios;net8.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net8.0-windows10.0.19041.0</TargetFrameworks>
<OutputType>Exe</OutputType>
<RootNamespace>SampleBrowser.Maui.BusyIndicator</RootNamespace>
<UseMaui>true</UseMaui>
@ -53,6 +53,10 @@
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<WarningLevel>5</WarningLevel>
</PropertyGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net8.0' OR '$(TargetFramework)' == 'net8.0-android' OR '$(TargetFramework)' == 'net8.0-ios' OR '$(TargetFramework)' == 'net8.0-maccatalyst' OR '$(TargetFramework)' == 'net8.0-windows10.0.19041.0' ">
<PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiVersion)" />
</ItemGroup>
<ItemGroup>
<!-- App Icon -->
@ -80,10 +84,10 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="SampleBrowser.Maui.Base" version="23.1.36" />
<PackageReference Include="Syncfusion.Maui.Core" version="23.1.36" />
<PackageReference Include="Syncfusion.Maui.Charts" version="23.1.36" />
<PackageReference Include="Syncfusion.Maui.TabView" version="23.1.36" />
<PackageReference Include="SampleBrowser.Maui.Base" version="23.2.4" />
<PackageReference Include="Syncfusion.Maui.Core" version="23.2.4" />
<PackageReference Include="Syncfusion.Maui.Charts" version="23.2.4" />
<PackageReference Include="Syncfusion.Maui.TabView" version="23.2.4" />
</ItemGroup>
</Project>

Просмотреть файл

@ -8,7 +8,7 @@
BackgroundColor="White">
<localCore:SampleView.Content>
<Grid HeightRequest="400" WidthRequest="300" RowDefinitions="*,220" >
<Grid HeightRequest="400" WidthRequest="320" RowDefinitions="*,220" >
<core:SfBusyIndicator x:Name="busyIndicator" IsRunning="True" Title="Searching..."/>
<Grid Grid.Row="1" RowDefinitions="50,50,50,50" Padding="15,10,15,15" Background="#EAEAEA" >
<Grid ColumnDefinitions="Auto,*" >

Просмотреть файл

@ -39,7 +39,7 @@
<Control ControlName="CheckBox"
Title="CheckBox"
Image="checkbox.png"
Description="A checkbox is a UI element for toggling between two states, often used for binary choices or multi-selection options."
Description="A checkbox allows toggling between two states, useful for binary or multi-choice."
StatusTag="New"
IsPreview="True">
<Sample SampleName="GettingStarted"
@ -57,7 +57,7 @@
<Control ControlName="RadioButton"
Title="Radio Button"
Image="radiobutton.png"
Description="A radio button is a UI element that allows users to select a single option from a list of mutually exclusive choices."
Description="A radio button is a user interface element for selecting one exclusive option from a list."
StatusTag="New"
IsPreview="True">
<Sample SampleName="GettingStarted"

Просмотреть файл

@ -36,14 +36,17 @@ public partial class App : MauiWinUIApplication
protected override void OnLaunched(LaunchActivatedEventArgs args)
{
base.OnLaunched(args);
foreach (var item in Application.Windows)
if(IPlatformApplication.Current != null)
{
var platformWindow = (item?.Handler?.PlatformView as Microsoft.UI.Xaml.Window);
if (platformWindow != null)
foreach (var item in IPlatformApplication.Current.Application.Windows)
{
platformWindow.ExtendsContentIntoTitleBar = false;
platformWindow.Title = ".NET MAUI Buttons Demo";
var platformWindow = (item?.Handler?.PlatformView as Microsoft.UI.Xaml.Window);
if (platformWindow != null)
{
platformWindow.ExtendsContentIntoTitleBar = false;
platformWindow.Title = ".NET MAUI Buttons Demo";
}
}
}
}

Просмотреть файл

@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net6.0-android;net6.0-ios;net6.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net6.0-windows10.0.19041.0</TargetFrameworks>
<TargetFrameworks>net8.0-android;net8.0-ios;net8.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net8.0-windows10.0.19041.0</TargetFrameworks>
<OutputType>Exe</OutputType>
<RootNamespace>SampleBrowser.Maui.Buttons</RootNamespace>
<UseMaui>true</UseMaui>
@ -53,6 +53,10 @@
<WarningLevel>5</WarningLevel>
</PropertyGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net8.0' OR '$(TargetFramework)' == 'net8.0-android' OR '$(TargetFramework)' == 'net8.0-ios' OR '$(TargetFramework)' == 'net8.0-maccatalyst' OR '$(TargetFramework)' == 'net8.0-windows10.0.19041.0' ">
<PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiVersion)" />
</ItemGroup>
<ItemGroup>
<!-- App Icon -->
<MauiIcon Include="Resources\AppIcon\appicon.svg" ForegroundFile="Resources\AppIcon\appiconfg.svg" Color="#4822E3" />
@ -67,23 +71,30 @@
<MauiAsset Include="Resources\Raw\**" LogicalName="%(RecursiveDir)%(Filename)%(Extension)" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Resources\Fonts\OpenSans-Regular.ttf" />
<EmbeddedResource Include="Resources\Fonts\OpenSans-Semibold.ttf" />
<EmbeddedResource Include="Resources\Fonts\SegmentIcon.ttf" />
<EmbeddedResource Include="Resources\Fonts\Roboto-Medium.ttf" />
<EmbeddedResource Include="Resources\Fonts\Roboto-Regular.ttf" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="ControlList.xml" />
<EmbeddedResource Include="ButtonsSamplesList.xml" />
<EmbeddedResource Include="SyncfusionLicense.txt" />
<None Remove="Resources\Fonts\SegmentIcon.ttf" />
<None Remove="Resources\Fonts\Roboto-Medium.ttf" />
<None Remove="Resources\Fonts\Roboto-Regular.ttf" />
<None Remove="SampleBrowser.Maui.Buttons.nuspec" />
<None Remove="SampleBrowser.Maui.Buttons.props" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="SampleBrowser.Maui.Base" version="23.1.36" />
<PackageReference Include="Syncfusion.Maui.Buttons" version="23.1.36" />
<PackageReference Include="Syncfusion.Maui.ListView" version="23.1.36" />
<PackageReference Include="Syncfusion.Maui.TabView" version="23.1.36" />
<PackageReference Include="Syncfusion.Maui.Core" version="23.1.36" />
<PackageReference Include="Syncfusion.Maui.Sliders" version="23.1.36" />
<PackageReference Include="SampleBrowser.Maui.Base" version="23.2.4" />
<PackageReference Include="Syncfusion.Maui.Buttons" version="23.2.4" />
<PackageReference Include="Syncfusion.Maui.ListView" version="23.2.4" />
<PackageReference Include="Syncfusion.Maui.DataSource" version="23.2.4" />
<PackageReference Include="Syncfusion.Maui.GridCommon" version="23.2.4" />
<PackageReference Include="Syncfusion.Maui.TabView" version="23.2.4" />
<PackageReference Include="Syncfusion.Maui.Core" version="23.2.4" />
<PackageReference Include="Syncfusion.Maui.Sliders" version="23.2.4" />
</ItemGroup>
</Project>

Просмотреть файл

@ -81,10 +81,12 @@
Margin="2,0,0,0"/>
<buttons:SfSegmentedControl x:Name="segmentedControlColorOption"
StrokeThickness="3"
VerticalOptions="Fill"
HeightRequest="42"
Stroke="Transparent"
SegmentWidth="{OnPlatform WinUI=38,MacCatalyst=36}"
SegmentWidth="38"
HorizontalOptions="Start"
WidthRequest="{OnPlatform WinUI=210,MacCatalyst=200}"
WidthRequest="210"
SegmentHeight="36"
CornerRadius="36"
SegmentCornerRadius="36"
@ -111,7 +113,8 @@
FontFamily="RobotoMedium"/>
</HorizontalStackLayout>
<buttons:SfSegmentedControl x:Name="segmentedControlWarrantyOption"
SegmentHeight="38"
SegmentHeight="38"
VerticalOptions="FillAndExpand"
Margin="0,5,0,0"
HorizontalOptions="Start"
WidthRequest="312"
@ -172,15 +175,21 @@
</StackLayout>
</ScrollView>
<Line HeightRequest="1" x:Name="line" StrokeThickness="1" VerticalOptions="Start" Background="LightGray" Grid.Row="1" />
<Border x:Name="line" StrokeThickness="1" VerticalOptions="Start" Background="LightGray" Grid.Row="1" >
<Border.Margin>
<OnPlatform x:TypeArguments="thickness:Thickness">
<On Platform="MacCatalyst" Value="5,0,5,12"/>
<On Platform="WinUI" Value="5,12,5,12"/>
</OnPlatform>
</Border.Margin>
</Border>
<buttons:SfSegmentedControl x:Name="segmentedControlResultsOption"
HorizontalOptions="Start"
Grid.Row="1"
VerticalOptions="{OnPlatform WinUI=Fill,MacCatalyst=Start}"
VisibleSegmentsCount="1"
VerticalOptions="Start"
WidthRequest="{Binding Source={x:Reference line},Path=Width}"
HeightRequest="40"
Margin="3,20,0,0"
SelectedIndex="0"
ItemsSource="{Binding SpeakerResultsOptionInfo}">
<buttons:SfSegmentedControl.TextStyle>
@ -189,6 +198,12 @@
<buttons:SfSegmentedControl.SelectionIndicatorSettings>
<buttons:SelectionIndicatorSettings Background="#6200EE" />
</buttons:SfSegmentedControl.SelectionIndicatorSettings>
<buttons:SfSegmentedControl.Margin>
<OnPlatform x:TypeArguments="thickness:Thickness">
<On Platform="MacCatalyst" Value="3,20,3,0"/>
<On Platform="WinUI" Value="3,12,3,0"/>
</OnPlatform>
</buttons:SfSegmentedControl.Margin>
</buttons:SfSegmentedControl>
</Grid>
</Grid>

Просмотреть файл

@ -37,7 +37,7 @@
Grid.Row="1"
Margin="0,30,0,0"
VerticalOptions="Start" >
<Image Source="{Binding Image,Converter={StaticResource imageconverter}}" HeightRequest="350" VerticalOptions="Center"/>
<Image Source="{Binding Image,Converter={StaticResource imageconverter}}" HeightRequest="320" VerticalOptions="Center"/>
</StackLayout>
<Label Text="{Binding TotalPrice}"
@ -50,9 +50,9 @@
Text="Pick a Color"
Margin="2,0,0,0"/>
<buttons:SfSegmentedControl x:Name="segmentedControlColorOption"
StrokeThickness="3"
StrokeThickness="{OnPlatform Android=3,iOS=2}"
Stroke="Transparent"
SegmentWidth="{OnPlatform Android=38,iOS=36}"
SegmentWidth="{OnPlatform Android=35,iOS=36}"
HorizontalOptions="Start"
WidthRequest="{OnPlatform Android=210,iOS=200}"
SegmentHeight="36"
@ -112,7 +112,7 @@
CornerRadius="30"
SegmentCornerRadius="30"
StrokeThickness="10"
Margin="-8,0,0,0"
Margin="-12,0,0,0"
SegmentHeight="30"
HeightRequest="50"
HorizontalOptions="Start"
@ -131,16 +131,16 @@
</StackLayout>
<StackLayout Grid.Row="1"
Margin="0,10,0,0">
<Line HeightRequest="1"
<Border HeightRequest="1"
StrokeThickness="1"
VerticalOptions="Start"
Background="LightGray"/>
<buttons:SfSegmentedControl x:Name="segmentedControlResultsOption"
ItemsSource="{Binding SpeakerResultsOptionInfo}"
VisibleSegmentsCount="1"
WidthRequest="330"
WidthRequest="{OnPlatform iOS=390,Android=360}"
Margin="0,12,0,0"
HorizontalOptions="Center"
HorizontalOptions="Start"
SelectedIndex="0" >
<buttons:SfSegmentedControl.TextStyle>
<buttons:SegmentTextStyle FontSize="14" FontFamily="Roboto" />

Просмотреть файл

@ -36,14 +36,17 @@ public partial class App : MauiWinUIApplication
protected override void OnLaunched(LaunchActivatedEventArgs args)
{
base.OnLaunched(args);
foreach (var item in Application.Windows)
if (IPlatformApplication.Current != null)
{
var platformWindow = (item?.Handler?.PlatformView as Microsoft.UI.Xaml.Window);
if (platformWindow != null)
foreach (var item in IPlatformApplication.Current.Application.Windows)
{
platformWindow.ExtendsContentIntoTitleBar = false;
platformWindow.Title = ".NET MAUI Calendar Demo";
var platformWindow = (item?.Handler?.PlatformView as Microsoft.UI.Xaml.Window);
if (platformWindow != null)
{
platformWindow.ExtendsContentIntoTitleBar = false;
platformWindow.Title = ".NET MAUI Calendar Demo";
}
}
}
}

Просмотреть файл

@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net6.0-android;net6.0-ios;net6.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net6.0-windows10.0.19041.0</TargetFrameworks>
<TargetFrameworks>net8.0-android;net8.0-ios;net8.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net8.0-windows10.0.19041.0</TargetFrameworks>
<OutputType>Exe</OutputType>
<RootNamespace>SampleBrowser.Maui.Calendar</RootNamespace>
<UseMaui>true</UseMaui>
@ -53,6 +53,10 @@
<WarningLevel>5</WarningLevel>
</PropertyGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net8.0' OR '$(TargetFramework)' == 'net8.0-android' OR '$(TargetFramework)' == 'net8.0-ios' OR '$(TargetFramework)' == 'net8.0-maccatalyst' OR '$(TargetFramework)' == 'net8.0-windows10.0.19041.0' ">
<PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiVersion)" />
</ItemGroup>
<ItemGroup>
<!-- App Icon -->
<MauiIcon Include="Resources\AppIcon\appicon.svg" ForegroundFile="Resources\AppIcon\appiconfg.svg" Color="#4822E3" />
@ -78,13 +82,13 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="SampleBrowser.Maui.Base" version="23.1.36" />
<PackageReference Include="Syncfusion.Maui.Core" version="23.1.36" />
<PackageReference Include="Syncfusion.Maui.Inputs" version="23.1.36" />
<PackageReference Include="Syncfusion.Maui.TabView" version="23.1.36" />
<PackageReference Include="Syncfusion.Maui.DataSource" version="23.1.36" />
<PackageReference Include="Syncfusion.Maui.GridCommon" version="23.1.36" />
<PackageReference Include="Syncfusion.Maui.ListView" version="23.1.36" />
<PackageReference Include="Syncfusion.Maui.Calendar" version="23.1.36" />
<PackageReference Include="SampleBrowser.Maui.Base" version="23.2.4" />
<PackageReference Include="Syncfusion.Maui.Core" version="23.2.4" />
<PackageReference Include="Syncfusion.Maui.Inputs" version="23.2.4" />
<PackageReference Include="Syncfusion.Maui.TabView" version="23.2.4" />
<PackageReference Include="Syncfusion.Maui.DataSource" version="23.2.4" />
<PackageReference Include="Syncfusion.Maui.GridCommon" version="23.2.4" />
<PackageReference Include="Syncfusion.Maui.ListView" version="23.2.4" />
<PackageReference Include="Syncfusion.Maui.Calendar" version="23.2.4" />
</ItemGroup>
</Project>

Просмотреть файл

@ -50,13 +50,14 @@
</localCore:SampleView.Content>
<localCore:SampleView.OptionView>
<ContentView>
<StackLayout Orientation="Vertical">
<Grid >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.5*"/>
<ColumnDefinition Width="0.5*"/>
</Grid.ColumnDefinitions>
<Label Text="Shape" Margin="0,15,0,0"
<ScrollView Padding="0, 0, 5, 0">
<StackLayout Orientation="Vertical">
<Grid >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.5*"/>
<ColumnDefinition Width="0.5*"/>
</Grid.ColumnDefinitions>
<Label Text="Shape" Margin="0,15,0,0"
Grid.Column="0"
LineBreakMode="WordWrap"
FontSize="14"
@ -64,11 +65,12 @@
HorizontalOptions="Start"
TextColor="Gray"/>
<editors:SfComboBox x:Name="comboBox" Grid.Column="1"
<editors:SfComboBox x:Name="comboBox" Grid.Column="1"
Margin="0,15,0,0" VerticalOptions="Center"
HorizontalOptions="Start"/>
</Grid>
</StackLayout>
</Grid>
</StackLayout>
</ScrollView>
</ContentView>
</localCore:SampleView.OptionView>
<localCore:SampleView.Behaviors>

Просмотреть файл

@ -101,7 +101,7 @@ public class AppearanceViewModel : INotifyPropertyChanged
internal class DateToStrokeConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
{
var date = value as DateTime?;
if (date.HasValue && date.Value.Date == DateTime.Now.Date)
@ -112,7 +112,7 @@ internal class DateToStrokeConverter : IValueConverter
return 0;
}
public object? ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
public object? ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
{
return null;
}

Просмотреть файл

@ -40,13 +40,14 @@
</localCore:SampleView.Content>
<localCore:SampleView.OptionView>
<ContentView>
<StackLayout Orientation="Vertical">
<Grid >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.5*"/>
<ColumnDefinition Width="0.5*"/>
</Grid.ColumnDefinitions>
<Label Text="Selection Type" Margin="0,15,0,0"
<ScrollView Padding="0, 0, 5, 0">
<StackLayout Orientation="Vertical">
<Grid >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.5*"/>
<ColumnDefinition Width="0.5*"/>
</Grid.ColumnDefinitions>
<Label Text="Selection Type" Margin="0,15,0,0"
Grid.Column="0"
LineBreakMode="WordWrap"
FontSize="14"
@ -54,11 +55,12 @@
HorizontalOptions="Start"
TextColor="Gray"/>
<editors:SfComboBox x:Name="comboBox" Grid.Column="1"
<editors:SfComboBox x:Name="comboBox" Grid.Column="1"
Margin="5,15,0,0" VerticalOptions="Center"
HorizontalOptions="End"/>
</Grid>
</StackLayout>
</Grid>
</StackLayout>
</ScrollView>
</ContentView>
</localCore:SampleView.OptionView>
<localCore:SampleView.Behaviors>

Просмотреть файл

@ -19,13 +19,14 @@
</localCore:SampleView.Content>
<localCore:SampleView.OptionView>
<ContentView>
<StackLayout Orientation="Vertical">
<Grid >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.3*"/>
<ColumnDefinition Width="0.7*"/>
</Grid.ColumnDefinitions>
<Label Text="Theme" Margin="0,15,0,0"
<ScrollView Padding="0, 0, 5, 0">
<StackLayout Orientation="Vertical">
<Grid >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.3*"/>
<ColumnDefinition Width="0.7*"/>
</Grid.ColumnDefinitions>
<Label Text="Theme" Margin="0,15,0,0"
Grid.Column="0"
LineBreakMode="WordWrap"
FontSize="14"
@ -33,11 +34,12 @@
HorizontalOptions="Start"
TextColor="Gray"/>
<editors:SfComboBox x:Name="comboBox" Grid.Column="1"
<editors:SfComboBox x:Name="comboBox" Grid.Column="1"
Margin="5,15,0,0" VerticalOptions="Center"
HorizontalOptions="End" SelectionChanged="comboBox_SelectionChanged"/>
</Grid>
</StackLayout>
</Grid>
</StackLayout>
</ScrollView>
</ContentView>
</localCore:SampleView.OptionView>
</localCore:SampleView>

Просмотреть файл

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?>
<SyncfusionControls>
<ControlCategory Name="Data Visualization">
<Control Title="Cartesian Charts" StatusTag="Updated" ControlName="SfCartesianChart" Image="cartesianchart.png" Description="Plot over seven chart types with extensive features like data label and zooming.">
<Control Title="Cartesian Charts" StatusTag="Updated" ControlName="SfCartesianChart" Image="cartesianchart.png" Description="Plot over 20+ chart types with extensive features like data label, trackball and zooming.">
<Category Title="Chart Types">
<SubCategory Title="Column">
<CardLayout>
@ -158,7 +158,7 @@
</Category>
<Category Title="Axis">
<Sample Title="Category" SampleName="CategoryAxisChart" VideoLink="https://www.youtube.com/watch?v=D_8MHoglBVI" SearchTags="string, name, category, axis" CodeViewerPath="CartesianChart/Axis/"/>
<Sample Title="Numerical" SampleName="NumericalAxisChart" SearchTags="numeric, axis" CodeViewerPath="CartesianChart/Axis/"/>
<Sample Title="Numerical" SampleName="NumericalAxisChart" VideoLink="https://www.youtube.com/watch?v=BJAEtUZSK_c" SearchTags="numeric, axis" CodeViewerPath="CartesianChart/Axis/"/>
<Sample Title="Logarithm" SampleName="LogarithmicAxisChart" VideoLink="https://www.youtube.com/watch?v=HWPRuTYThDc" SearchTags="logarithmic, axis" CodeViewerPath="CartesianChart/Axis/"/>
<Sample Title="Date Time" SampleName="DateTimeAxisChart" VideoLink="https://www.youtube.com/watch?v=Z_ZIJ1zlVg0" SearchTags="date, axis" CodeViewerPath="CartesianChart/Axis/"/>
<Sample Title="Axis crossing" SampleName="AxisCrossing" SearchTags="axis, crossing" CodeViewerPath="CartesianChart/Axis/"/>

Просмотреть файл

@ -36,14 +36,17 @@ public partial class App : MauiWinUIApplication
protected override void OnLaunched(LaunchActivatedEventArgs args)
{
base.OnLaunched(args);
foreach (var item in Application.Windows)
if(IPlatformApplication.Current != null)
{
var platformWindow = (item?.Handler?.PlatformView as Microsoft.UI.Xaml.Window);
if (platformWindow != null)
foreach (var item in IPlatformApplication.Current.Application.Windows)
{
platformWindow.ExtendsContentIntoTitleBar = false;
platformWindow.Title = ".NET MAUI Cartesian Chart Demo";
var platformWindow = (item?.Handler?.PlatformView as Microsoft.UI.Xaml.Window);
if (platformWindow != null)
{
platformWindow.ExtendsContentIntoTitleBar = false;
platformWindow.Title = ".NET MAUI Cartesian Chart Demo";
}
}
}
}

Просмотреть файл

@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net6.0-android;net6.0-ios;net6.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net6.0-windows10.0.19041.0</TargetFrameworks>
<TargetFrameworks>net8.0-android;net8.0-ios;net8.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net8.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);net6.0-tizen</TargetFrameworks> -->
<OutputType>Exe</OutputType>
@ -54,6 +54,10 @@
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<WarningLevel>5</WarningLevel>
</PropertyGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net8.0' OR '$(TargetFramework)' == 'net8.0-android' OR '$(TargetFramework)' == 'net8.0-ios' OR '$(TargetFramework)' == 'net8.0-maccatalyst' OR '$(TargetFramework)' == 'net8.0-windows10.0.19041.0' ">
<PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiVersion)" />
</ItemGroup>
<ItemGroup>
<!-- App Icon -->
@ -85,10 +89,10 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="SampleBrowser.Maui.Base" version="23.1.36" />
<PackageReference Include="Syncfusion.Maui.Charts" version="23.1.36" />
<PackageReference Include="Syncfusion.Maui.Core" version="23.1.36" />
<PackageReference Include="Syncfusion.Maui.TabView" version="23.1.36" />
<PackageReference Include="SampleBrowser.Maui.Base" version="23.2.4" />
<PackageReference Include="Syncfusion.Maui.Charts" version="23.2.4" />
<PackageReference Include="Syncfusion.Maui.Core" version="23.2.4" />
<PackageReference Include="Syncfusion.Maui.TabView" version="23.2.4" />
</ItemGroup>
<ItemGroup>

Просмотреть файл

@ -27,20 +27,20 @@
<DataTemplate x:Key="tooltiptemplate">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Label Grid.Row="0" Grid.Column="0" Text="{Binding Item.Name,StringFormat='{0}'}" HorizontalTextAlignment="Center" HorizontalOptions="Center" VerticalTextAlignment="Center" FontFamily="Helvetica" FontAttributes="Bold" TextColor="White" Margin="0,2,0,2" FontSize="10"></Label>
<Label Grid.Row="0" Grid.Column="0" Text="{Binding Item.Name,StringFormat='{0}'}" HorizontalTextAlignment="Center" Margin="0,0,0,2" HorizontalOptions="Center" VerticalTextAlignment="Center" FontFamily="Helvetica" FontAttributes="Bold" TextColor="White" FontSize="10"></Label>
<BoxView Grid.Row="1" Grid.Column="0" VerticalOptions="Center" Color="Gray" HeightRequest="1" />
<StackLayout Grid.Row="2" Grid.Column="0" Orientation="Vertical" VerticalOptions="Fill" Spacing="0" Padding="3" Margin="0">
<Label Text="{Binding Item.Value,StringFormat='Literacy rate : {0}%'}" VerticalTextAlignment="Center" HorizontalOptions="Start" TextColor="White" FontFamily="Helvetica" Margin="0,0,3,0" FontSize="10"></Label>
<Label Text="{Binding Item.High,StringFormat='GDP growth rate : {0}'}" VerticalTextAlignment="Center" HorizontalOptions="Start" TextColor="White" FontFamily="Helvetica" Margin="0,0,3,0" FontSize="10"></Label>
<Label Text="{Binding Item.Low,StringFormat='Population : {0}B'}" VerticalTextAlignment="Center" HorizontalOptions="Start" TextColor="White" FontFamily="Helvetica" Margin="0,0,3,0" FontSize="10"></Label>
<StackLayout Grid.Row="2" Grid.Column="0" Orientation="Vertical" VerticalOptions="Fill" Spacing="0" Padding="2" Margin="0">
<Label Text="{Binding Item.Value,StringFormat='Literacy rate : {0}%'}" VerticalTextAlignment="Center" HorizontalOptions="Start" TextColor="White" FontFamily="Helvetica" FontSize="10"></Label>
<Label Text="{Binding Item.High,StringFormat='GDP growth rate : {0}'}" VerticalTextAlignment="Center" HorizontalOptions="Start" TextColor="White" FontFamily="Helvetica" FontSize="10"></Label>
<Label Text="{Binding Item.Low,StringFormat='Population : {0}B'}" VerticalTextAlignment="Center" HorizontalOptions="Start" TextColor="White" FontFamily="Helvetica" FontSize="10"></Label>
</StackLayout>
</Grid>
</DataTemplate>

Просмотреть файл

@ -28,8 +28,8 @@
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
@ -37,10 +37,10 @@
<Label Grid.Row="0" Grid.Column="0" LineBreakMode="WordWrap" MaximumWidthRequest="100" Text="{Binding Item.Name,StringFormat='{0}'}" HorizontalTextAlignment="Center" HorizontalOptions="Center" VerticalTextAlignment="Center" FontFamily="Helvetica" FontAttributes="Bold" TextColor="White" Margin="0,2,0,2" FontSize="10"></Label>
<BoxView Grid.Row="1" Grid.Column="0" VerticalOptions="Center" Color="Gray" HeightRequest="1" />
<StackLayout Grid.Row="2" Grid.Column="0" Orientation="Vertical" VerticalOptions="Fill" Spacing="0" Padding="3" Margin="0">
<Label Text="{Binding Item.High,StringFormat='Budget : ${0}M'}" VerticalTextAlignment="Center" HorizontalOptions="Start" TextColor="White" FontFamily="Helvetica" Margin="0,0,3,0" FontSize="10"></Label>
<Label Text="{Binding Item.Low,StringFormat='Revenue: ${0}M'}" VerticalTextAlignment="Center" HorizontalOptions="Start" TextColor="White" FontFamily="Helvetica" Margin="0,0,3,0" FontSize="10"></Label>
<Label Text="{Binding Item.High,StringFormat='Budget : ${0}M'}" VerticalTextAlignment="Center" HorizontalOptions="Start" TextColor="White" FontFamily="Helvetica" Margin="0,0,3,0" FontSize="10"></Label>
<Label Text="{Binding Item.Low,StringFormat='Revenue : ${0}M'}" VerticalTextAlignment="Center" HorizontalOptions="Start" TextColor="White" FontFamily="Helvetica" Margin="0,0,3,0" FontSize="10"></Label>
<StackLayout Grid.Row="2" Grid.Column="0" Orientation="Horizontal" VerticalOptions="Fill" Spacing="0" Margin="0">
<Label Text="{Binding Item.Size,StringFormat='Rating : {0}/10'}" VerticalTextAlignment="Center" HorizontalOptions="Start" TextColor="White" FontFamily="Helvetica" Margin="0,0,3,0" FontSize="10"></Label>
<Label Text="{Binding Item.Size,StringFormat='Rating : {0}/10'}" VerticalTextAlignment="Center" HorizontalOptions="Start" TextColor="White" FontFamily="Helvetica" Margin="0,0,3,0" FontSize="10"></Label>
<Label Text="{Binding Item.Value,StringFormat=' ({0}K)'}" VerticalTextAlignment="Center" HorizontalOptions="Start" TextColor="White" FontFamily="Helvetica" Margin="0,0,3,0" FontSize="10"></Label>
</StackLayout>
</StackLayout>

Просмотреть файл

@ -33,12 +33,16 @@ namespace SampleBrowser.Maui.CartesianChart.SfCartesianChart
public class SelectionValueConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
{
return ((DateTime)value).ToString("ddd-hh:mm");
if (value != null)
{
return ((DateTime)value).ToString("ddd-hh:mm");
}
return null;
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
public object? ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
{
return value;
}

Просмотреть файл

@ -27,5 +27,23 @@ public partial class App : MauiWinUIApplication
}
protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
protected override void OnLaunched(LaunchActivatedEventArgs args)
{
base.OnLaunched(args);
if (IPlatformApplication.Current != null)
{
foreach (var item in IPlatformApplication.Current.Application.Windows)
{
var platformWindow = (item?.Handler?.PlatformView as Microsoft.UI.Xaml.Window);
if (platformWindow != null)
{
platformWindow.ExtendsContentIntoTitleBar = false;
platformWindow.Title = ".NET MAUI Chips Demo";
}
}
}
}
}

Просмотреть файл

@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net6.0-android;net6.0-ios;net6.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net6.0-windows10.0.19041.0</TargetFrameworks>
<TargetFrameworks>net8.0-android;net8.0-ios;net8.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net8.0-windows10.0.19041.0</TargetFrameworks>
<OutputType>Exe</OutputType>
<RootNamespace>SampleBrowser.Maui.Chips</RootNamespace>
<UseMaui>true</UseMaui>
@ -51,6 +51,10 @@
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<WarningLevel>5</WarningLevel>
</PropertyGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net8.0' OR '$(TargetFramework)' == 'net8.0-android' OR '$(TargetFramework)' == 'net8.0-ios' OR '$(TargetFramework)' == 'net8.0-maccatalyst' OR '$(TargetFramework)' == 'net8.0-windows10.0.19041.0' ">
<PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiVersion)" />
</ItemGroup>
<ItemGroup>
<!-- App Icon -->
@ -81,9 +85,9 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="SampleBrowser.Maui.Base" version="23.1.36" />
<PackageReference Include="Syncfusion.Maui.Core" version="23.1.36" />
<PackageReference Include="Syncfusion.Maui.TabView" version="23.1.36" />
<PackageReference Include="SampleBrowser.Maui.Base" version="23.2.4" />
<PackageReference Include="Syncfusion.Maui.Core" version="23.2.4" />
<PackageReference Include="Syncfusion.Maui.TabView" version="23.2.4" />
</ItemGroup>
</Project>

Просмотреть файл

@ -289,10 +289,10 @@
Grid.Column="2" FontFamily="Roboto-Regular"
VerticalTextAlignment="Center"/>
</Grid>
<StackLayout Margin="8,10,33,0" Orientation="Horizontal" HorizontalOptions="Start">
<StackLayout Margin="8,10,20,0" Orientation="Horizontal" HorizontalOptions="Start">
<StackLayout.Spacing>
<OnPlatform x:TypeArguments="x:Double">
<On Platform="WinUI" Value="75"/>
<On Platform="WinUI" Value="25"/>
</OnPlatform>
</StackLayout.Spacing>
<HorizontalStackLayout HorizontalOptions="StartAndExpand">

Просмотреть файл

@ -21,7 +21,7 @@
</SubCategory>
<SubCategory Title="Radial Bar">
<CardLayout>
<Sample SearchTags="radialbar" Name="RadialBarChart" SampleName="RadialBarChart" Title="Default radial bar" CodeViewerPath="CircularChart/RadialBar/"/>
<Sample SearchTags="radialbar" Name="RadialBarChart" SampleName="RadialBarChart" Title="Default radial bar" VideoLink="https://www.youtube.com/watch?v=KO7LfFuIwHE" CodeViewerPath="CircularChart/RadialBar/"/>
<Sample SearchTags="radialbar" Name="CustomizedRadialBarChart" SampleName="CustomizedRadialBarChart" Title="Customized legend" CodeViewerPath="CircularChart/RadialBar/"/>
</CardLayout>
</SubCategory>

Просмотреть файл

@ -36,14 +36,17 @@ public partial class App : MauiWinUIApplication
protected override void OnLaunched(LaunchActivatedEventArgs args)
{
base.OnLaunched(args);
foreach (var item in Application.Windows)
if(IPlatformApplication.Current != null)
{
var platformWindow = (item?.Handler?.PlatformView as Microsoft.UI.Xaml.Window);
if (platformWindow != null)
foreach (var item in IPlatformApplication.Current.Application.Windows)
{
platformWindow.ExtendsContentIntoTitleBar = false;
platformWindow.Title = ".NET MAUI Circular Chart Demo";
var platformWindow = (item?.Handler?.PlatformView as Microsoft.UI.Xaml.Window);
if (platformWindow != null)
{
platformWindow.ExtendsContentIntoTitleBar = false;
platformWindow.Title = ".NET MAUI Circular Chart Demo";
}
}
}
}

Просмотреть файл

@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net6.0-android;net6.0-ios;net6.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net6.0-windows10.0.19041.0</TargetFrameworks>
<TargetFrameworks>net8.0-android;net8.0-ios;net8.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net8.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);net6.0-tizen</TargetFrameworks> -->
<OutputType>Exe</OutputType>
@ -55,6 +55,10 @@
<WarningLevel>5</WarningLevel>
</PropertyGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net8.0' OR '$(TargetFramework)' == 'net8.0-android' OR '$(TargetFramework)' == 'net8.0-ios' OR '$(TargetFramework)' == 'net8.0-maccatalyst' OR '$(TargetFramework)' == 'net8.0-windows10.0.19041.0' ">
<PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiVersion)" />
</ItemGroup>
<ItemGroup>
<!-- App Icon -->
<MauiIcon Include="Resources\AppIcon\appicon.svg" ForegroundFile="Resources\AppIcon\appiconfg.svg" Color="#4822E3" />
@ -85,10 +89,10 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="SampleBrowser.Maui.Base" version="23.1.36" />
<PackageReference Include="Syncfusion.Maui.Charts" version="23.1.36" />
<PackageReference Include="Syncfusion.Maui.Core" version="23.1.36" />
<PackageReference Include="Syncfusion.Maui.TabView" version="23.1.36" />
<PackageReference Include="SampleBrowser.Maui.Base" version="23.2.4" />
<PackageReference Include="Syncfusion.Maui.Charts" version="23.2.4" />
<PackageReference Include="Syncfusion.Maui.Core" version="23.2.4" />
<PackageReference Include="Syncfusion.Maui.TabView" version="23.2.4" />
</ItemGroup>
</Project>

Просмотреть файл

@ -87,7 +87,7 @@ namespace SampleBrowser.Maui.CircularChart.SfCircularChart
public class ItemsSourceConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
{
if (value != null)
{
@ -114,7 +114,7 @@ namespace SampleBrowser.Maui.CircularChart.SfCircularChart
return new List<object>();
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
public object? ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
{
return value;
}
@ -122,9 +122,9 @@ namespace SampleBrowser.Maui.CircularChart.SfCircularChart
public class StringFormatConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
{
if(value is ChartDataModel model)
if(value != null && value is ChartDataModel model)
{
if(parameter is PieSeries series)
{
@ -141,7 +141,7 @@ namespace SampleBrowser.Maui.CircularChart.SfCircularChart
return "";
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
public object? ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
{
return value;
}

Просмотреть файл

@ -42,9 +42,9 @@ namespace SampleBrowser.Maui.CircularChart.SfCircularChart
public class IndexToItemSourceConverter : IValueConverter
{
public object? Convert(object value, Type targetType, object parameter, CultureInfo culture)
public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
{
if (value is LegendItem legendItem)
if (value != null && value is LegendItem legendItem)
{
List<object?> collection = new List<object?>();
collection.Add(legendItem.Item);
@ -54,7 +54,7 @@ namespace SampleBrowser.Maui.CircularChart.SfCircularChart
return null;
}
public object? ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
public object? ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
{
return null;
}

Просмотреть файл

@ -99,7 +99,7 @@ namespace SampleBrowser.Maui.CircularChart.SfCircularChart
public class CornerRadiusConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
{
if (value != null)
{
@ -109,7 +109,7 @@ namespace SampleBrowser.Maui.CircularChart.SfCircularChart
return 0;
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
public object? ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
{
return value;
}

Просмотреть файл

@ -36,7 +36,7 @@ public partial class App : MauiWinUIApplication
protected override void OnLaunched(LaunchActivatedEventArgs args)
{
base.OnLaunched(args);
foreach (var item in Application.Windows)
foreach (var item in IPlatformApplication.Current!.Application.Windows)
{
var platformWindow = (item?.Handler?.PlatformView as Microsoft.UI.Xaml.Window);

Просмотреть файл

@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net6.0-android;net6.0-ios;net6.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net6.0-windows10.0.19041.0</TargetFrameworks>
<TargetFrameworks>net8.0-android;net8.0-ios;net8.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net8.0-windows10.0.19041.0</TargetFrameworks>
<OutputType>Exe</OutputType>
<RootNamespace>SampleBrowser.Maui.DataForm</RootNamespace>
<UseMaui>true</UseMaui>
@ -53,6 +53,10 @@
<WarningLevel>5</WarningLevel>
</PropertyGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net8.0' OR '$(TargetFramework)' == 'net8.0-android' OR '$(TargetFramework)' == 'net8.0-ios' OR '$(TargetFramework)' == 'net8.0-maccatalyst' OR '$(TargetFramework)' == 'net8.0-windows10.0.19041.0' ">
<PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiVersion)" />
</ItemGroup>
<ItemGroup>
<!-- App Icon -->
<MauiIcon Include="Resources\AppIcon\appicon.svg" ForegroundFile="Resources\AppIcon\appiconfg.svg" Color="#4822E3" />
@ -79,14 +83,14 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="SampleBrowser.Maui.Base" version="23.1.36" />
<PackageReference Include="Syncfusion.Maui.Core" version="23.1.36" />
<PackageReference Include="Syncfusion.Maui.DataSource" version="23.1.36" />
<PackageReference Include="Syncfusion.Maui.GridCommon" version="23.1.36" />
<PackageReference Include="Syncfusion.Maui.Inputs" version="23.1.36" />
<PackageReference Include="Syncfusion.Maui.ListView" version="23.1.36" />
<PackageReference Include="Syncfusion.Maui.TabView" version="23.1.36" />
<PackageReference Include="Syncfusion.Maui.DataForm" version="23.1.36" />
<PackageReference Include="Syncfusion.Maui.SignaturePad" version="23.1.36" />
<PackageReference Include="SampleBrowser.Maui.Base" version="23.2.4" />
<PackageReference Include="Syncfusion.Maui.Core" version="23.2.4" />
<PackageReference Include="Syncfusion.Maui.DataSource" version="23.2.4" />
<PackageReference Include="Syncfusion.Maui.GridCommon" version="23.2.4" />
<PackageReference Include="Syncfusion.Maui.Inputs" version="23.2.4" />
<PackageReference Include="Syncfusion.Maui.ListView" version="23.2.4" />
<PackageReference Include="Syncfusion.Maui.TabView" version="23.2.4" />
<PackageReference Include="Syncfusion.Maui.DataForm" version="23.2.4" />
<PackageReference Include="Syncfusion.Maui.SignaturePad" version="23.2.4" />
</ItemGroup>
</Project>

Просмотреть файл

@ -72,7 +72,7 @@ using Syncfusion.Maui.SignaturePad;
dataFormItemView.HeightRequest = 230;
#elif WINDOWS
border.HeightRequest = 130;
dataFormItemView.HeightRequest = 170;
dataFormItemView.HeightRequest = 180;
#else
border.HeightRequest = 140;
dataFormItemView.HeightRequest = 210;

Просмотреть файл

@ -67,7 +67,7 @@
<Image Source="{converters:SfImageResource facebook.png}" Aspect="AspectFit" Margin="20, 10" WidthRequest="{OnPlatform Default=50, WinUI=40, MacCatalyst=40}" />
<Image Source="{converters:SfImageResource microsoft.png}" Aspect="AspectFit" Margin="20, 10" WidthRequest="{OnPlatform Default=50, WinUI=40, MacCatalyst=40}" />
</HorizontalStackLayout>
<dataForm:SfDataForm x:Name="signInForm" Grid.Row="2" DataObject="{Binding SignInFormModel}"
<dataForm:SfDataForm x:Name="signInForm" Grid.Row="2" DataObject="{Binding SignInFormModel}" MinimumHeightRequest="{OnPlatform WinUI=100}"
LayoutType="TextInputLayout"
ValidationMode="PropertyChanged" >
<dataForm:SfDataForm.TextInputLayoutSettings>

Просмотреть файл

@ -26,10 +26,9 @@ namespace SampleBrowser.Maui.Services
stream.CopyTo(fileStream);
fileStream.Flush();
fileStream.Dispose();
#pragma warning disable CA1416 //This call site is reachable on: 'iOS' 14.2 and later, 'maccatalyst' 14.2 and later. 'UIApplication.KeyWindow.get' is unsupported on: 'ios' 13.0 and later, 'maccatalyst' 13.0 and later.
//Launch the file
UIViewController? currentController = UIApplication.SharedApplication!.KeyWindow!.RootViewController;
#pragma warning restore CA1416 //This call site is reachable on: 'iOS' 14.2 and later, 'maccatalyst' 14.2 and later. 'UIApplication.KeyWindow.get' is unsupported on: 'ios' 13.0 and later, 'maccatalyst' 13.0 and later.
//Added this code to resolve the warning thrown when CI compiles.
UIViewController? currentController = UIApplication.SharedApplication.ConnectedScenes.OfType<UIWindowScene>().SelectMany(scene => scene.Windows).FirstOrDefault(window => window.IsKeyWindow)!.RootViewController;
while (currentController!.PresentedViewController != null)
currentController = currentController.PresentedViewController;
UIView? currentView = currentController.View;

Просмотреть файл

@ -34,9 +34,8 @@ namespace SampleBrowser.Maui.Services
}
if (contentType != "application/html" || exception == string.Empty)
{
#pragma warning disable CA1416 //This call site is reachable on: 'iOS' 14.2 and later, 'maccatalyst' 14.2 and later. 'UIApplication.KeyWindow.get' is unsupported on: 'ios' 13.0 and later, 'maccatalyst' 13.0 and later.
UIViewController? currentController = UIApplication.SharedApplication!.KeyWindow!.RootViewController;
#pragma warning restore CA1416 //This call site is reachable on: 'iOS' 14.2 and later, 'maccatalyst' 14.2 and later. 'UIApplication.KeyWindow.get' is unsupported on: 'ios' 13.0 and later, 'maccatalyst' 13.0 and later.
//Added this code to resolve the warning thrown when CI compiles.
UIViewController? currentController = UIApplication.SharedApplication.ConnectedScenes.OfType<UIWindowScene>().SelectMany(scene => scene.Windows).FirstOrDefault(window => window.IsKeyWindow)!.RootViewController;
while (currentController!.PresentedViewController != null)
currentController = currentController.PresentedViewController;

Просмотреть файл

@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net6.0-android;net6.0-ios;net6.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net6.0-windows10.0.19041.0</TargetFrameworks>
<TargetFrameworks>net8.0-android;net8.0-ios;net8.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net8.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);net6.0-tizen</TargetFrameworks> -->
<OutputType>Exe</OutputType>
@ -55,6 +55,10 @@
<WarningLevel>5</WarningLevel>
</PropertyGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net8.0' OR '$(TargetFramework)' == 'net8.0-android' OR '$(TargetFramework)' == 'net8.0-ios' OR '$(TargetFramework)' == 'net8.0-maccatalyst' OR '$(TargetFramework)' == 'net8.0-windows10.0.19041.0' ">
<PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiVersion)" />
</ItemGroup>
<ItemGroup>
<!-- App Icon -->
<MauiIcon Include="Resources\AppIcon\appicon.svg" ForegroundFile="Resources\AppIcon\appiconfg.svg" Color="#4822E3" />
@ -76,17 +80,17 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="SampleBrowser.Maui.Base" version="23.1.36" />
<PackageReference Include="Syncfusion.Maui.DataGrid" version="23.1.36" />
<PackageReference Include="Syncfusion.Maui.Core" version="23.1.36" />
<PackageReference Include="Syncfusion.Maui.Data" version="23.1.36" />
<PackageReference Include="Syncfusion.Maui.DataSource" version="23.1.36" />
<PackageReference Include="Syncfusion.Maui.GridCommon" version="23.1.36" />
<PackageReference Include="Syncfusion.Maui.Inputs" version="23.1.36" />
<PackageReference Include="Syncfusion.Maui.ListView" version="23.1.36" />
<PackageReference Include="Syncfusion.Maui.TabView" version="23.1.36" />
<PackageReference Include="Syncfusion.PDF.NET" version="23.1.36" />
<PackageReference Include="Syncfusion.XlsIO.NET" version="23.1.36" />
<PackageReference Include="Syncfusion.Maui.DataGridExport" version="23.1.36" />
<PackageReference Include="SampleBrowser.Maui.Base" version="23.2.4" />
<PackageReference Include="Syncfusion.Maui.DataGrid" version="23.2.4" />
<PackageReference Include="Syncfusion.Maui.Core" version="23.2.4" />
<PackageReference Include="Syncfusion.Maui.Data" version="23.2.4" />
<PackageReference Include="Syncfusion.Maui.DataSource" version="23.2.4" />
<PackageReference Include="Syncfusion.Maui.GridCommon" version="23.2.4" />
<PackageReference Include="Syncfusion.Maui.Inputs" version="23.2.4" />
<PackageReference Include="Syncfusion.Maui.ListView" version="23.2.4" />
<PackageReference Include="Syncfusion.Maui.TabView" version="23.2.4" />
<PackageReference Include="Syncfusion.PDF.NET" version="23.2.4" />
<PackageReference Include="Syncfusion.XlsIO.NET" version="23.2.4" />
<PackageReference Include="Syncfusion.Maui.DataGridExport" version="23.2.4" />
</ItemGroup>
</Project>

Просмотреть файл

@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ActiveDebugFramework>net6.0-android</ActiveDebugFramework>
<ActiveDebugFramework>net8.0-windows10.0.19041.0</ActiveDebugFramework>
<IsFirstTimeProjectOpen>False</IsFirstTimeProjectOpen>
<ActiveDebugProfile>Motorola Moto G (5S) Plus (Android 8.1 - API 27)</ActiveDebugProfile>
<SelectedPlatformGroup>PhysicalDevice</SelectedPlatformGroup>
<DefaultDevice>pixel_2_r_11_0_-_api_30</DefaultDevice>
<ActiveDebugProfile>Windows Machine</ActiveDebugProfile>
<SelectedPlatformGroup>Emulator</SelectedPlatformGroup>
<DefaultDevice>pixel_5_-_api_33</DefaultDevice>
</PropertyGroup>
</Project>

Просмотреть файл

@ -11,11 +11,6 @@
<local:OrderInfoViewModel>
</local:OrderInfoViewModel>
</localCore:SampleView.BindingContext>
<localCore:SampleView.Resources>
<OnPlatform x:Key="margin" x:TypeArguments="Thickness">
<On Platform="WinUI,MacCatalyst" Value="-5.5,-5,-5,-7"/>
</OnPlatform>
</localCore:SampleView.Resources>
<localCore:SampleView.Behaviors>
<local:ColumnSizingBehavior />
</localCore:SampleView.Behaviors>
@ -25,7 +20,7 @@
AutoGenerateColumnsMode="None"
HeaderRowHeight="52"
RowHeight="48"
Margin="{StaticResource margin}"
Margin='{OnPlatform WinUI="-5.5,-5,-5,-7",MacCatalyst="-5.5,-5,-5,-7"}'
HorizontalScrollBarVisibility="Always"
VerticalScrollBarVisibility="Always"
ItemsSource="{Binding OrdersInfo}"

Просмотреть файл

@ -14,20 +14,20 @@
<localCore:SampleView.Resources>
<ResourceDictionary>
<local:ConditionalStylingConverter x:Key="customstyle"/>
<local:ConditionalStylingForegroundConverter x:Key="foreGroundColor"></local:ConditionalStylingForegroundConverter>
<OnPlatform x:Key="maximumWidth"
x:TypeArguments="x:Double">
<On Platform="Android,iOS">
<OnIdiom x:TypeArguments="x:Double"
Phone="150"
Tablet="300"/>
</On>
<On Platform="WinUI,MacCatalyst" Value="300"></On>
</OnPlatform>
<OnPlatform x:Key="margin" x:TypeArguments="Thickness">
<On Platform="WinUI,MacCatalyst" Value="-5.5,-5,-7,-7"/>
</OnPlatform>
<local:ConditionalStylingForegroundConverter x:Key="foreGroundColor"></local:ConditionalStylingForegroundConverter>
</ResourceDictionary>
<OnPlatform x:Key="maximumWidth"
x:TypeArguments="x:Double">
<On Platform="Android,iOS">
<OnIdiom x:TypeArguments="x:Double"
Phone="150"
Tablet="300"/>
</On>
<On Platform="WinUI,MacCatalyst" Value="300"></On>
</OnPlatform>
<OnPlatform x:Key="margin" x:TypeArguments="Thickness">
<On Platform="WinUI,MacCatalyst" Value="-5.5,-5,-7,-7"/>
</OnPlatform>
</localCore:SampleView.Resources>
<localCore:SampleView.Content>

Просмотреть файл

@ -11,12 +11,6 @@
<localCore:SampleView.BindingContext>
<local:OrderInfoViewModel />
</localCore:SampleView.BindingContext>
<localCore:SampleView.Resources>
<OnPlatform x:Key="margin" x:TypeArguments="Thickness">
<On Platform="WinUI,MacCatalyst" Value="-5.5,-5,-5,-7"/>
</OnPlatform>
</localCore:SampleView.Resources>
<localCore:SampleView.Behaviors>
<local:DataBindingBehavior />
@ -26,7 +20,7 @@
<sfgrid:SfDataGrid
x:Name="dataGrid"
Margin="{StaticResource margin}"
Margin='{OnPlatform WinUI="-5.5,-5,-5,-7",MacCatalyst="-5.5,-5,-5,-7"}'
AutoGenerateColumnsMode="None"
HeaderRowHeight="52"
RowHeight="48"

Просмотреть файл

@ -7,20 +7,14 @@
xmlns:localCore="clr-namespace:SampleBrowser.Maui.Base;assembly=SampleBrowser.Maui.Base"
xmlns:sfgrid="clr-namespace:Syncfusion.Maui.DataGrid;assembly=Syncfusion.Maui.DataGrid"
BackgroundColor="White">
<localCore:SampleView.BindingContext>
<local:OrderInfoViewModel />
</localCore:SampleView.BindingContext>
<localCore:SampleView.Resources>
<OnPlatform x:Key="margin" x:TypeArguments="Thickness">
<On Platform="WinUI,MacCatalyst" Value="-5.5,-5,0,-7"/>
</OnPlatform>
</localCore:SampleView.Resources>
<localCore:SampleView.Content>
<sfgrid:SfDataGrid
Margin="{StaticResource margin}"
Margin='{OnPlatform WinUI="-5.5,-5,0,-7",MacCatalyst="-5.5,-5,0,-7"}'
x:Name="dataGrid"
AutoGenerateColumnsMode="None"
HeaderRowHeight="52"

Просмотреть файл

@ -23,9 +23,9 @@ namespace SampleBrowser.Maui.DataGrid
/// <param name="culture">The culture to use during the conversion.</param>
/// <summary>Implement this method to convert <paramref name="value" /> to <paramref name="targetType" /> by using <paramref name="parameter" /> and <paramref name="culture" />.</summary>
/// <returns>To be added.</returns>
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
public object? Convert(object? value, Type targetType, object? parameter, System.Globalization.CultureInfo culture)
{
double valueNew = (double)value;
double valueNew = (double)value!;
string? columnName = parameter!.ToString();
if (columnName!.Equals("QS1"))
{
@ -79,7 +79,7 @@ namespace SampleBrowser.Maui.DataGrid
/// <param name="culture">The culture to use during the conversion.</param>
/// <summary> Implement this method to convert <paramref name="value" /> back from <paramref name="targetType" /> by using <paramref name="parameter" /> and <paramref name="culture" />.</summary>
/// <returns> To be added.</returns>
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
public object ConvertBack(object? value, Type targetType, object? parameter, System.Globalization.CultureInfo culture)
{
throw new NotImplementedException();
}

Просмотреть файл

@ -21,9 +21,9 @@ namespace SampleBrowser.Maui.DataGrid
/// <param name="culture">The culture to use during the conversion.</param>
/// <summary>Implement this method to convert <paramref name="value" /> to <paramref name="targetType" /> by using <paramref name="parameter" /> and <paramref name="culture" />.</summary>
/// <returns>To be added.</returns>
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
public object? Convert(object? value, Type targetType, object? parameter, System.Globalization.CultureInfo culture)
{
double valueNew = (double)value;
double valueNew = (double)value!;
if (valueNew < 6500 && valueNew > 2000)
{
return Colors.Black;
@ -40,7 +40,7 @@ namespace SampleBrowser.Maui.DataGrid
/// <param name="culture">The culture to use during the conversion.</param>
/// <summary> Implement this method to convert <paramref name="value" /> back from <paramref name="targetType" /> by using <paramref name="parameter" /> and <paramref name="culture" />.</summary>
/// <returns> To be added.</returns>
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
public object? ConvertBack(object? value, Type targetType, object? parameter, System.Globalization.CultureInfo culture)
{
return value;
}

Просмотреть файл

@ -28,7 +28,7 @@ namespace SampleBrowser.Maui.DataGrid
/// <param name="culture">The culture to use during the conversion.</param>
/// <summary>Implement this method to convert <paramref name="value" /> to <paramref name="targetType" /> by using <paramref name="parameter" /> and <paramref name="culture" />.</summary>
/// <returns>To be added.</returns>
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
{
this.data = double.Parse(value!.ToString()!.ToCharArray());
var fontFamily = GetFontFamily();
@ -74,7 +74,7 @@ namespace SampleBrowser.Maui.DataGrid
/// <param name="culture">The culture to use during the conversion.</param>
/// <summary> Implement this method to convert <paramref name="value" /> back from <paramref name="targetType" /> by using <paramref name="parameter" /> and <paramref name="culture" />.</summary>
/// <returns> To be added.</returns>
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
public object? ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
{
return this.data!;
}

Просмотреть файл

@ -24,7 +24,7 @@ namespace SampleBrowser.Maui.DataGrid
/// <param name="info">The culture to use during the conversion.</param>
/// <summary>Implement this method to convert <paramref name="value" /> to <paramref name="targetType" /> by using <paramref name="parameter" /> and <paramref name="info" />.</summary>
/// <returns>To be added.</returns>
object IValueConverter.Convert(object value, Type targetType, object parameter, CultureInfo info)
object? IValueConverter.Convert(object? value, Type targetType, object? parameter, CultureInfo info)
{
var data = value as double?;
if (data != null && data > 10)
@ -43,7 +43,7 @@ namespace SampleBrowser.Maui.DataGrid
/// <param name="info">The culture to use during the conversion.</param>
/// <summary> Implement this method to convert <paramref name="value" /> back from <paramref name="targetType" /> by using <paramref name="parameter" /> and <paramref name="info" />.</summary>
/// <returns> To be added.</returns>
object IValueConverter.ConvertBack(object value, Type targetType, object parameter, CultureInfo info)
object? IValueConverter.ConvertBack(object? value, Type targetType, object? parameter, CultureInfo info)
{
throw new NotImplementedException();
}

Просмотреть файл

@ -14,28 +14,28 @@
<localCore:SampleView.Resources>
<ResourceDictionary>
<local:TextForegroundConverter x:Key="textForegroundConverter" />
<local:ImageConverter x:Key="imageConverter" />
<OnPlatform x:Key="minimumWidth"
x:TypeArguments="x:Double">
<On Platform="Android,WinUI,iOS">
<OnIdiom x:TypeArguments="x:Double"
Phone="20"
Tablet="70"/>
</On>
</OnPlatform>
<OnPlatform x:Key="width"
x:TypeArguments="x:Double">
<On Platform="Android,WinUI,iOS,MacCatalyst">
<OnIdiom x:TypeArguments="x:Double"
Phone="80"
Tablet="140"
Desktop="170" />
</On>
</OnPlatform>
<OnPlatform x:Key="margin" x:TypeArguments="Thickness">
<On Platform="WinUI,MacCatalyst" Value="-5.5,-5,-7,-7"/>
</OnPlatform>
<local:ImageConverter x:Key="imageConverter" />
</ResourceDictionary>
<OnPlatform x:Key="minimumWidth"
x:TypeArguments="x:Double">
<On Platform="Android,WinUI,iOS">
<OnIdiom x:TypeArguments="x:Double"
Phone="20"
Tablet="70"/>
</On>
</OnPlatform>
<OnPlatform x:Key="width"
x:TypeArguments="x:Double">
<On Platform="Android,WinUI,iOS,MacCatalyst">
<OnIdiom x:TypeArguments="x:Double"
Phone="80"
Tablet="140"
Desktop="170" />
</On>
</OnPlatform>
<OnPlatform x:Key="margin" x:TypeArguments="Thickness">
<On Platform="WinUI,MacCatalyst" Value="-5.5,-5,-7,-7"/>
</OnPlatform>
</localCore:SampleView.Resources>
<localCore:SampleView.Content>
<sfgrid:SfDataGrid x:Name="dataGrid"

Просмотреть файл

@ -10,13 +10,7 @@
<localCore:SampleView.BindingContext>
<local:OrderInfoViewModel>
</local:OrderInfoViewModel>
</localCore:SampleView.BindingContext>
<localCore:SampleView.Resources>
<OnPlatform x:Key="margin" x:TypeArguments="Thickness">
<On Platform="WinUI,MacCatalyst" Value="-5.5,-5,-7,-7"/>
</OnPlatform>
</localCore:SampleView.Resources>
</localCore:SampleView.BindingContext>
<localCore:SampleView.Behaviors>
<local:SelectionBehavior />
@ -25,7 +19,7 @@
<localCore:SampleView.Content>
<sfgrid:SfDataGrid x:Name="dataGrid"
Margin="{StaticResource margin}"
Margin='{OnPlatform WinUI="-5.5,-5,-7,-7",MacCatalyst="-5.5,-5,-7,-7"}'
AutoGenerateColumnsMode="None"
HeaderRowHeight="52"
SelectionMode="Multiple" NavigationMode="Row" SelectedRows="{Binding DataGridSelectedItems}"

Просмотреть файл

@ -26,18 +26,37 @@ namespace SampleBrowser.Maui.DocIO.Services
stream.CopyTo(fileStream);
fileStream.Flush();
fileStream.Dispose();
#pragma warning disable CA1416 //This call site is reachable on: 'iOS' 14.2 and later, 'maccatalyst' 14.2 and later. 'UIApplication.KeyWindow.get' is unsupported on: 'ios' 13.0 and later, 'maccatalyst' 13.0 and later.
//Launch the file
UIViewController? currentController = UIApplication.SharedApplication!.KeyWindow!.RootViewController;
#pragma warning restore CA1416 //This call site is reachable on: 'iOS' 14.2 and later, 'maccatalyst' 14.2 and later. 'UIApplication.KeyWindow.get' is unsupported on: 'ios' 13.0 and later, 'maccatalyst' 13.0 and later.
while (currentController!.PresentedViewController != null)
currentController = currentController.PresentedViewController;
UIView? currentView = currentController.View;
UIWindow? window = GetKeyWindow();
if (window != null && window.RootViewController != null)
{
UIViewController? uiViewController = window.RootViewController;
if (uiViewController != null)
{
QLPreviewController qlPreview = new();
QLPreviewItem item = new QLPreviewItemBundle(filename, filePath);
qlPreview.DataSource = new PreviewControllerDS(item);
uiViewController.PresentViewController((UIViewController)qlPreview, true, null);
}
}
QLPreviewController qlPreview = new();
QLPreviewItem item = new QLPreviewItemBundle(filename, filePath);
qlPreview.DataSource = new PreviewControllerDS(item);
currentController.PresentViewController((UIViewController)qlPreview, true, null);
}
public UIWindow? GetKeyWindow()
{
foreach (var scene in UIApplication.SharedApplication.ConnectedScenes)
{
if (scene is UIWindowScene windowScene)
{
foreach (var window in windowScene.Windows)
{
if (window.IsKeyWindow)
{
return window;
}
}
}
}
return null;
}
}
}

Просмотреть файл

@ -36,7 +36,7 @@ public partial class App : MauiWinUIApplication
protected override void OnLaunched(LaunchActivatedEventArgs args)
{
base.OnLaunched(args);
foreach (var item in Application.Windows)
foreach (var item in IPlatformApplication.Current!.Application.Windows)
{
var platformWindow = (item?.Handler?.PlatformView as Microsoft.UI.Xaml.Window);

Просмотреть файл

@ -34,19 +34,36 @@ namespace SampleBrowser.Maui.DocIO.Services
}
if (contentType != "application/html" || exception == string.Empty)
{
#pragma warning disable CA1416 //This call site is reachable on: 'iOS' 14.2 and later, 'maccatalyst' 14.2 and later. 'UIApplication.KeyWindow.get' is unsupported on: 'ios' 13.0 and later, 'maccatalyst' 13.0 and later.
#pragma warning disable CA1422 // Validate platform compatibility
UIViewController? currentController = UIApplication.SharedApplication!.KeyWindow!.RootViewController;
#pragma warning disable CA1422 // Validate platform compatibility
#pragma warning restore CA1416 //This call site is reachable on: 'iOS' 14.2 and later, 'maccatalyst' 14.2 and later. 'UIApplication.KeyWindow.get' is unsupported on: 'ios' 13.0 and later, 'maccatalyst' 13.0 and later.
while (currentController!.PresentedViewController != null)
currentController = currentController.PresentedViewController;
QLPreviewController qlPreview = new();
QLPreviewItem item = new QLPreviewItemBundle(filename, filePath);
qlPreview.DataSource = new PreviewControllerDS(item);
currentController.PresentViewController((UIViewController)qlPreview, true, null);
UIWindow? window = GetKeyWindow();
if (window != null && window.RootViewController != null)
{
UIViewController? uiViewController = window.RootViewController;
if (uiViewController != null)
{
QLPreviewController qlPreview = new();
QLPreviewItem item = new QLPreviewItemBundle(filename, filePath);
qlPreview.DataSource = new PreviewControllerDS(item);
uiViewController.PresentViewController((UIViewController)qlPreview, true, null);
}
}
}
}
public UIWindow? GetKeyWindow()
{
foreach (var scene in UIApplication.SharedApplication.ConnectedScenes)
{
if (scene is UIWindowScene windowScene)
{
foreach (var window in windowScene.Windows)
{
if (window.IsKeyWindow)
{
return window;
}
}
}
}
return null;
}
}
}

Просмотреть файл

@ -1,10 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net6.0-android;net6.0-ios;net6.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net6.0-windows10.0.19041.0</TargetFrameworks>
<TargetFrameworks>net8.0-android;net8.0-ios;net8.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net8.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);net6.0-tizen</TargetFrameworks> -->
<!-- <TargetFrameworks>$(TargetFrameworks);net8.0-tizen</TargetFrameworks> -->
<OutputType>Exe</OutputType>
<RootNamespace>SampleBrowser.Maui.DocIO</RootNamespace>
<UseMaui>true</UseMaui>
@ -51,6 +51,10 @@
<WarningLevel>5</WarningLevel>
</PropertyGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net8.0' OR '$(TargetFramework)' == 'net8.0-android' OR '$(TargetFramework)' == 'net8.0-ios' OR '$(TargetFramework)' == 'net8.0-maccatalyst' OR '$(TargetFramework)' == 'net8.0-windows10.0.19041.0' ">
<PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiVersion)" />
</ItemGroup>
<ItemGroup>
<!-- App Icon -->
<MauiIcon Include="Resources\AppIcon\appicon.svg" ForegroundFile="Resources\AppIcon\appiconfg.svg" Color="#4822E3" />
@ -76,10 +80,10 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="SampleBrowser.Maui.Base" version="23.1.36" />
<PackageReference Include="Syncfusion.Maui.Core" version="23.1.36" />
<PackageReference Include="Syncfusion.DocIORenderer.NET" version="23.1.36" />
<PackageReference Include="Syncfusion.Maui.TabView" version="23.1.36" />
<PackageReference Include="SampleBrowser.Maui.Base" version="23.2.4" />
<PackageReference Include="Syncfusion.Maui.Core" version="23.2.4" />
<PackageReference Include="Syncfusion.DocIORenderer.NET" version="23.2.4" />
<PackageReference Include="Syncfusion.Maui.TabView" version="23.2.4" />
</ItemGroup>
<ItemGroup>

Просмотреть файл

@ -11,22 +11,5 @@
<iconUrl>http://www.syncfusion.com/content/images/nuget/sync_logo_icon.png</iconUrl>
<description>DocIO component for Syncfusion .NET MAUI</description>
<copyright>Copyright 2001 - 2019 Syncfusion Inc.</copyright>
<dependencies>
<group targetFramework="net6.0">
<dependency id="Microsoft.Maui.Dependencies" version="*" exclude="Build,Analyzers" />
</group>
<group targetFramework="net6.0-android30.0">
<dependency id="Microsoft.Maui.Dependencies" version="*" exclude="Build,Analyzers" />
</group>
<group targetFramework="net6.0-ios13.6">
<dependency id="Microsoft.Maui.Dependencies" version="*" exclude="Build,Analyzers" />
</group>
<group targetFramework="net6.0-maccatalyst13.5">
<dependency id="Microsoft.Maui.Dependencies" version="*" exclude="Build,Analyzers" />
</group>
<group targetFramework="net6.0-windows10.0.19041.0">
<dependency id="Microsoft.Maui.Dependencies" version="*" exclude="Build,Analyzers" />
</group>
</dependencies>
</metadata>
</package>

Просмотреть файл

@ -36,14 +36,17 @@ public partial class App : MauiWinUIApplication
protected override void OnLaunched(LaunchActivatedEventArgs args)
{
base.OnLaunched(args);
foreach (var item in Application.Windows)
if (IPlatformApplication.Current != null)
{
var platformWindow = (item?.Handler?.PlatformView as Microsoft.UI.Xaml.Window);
if (platformWindow != null)
foreach (var item in IPlatformApplication.Current.Application.Windows)
{
platformWindow.ExtendsContentIntoTitleBar = false;
platformWindow.Title = ".NET MAUI Effects View Demo";
var platformWindow = (item?.Handler?.PlatformView as Microsoft.UI.Xaml.Window);
if (platformWindow != null)
{
platformWindow.ExtendsContentIntoTitleBar = false;
platformWindow.Title = ".NET MAUI Effects View Demo";
}
}
}
}

Просмотреть файл

@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net6.0-android;net6.0-ios;net6.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net6.0-windows10.0.19041.0</TargetFrameworks>
<TargetFrameworks>net8.0-android;net8.0-ios;net8.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net8.0-windows10.0.19041.0</TargetFrameworks>
<OutputType>Exe</OutputType>
<RootNamespace>SampleBrowser.Maui.EffectsView</RootNamespace>
<UseMaui>true</UseMaui>
@ -53,6 +53,10 @@
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<WarningLevel>5</WarningLevel>
</PropertyGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net8.0' OR '$(TargetFramework)' == 'net8.0-android' OR '$(TargetFramework)' == 'net8.0-ios' OR '$(TargetFramework)' == 'net8.0-maccatalyst' OR '$(TargetFramework)' == 'net8.0-windows10.0.19041.0' ">
<PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiVersion)" />
</ItemGroup>
<ItemGroup>
<!-- App Icon -->
@ -80,9 +84,9 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="SampleBrowser.Maui.Base" version="23.1.36" />
<PackageReference Include="Syncfusion.Maui.Core" version="23.1.36" />
<PackageReference Include="Syncfusion.Maui.TabView" version="23.1.36" />
<PackageReference Include="SampleBrowser.Maui.Base" version="23.2.4" />
<PackageReference Include="Syncfusion.Maui.Core" version="23.2.4" />
<PackageReference Include="Syncfusion.Maui.TabView" version="23.2.4" />
</ItemGroup>
<ItemGroup>

Просмотреть файл

@ -8,7 +8,7 @@
BackgroundColor="#FAFAFA">
<localCore:SampleView.Content>
<StackLayout Padding="10" Spacing="10" HorizontalOptions="Center" VerticalOptions="Center">
<Border x:Name="rippleEffectBorder" Padding="0">
<Border x:Name="rippleEffectBorder" Padding="0" Background="Transparent">
<Border.StrokeShape>
<RoundRectangle CornerRadius="20" />
</Border.StrokeShape>

Просмотреть файл

@ -92,13 +92,17 @@ namespace SampleBrowser.Maui.EffectsView.SfEffectsView
public class VisibilityConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
{
Syncfusion.Maui.Core.SfEffectsView effectsView = (Syncfusion.Maui.Core.SfEffectsView)parameter;
return effectsView.ScaleFactor == 1;
if(parameter != null)
{
Syncfusion.Maui.Core.SfEffectsView effectsView = (Syncfusion.Maui.Core.SfEffectsView)parameter;
return effectsView.ScaleFactor == 1;
}
return null;
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
public object? ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
{
return value;
}

Просмотреть файл

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?>
<SyncfusionControls>
<ControlCategory Name="Layouts">
<Control Title="Expander" ControlName="SfExpander" Image="expander.png" Description="Expander is a layout control for loading UI views in header and content sections, allowing users to easily expand or collapse it with a tap.">
<Control Title="Expander" ControlName="SfExpander" Image="expander.png" Description="Expander is a layout control for toggling UI views in header and content sections with a tap.">
<Sample SearchTags="GettingStarted" SampleName="GettingStarted" Title="Getting Started" CodeViewerPath="Expander/GettingStarted/" />
</Control>
</ControlCategory>

Просмотреть файл

@ -27,5 +27,24 @@ public partial class App : MauiWinUIApplication
}
protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
protected override void OnLaunched(LaunchActivatedEventArgs args)
{
base.OnLaunched(args);
if (IPlatformApplication.Current != null)
{
foreach (var item in IPlatformApplication.Current.Application.Windows)
{
var platformWindow = (item?.Handler?.PlatformView as Microsoft.UI.Xaml.Window);
if (platformWindow != null)
{
platformWindow.ExtendsContentIntoTitleBar = false;
platformWindow.Title = ".NET MAUI Expander Demo";
}
}
}
}
}

Просмотреть файл

@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net6.0-android;net6.0-ios;net6.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net6.0-windows10.0.19041.0</TargetFrameworks>
<TargetFrameworks>net8.0-android;net8.0-ios;net8.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net8.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);net6.0-tizen</TargetFrameworks> -->
<OutputType>Exe</OutputType>
@ -54,6 +54,10 @@
<WarningLevel>5</WarningLevel>
</PropertyGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net8.0' OR '$(TargetFramework)' == 'net8.0-android' OR '$(TargetFramework)' == 'net8.0-ios' OR '$(TargetFramework)' == 'net8.0-maccatalyst' OR '$(TargetFramework)' == 'net8.0-windows10.0.19041.0' ">
<PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiVersion)" />
</ItemGroup>
<ItemGroup>
<!-- App Icon -->
<MauiIcon Include="Resources\AppIcon\appicon.svg" ForegroundFile="Resources\AppIcon\appiconfg.svg" Color="#4822E3" />
@ -85,10 +89,10 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Syncfusion.Maui.Core" version="23.1.36" />
<PackageReference Include="Syncfusion.Maui.Expander" version="23.1.36" />
<PackageReference Include="Syncfusion.Maui.TabView" version="23.1.36" />
<PackageReference Include="SampleBrowser.Maui.Base" version="23.1.36" />
<PackageReference Include="Syncfusion.Maui.Core" version="23.2.4" />
<PackageReference Include="Syncfusion.Maui.Expander" version="23.2.4" />
<PackageReference Include="Syncfusion.Maui.TabView" version="23.2.4" />
<PackageReference Include="SampleBrowser.Maui.Base" version="23.2.4" />
</ItemGroup>
</Project>

Просмотреть файл

@ -19,6 +19,10 @@
<Compile Include="$(MSBuildThisFileDirectory)\Samples\Expander\GettingStarted\Helper\Behavior.cs">
<Link>Samples\Expander\GettingStarted\Helper\Behavior.cs</Link>
</Compile>
<Compile Include="$(MSBuildThisFileDirectory)\Samples\Expander\GettingStarted\Helper\ExpanderScrollView.cs">
<Link>Samples\Expander\GettingStarted\Helper\ExpanderScrollView.cs</Link>
</Compile>
</ItemGroup>
<ItemGroup>

Просмотреть файл

@ -21,17 +21,17 @@ namespace SampleBrowser.Maui.Expander.SfExpander
private ScrollView? scrollView;
private StackLayout? stackLayout;
private Grid? Layout;
#endregion
#region Overrides
protected override void OnAttachedTo(SampleView bindable)
{
this.stackLayout = bindable.FindByName<StackLayout>("stackLayout");
this.Layout = bindable.FindByName<Grid>("layout");
this.scrollView = bindable.FindByName<ScrollView>("scrollView");
#if __MACCATALYST__
this.stackLayout!.SizeChanged += this.StackLayout_SizeChanged;
this.Layout!.SizeChanged += this.StackLayout_SizeChanged;
#endif
base.OnAttachedTo(bindable);
}
@ -46,9 +46,9 @@ namespace SampleBrowser.Maui.Expander.SfExpander
protected override void OnDetachingFrom(BindableObject bindable)
{
#if __MACCATALYST__
this.stackLayout!.SizeChanged -= this.StackLayout_SizeChanged;
this.Layout!.SizeChanged -= this.StackLayout_SizeChanged;
#endif
this.stackLayout = null;
this.Layout = null;
this.scrollView = null;
base.OnDetachingFrom(bindable);
}

Просмотреть файл

@ -0,0 +1,59 @@
#region Copyright Syncfusion Inc. 2001-2023.
// Copyright Syncfusion Inc. 2001-2023. All rights reserved.
// Use of this code is subject to the terms of our license.
// A copy of the current license can be obtained at any time by e-mailing
// licensing@syncfusion.com. Any infringement will be prosecuted under
// applicable laws.
#endregion
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Maui;
using Microsoft.Maui.Controls;
using Microsoft.Maui.Graphics;
using Microsoft.Maui.Layouts;
namespace SampleBrowser.Maui.Expander.SfExpander
{
/// <summary>
/// Represents to add expander items to scroll view.
/// </summary>
#if NET8_0_OR_GREATER && (IOS || MACCATALYST)
internal class ExpanderScrollView : ScrollView, ICrossPlatformLayout
#else
internal class ExpanderScrollView : ScrollView
#endif
{
public ExpanderScrollView()
{
}
#region Public Methods
#if NET8_0_OR_GREATER && (IOS || MACCATALYST)
/// <summary>
/// Override this method due to .net8 blank issue.
/// </summary>
/// <param name="bounds">Bounds for expander.</param>
/// <returns>Size of scroll view.</returns>
Size ICrossPlatformLayout.CrossPlatformArrange(Microsoft.Maui.Graphics.Rect bounds)
{
// 855697 - Checked, from where expander bounds changes and override this method.
// from ScrollViewHandler ICrossPlatformLayout.CrossPlatformArrange native bounds used instead of frame.
if (this is IScrollView scrollView)
{
bounds.X = 0;
bounds.Y = 0;
return scrollView.ArrangeContentUnbounded(bounds);
}
return bounds.Size;
}
#endif
#endregion
}
}

Просмотреть файл

@ -30,23 +30,28 @@
<Label Text="Invoice" Margin="{OnPlatform MacCatalyst='-100,200,0,0'}"
FontSize="30" WidthRequest="300" FontAttributes="Bold" TextColor="White" Grid.Row="1" />
</Grid>
<Frame BorderColor="Transparent"
Grid.ColumnSpan="{OnPlatform Default=2, WinUI=1,MacCatalyst=1}"
Grid.Column="{OnPlatform Default=0,WinUI=1,MacCatalyst=1}" CornerRadius="10"
VerticalOptions="{OnPlatform Default=Start, WinUI=Center, MacCatalyst=Center}" HasShadow="False"
MaximumWidthRequest="{OnPlatform WinUI=380, MacCatalyst=500}"
HorizontalOptions="{OnPlatform WinUI=Start,MacCatalyst=Start, Default=Fill}" >
<Frame.Padding>
<OnPlatform x:TypeArguments="thickness:Thickness">
<On Platform="MacCatalyst" Value="10"/>
<On Platform="WinUI" Value="10"/>
</OnPlatform>
</Frame.Padding>
<Grid IsClippedToBounds="True" WidthRequest="{OnPlatform WinUI=350}" HeightRequest="{OnPlatform WinUI=450,MacCatalyst=600}" VerticalOptions="{OnPlatform WinUI=Start, MacCatalyst=Start}" >
<ScrollView x:Name="scrollView">
<StackLayout x:Name="stackLayout" HorizontalOptions="{OnPlatform MacCatalyst=Center,WinUI=Center}" >
<Label Text="Invoice: #FRU037020142097" Margin="{OnPlatform Default='8,0,8,8',WinUI='8,0,6,8',MacCatalyst='8,0,6,8'}" HeightRequest="40" FontSize="16" FontFamily="Roboto-Regular" Opacity="1.0" VerticalTextAlignment="Center" FontAttributes="Bold" VerticalOptions="Center" HorizontalOptions="CenterAndExpand"/>
<Border Background='{OnPlatform Default="Transparent",MacCatalyst="White"}' StrokeShape="RoundRectangle 8,8,8,8" Margin="{OnPlatform Default='8,0,8,8',WinUI='8,0,6,8',MacCatalyst='8,0,6,8'}" Stroke="#CAC4D0" StrokeThickness="{OnPlatform MacCatalyst=2,Default=1}" WidthRequest="{OnPlatform MacCatalyst=460,WinUI=330}">
<Border Stroke="Transparent" Background="White"
Grid.ColumnSpan="{OnPlatform Default=2, WinUI=1,MacCatalyst=1}"
Grid.Column="{OnPlatform Default=0,WinUI=1,MacCatalyst=1}"
VerticalOptions="{OnPlatform Default=Fill, WinUI=Center, MacCatalyst=Center}"
HeightRequest="{OnPlatform WinUI=450, MacCatalyst=600}"
WidthRequest="{OnPlatform WinUI=350, MacCatalyst=480, Default=-1}"
HorizontalOptions="{OnPlatform WinUI=Start,MacCatalyst=Start, Default=Fill}">
<Border.StrokeShape>
<RoundRectangle CornerRadius="{OnPlatform Default=0,WinUI=10,MacCatalyst=10}" />
</Border.StrokeShape>
<Grid>
<local:ExpanderScrollView x:Name="scrollView">
<Grid x:Name="layout" HorizontalOptions="{OnPlatform MacCatalyst=Center,WinUI=Center}" >
<Grid.RowDefinitions>
<RowDefinition Height="40"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Label Grid.Row="0" Text="Invoice: #FRU037020142097" Margin="{OnPlatform Default='8,0,8,8',WinUI='8,0,6,8',MacCatalyst='8,0,6,8'}" HeightRequest="40" FontSize="16" FontFamily="Roboto-Regular" Opacity="1.0" VerticalTextAlignment="Center" FontAttributes="Bold" VerticalOptions="Center" HorizontalOptions="CenterAndExpand"/>
<Border Grid.Row="1" Background='{OnPlatform Default="Transparent",MacCatalyst="White"}' StrokeShape="RoundRectangle 8,8,8,8" Margin="{OnPlatform Default='8,0,8,8',WinUI='8,0,6,8',MacCatalyst='8,0,6,8'}" Stroke="#CAC4D0" StrokeThickness="{OnPlatform MacCatalyst=2,Default=1}" WidthRequest="{OnPlatform MacCatalyst=460,WinUI=330}">
<syncfusion:SfExpander AnimationDuration="200" IsExpanded="True" >
<syncfusion:SfExpander.Header>
<Grid >
@ -70,7 +75,7 @@
</syncfusion:SfExpander.Content>
</syncfusion:SfExpander>
</Border>
<Border Background='{OnPlatform Default="Transparent",MacCatalyst="White"}' StrokeShape="RoundRectangle 8,8,8,8" Margin="{OnPlatform Default='8,0,8,8',WinUI='8,0,6,8',MacCatalyst='8,0,6,8'}" Stroke="#CAC4D0" StrokeThickness="{OnPlatform MacCatalyst=2,Default=1}" WidthRequest="{OnPlatform MacCatalyst=460,WinUI=330}">
<Border Grid.Row="2" Background='{OnPlatform Default="Transparent",MacCatalyst="White"}' StrokeShape="RoundRectangle 8,8,8,8" Margin="{OnPlatform Default='8,0,8,8',WinUI='8,0,6,8',MacCatalyst='8,0,6,8'}" Stroke="#CAC4D0" StrokeThickness="{OnPlatform MacCatalyst=2,Default=1}" WidthRequest="{OnPlatform MacCatalyst=460,WinUI=330}">
<syncfusion:SfExpander AnimationDuration="200" IsExpanded="False">
<syncfusion:SfExpander.Header>
<Grid>
@ -130,7 +135,7 @@
</syncfusion:SfExpander.Content>
</syncfusion:SfExpander>
</Border>
<Border Background='{OnPlatform Default="Transparent",MacCatalyst="White"}' StrokeShape="RoundRectangle 8,8,8,8" Margin="{OnPlatform Default='8,0,8,8',WinUI='8,0,6,8',MacCatalyst='8,0,6,8'}" Stroke="#CAC4D0" StrokeThickness="{OnPlatform MacCatalyst=2,Default=1}" WidthRequest="{OnPlatform MacCatalyst=460,WinUI=330}">
<Border Grid.Row="3" Background='{OnPlatform Default="Transparent",MacCatalyst="White"}' StrokeShape="RoundRectangle 8,8,8,8" Margin="{OnPlatform Default='8,0,8,8',WinUI='8,0,6,8',MacCatalyst='8,0,6,8'}" Stroke="#CAC4D0" StrokeThickness="{OnPlatform MacCatalyst=2,Default=1}" WidthRequest="{OnPlatform MacCatalyst=460,WinUI=330}">
<syncfusion:SfExpander AnimationDuration="200" IsExpanded="False">
<syncfusion:SfExpander.Header>
<Grid>
@ -173,7 +178,7 @@
</syncfusion:SfExpander.Content>
</syncfusion:SfExpander>
</Border>
<Border Background='{OnPlatform Default="Transparent",MacCatalyst="White"}' StrokeShape="RoundRectangle 8,8,8,8" Margin="{OnPlatform Default='8,0,8,8',WinUI='8,0,6,8',MacCatalyst='8,0,6,8'}" Stroke="#CAC4D0" StrokeThickness="{OnPlatform MacCatalyst=2,Default=1}" WidthRequest="{OnPlatform MacCatalyst=460,WinUI=330}">
<Border Grid.Row="4" Background='{OnPlatform Default="Transparent",MacCatalyst="White"}' StrokeShape="RoundRectangle 8,8,8,8" Margin="{OnPlatform Default='8,0,8,8',WinUI='8,0,6,8',MacCatalyst='8,0,6,8'}" Stroke="#CAC4D0" StrokeThickness="{OnPlatform MacCatalyst=2,Default=1}" WidthRequest="{OnPlatform MacCatalyst=460,WinUI=330}">
<syncfusion:SfExpander AnimationDuration="200" IsExpanded="True">
<syncfusion:SfExpander.Header>
<Grid>
@ -209,10 +214,10 @@
</syncfusion:SfExpander.Content>
</syncfusion:SfExpander>
</Border>
</StackLayout>
</ScrollView>
</Grid>
</local:ExpanderScrollView>
</Grid>
</Frame>
</Border>
</Grid>
</localCore:SampleView.Content>
</localCore:SampleView>
</localCore:SampleView>

Просмотреть файл

@ -36,14 +36,17 @@ public partial class App : MauiWinUIApplication
protected override void OnLaunched(LaunchActivatedEventArgs args)
{
base.OnLaunched(args);
foreach (var item in Application.Windows)
if(IPlatformApplication.Current != null)
{
var platformWindow = (item?.Handler?.PlatformView as Microsoft.UI.Xaml.Window);
if (platformWindow != null)
foreach (var item in IPlatformApplication.Current.Application.Windows)
{
platformWindow.ExtendsContentIntoTitleBar = false;
platformWindow.Title = ".NET MAUI Funnel Chart Demo";
var platformWindow = (item?.Handler?.PlatformView as Microsoft.UI.Xaml.Window);
if (platformWindow != null)
{
platformWindow.ExtendsContentIntoTitleBar = false;
platformWindow.Title = ".NET MAUI Funnel Chart Demo";
}
}
}
}

Просмотреть файл

@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net6.0-android;net6.0-ios;net6.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net6.0-windows10.0.19041.0</TargetFrameworks>
<TargetFrameworks>net8.0-android;net8.0-ios;net8.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net8.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);net6.0-tizen</TargetFrameworks> -->
<OutputType>Exe</OutputType>
@ -55,6 +55,10 @@
<WarningLevel>5</WarningLevel>
</PropertyGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net8.0' OR '$(TargetFramework)' == 'net8.0-android' OR '$(TargetFramework)' == 'net8.0-ios' OR '$(TargetFramework)' == 'net8.0-maccatalyst' OR '$(TargetFramework)' == 'net8.0-windows10.0.19041.0' ">
<PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiVersion)" />
</ItemGroup>
<ItemGroup>
<!-- App Icon -->
<MauiIcon Include="Resources\AppIcon\appicon.svg" ForegroundFile="Resources\AppIcon\appiconfg.svg" Color="#4822E3" />
@ -85,10 +89,10 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="SampleBrowser.Maui.Base" version="23.1.36" />
<PackageReference Include="Syncfusion.Maui.Charts" version="23.1.36" />
<PackageReference Include="Syncfusion.Maui.Core" version="23.1.36" />
<PackageReference Include="Syncfusion.Maui.TabView" version="23.1.36" />
<PackageReference Include="SampleBrowser.Maui.Base" version="23.2.4" />
<PackageReference Include="Syncfusion.Maui.Charts" version="23.2.4" />
<PackageReference Include="Syncfusion.Maui.Core" version="23.2.4" />
<PackageReference Include="Syncfusion.Maui.TabView" version="23.2.4" />
</ItemGroup>
</Project>

Просмотреть файл

@ -36,14 +36,17 @@ public partial class App : MauiWinUIApplication
protected override void OnLaunched(LaunchActivatedEventArgs args)
{
base.OnLaunched(args);
foreach (var item in Application.Windows)
if (IPlatformApplication.Current != null)
{
var platformWindow = (item?.Handler?.PlatformView as Microsoft.UI.Xaml.Window);
if (platformWindow != null)
foreach (var item in IPlatformApplication.Current.Application.Windows)
{
platformWindow.ExtendsContentIntoTitleBar = false;
platformWindow.Title = ".NET MAUI Gauges Demo";
var platformWindow = (item?.Handler?.PlatformView as Microsoft.UI.Xaml.Window);
if (platformWindow != null)
{
platformWindow.ExtendsContentIntoTitleBar = false;
platformWindow.Title = ".NET MAUI Gauges Demo";
}
}
}
}

Просмотреть файл

@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net6.0-android;net6.0-ios;net6.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net6.0-windows10.0.19041.0</TargetFrameworks>
<TargetFrameworks>net8.0-android;net8.0-ios;net8.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net8.0-windows10.0.19041.0</TargetFrameworks>
<OutputType>Exe</OutputType>
<RootNamespace>SampleBrowser.Maui.Gauges</RootNamespace>
<UseMaui>true</UseMaui>
@ -53,6 +53,10 @@
<WarningLevel>5</WarningLevel>
</PropertyGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net8.0' OR '$(TargetFramework)' == 'net8.0-android' OR '$(TargetFramework)' == 'net8.0-ios' OR '$(TargetFramework)' == 'net8.0-maccatalyst' OR '$(TargetFramework)' == 'net8.0-windows10.0.19041.0' ">
<PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiVersion)" />
</ItemGroup>
<ItemGroup>
<!-- App Icon -->
<MauiIcon Include="Resources\AppIcon\appicon.svg" ForegroundFile="Resources\AppIcon\appiconfg.svg" Color="#4822E3" />
@ -74,10 +78,10 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="SampleBrowser.Maui.Base" version="23.1.36" />
<PackageReference Include="Syncfusion.Maui.Core" version="23.1.36" />
<PackageReference Include="Syncfusion.Maui.TabView" version="23.1.36" />
<PackageReference Include="Syncfusion.Maui.Gauges" version="23.1.36" />
<PackageReference Include="SampleBrowser.Maui.Base" version="23.2.4" />
<PackageReference Include="Syncfusion.Maui.Core" version="23.2.4" />
<PackageReference Include="Syncfusion.Maui.TabView" version="23.2.4" />
<PackageReference Include="Syncfusion.Maui.Gauges" version="23.2.4" />
</ItemGroup>
<ItemGroup>

Просмотреть файл

@ -17,7 +17,7 @@
</localCore:SampleView.Resources>
<localCore:SampleView.Content>
<Grid x:Name="batteryIndicatorLayout"
<Grid x:Name="batteryIndicatorLayout" WidthRequest="350"
HorizontalOptions="Center"
VerticalOptions="Center">
<VerticalStackLayout VerticalOptions="Center"

Просмотреть файл

@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net6.0-android;net6.0-ios;net6.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net6.0-windows10.0.19041.0</TargetFrameworks>
<TargetFrameworks>net8.0-android;net8.0-ios;net8.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net8.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);net6.0-tizen</TargetFrameworks> -->
<OutputType>Exe</OutputType>
@ -51,6 +51,10 @@
<WarningLevel>5</WarningLevel>
</PropertyGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net8.0' OR '$(TargetFramework)' == 'net8.0-android' OR '$(TargetFramework)' == 'net8.0-ios' OR '$(TargetFramework)' == 'net8.0-maccatalyst' OR '$(TargetFramework)' == 'net8.0-windows10.0.19041.0' ">
<PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiVersion)" />
</ItemGroup>
<ItemGroup>
<!-- App Icon -->
<MauiIcon Include="Resources\AppIcon\appicon.svg" ForegroundFile="Resources\AppIcon\appiconfg.svg" Color="#512BD4" />
@ -81,12 +85,11 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="SampleBrowser.Maui.Base" version="23.1.36" />
<PackageReference Include="Syncfusion.Maui.Core" version="23.1.36" />
<PackageReference Include="Syncfusion.Maui.Sliders" version="23.1.36" />
<PackageReference Include="Syncfusion.Maui.TabView" version="23.1.36" />
<PackageReference Include="Syncfusion.Maui.ImageEditor" version="23.1.36" />
<PackageReference Include="Syncfusion.Maui.ListView" version="23.1.36" />
<PackageReference Include="SampleBrowser.Maui.Base" version="23.2.4" />
<PackageReference Include="Syncfusion.Maui.Core" version="23.2.4" />
<PackageReference Include="Syncfusion.Maui.Sliders" version="23.2.4" />
<PackageReference Include="Syncfusion.Maui.TabView" version="23.2.4" />
<PackageReference Include="Syncfusion.Maui.ImageEditor" version="23.2.4" />
</ItemGroup>
</Project>

Просмотреть файл

@ -9,7 +9,6 @@ namespace SampleBrowser.Maui.ImageEditor.SfImageEditor
{
using SampleBrowser.Maui.Base;
using Syncfusion.Maui.ImageEditor;
using Syncfusion.Maui.ListView;
using ImageEditor = Syncfusion.Maui.ImageEditor.SfImageEditor;
/// <summary>
@ -22,297 +21,11 @@ namespace SampleBrowser.Maui.ImageEditor.SfImageEditor
/// </summary>
private ImageEditor? imageEditor;
/// <summary>
/// Holds the image filter collection view instance.
/// </summary>
private SfListView? ImageFilters;
/// <summary>
/// Holds whether the filter ToolBar is open or not.
/// </summary>
private bool isSaveIconEnabled;
/// <summary>
/// Holds whether the crop ToolBar is open or not.
/// </summary>
private bool isCropEnabled;
/// <inheritdoc/>
protected override void OnAttachedTo(SampleView sampleView)
{
base.OnAttachedTo(sampleView);
this.imageEditor = sampleView.Content.FindByName<ImageEditor>("imageEditor");
this.ImageFilters = sampleView.Content.FindByName<SfListView>("filtersList");
if (this.imageEditor != null)
{
this.imageEditor.ToolbarItemSelected += this.OnImageEditorToolbarItemSelected;
}
if (this.ImageFilters != null)
{
this.ImageFilters.SelectionChanged += this.OnImageFiltersSelectionChanged;
if (this.imageEditor != null && this.ImageFilters != null && this.imageEditor != null && this.ImageFilters.ItemsSource is List<ImageFilterModel> imageFilters)
{
foreach (var item in imageFilters)
{
item.ImageSource = this.imageEditor.Source;
}
}
}
}
/// <inheritdoc/>
protected override void OnDetachingFrom(SampleView sampleView)
{
base.OnDetachingFrom(sampleView);
if (this.imageEditor != null)
{
this.imageEditor.ImageLoaded -= this.OnImageEditorLoaded;
this.imageEditor.ToolbarItemSelected -= this.OnImageEditorToolbarItemSelected;
this.imageEditor = null;
}
if (this.ImageFilters != null)
{
this.ImageFilters.SelectionChanged -= this.OnImageFiltersSelectionChanged;
this.ImageFilters = null;
}
}
/// <summary>
/// Invokes on image editor image loaded.
/// </summary>
/// <param name="sender">The image editor.</param>
/// <param name="e">The event arguments.</param>
private async void OnImageEditorLoaded(object? sender, EventArgs e)
{
await this.SetFilterImages();
}
/// <summary>
/// Invokes on ToolBar item selection.
/// </summary>
/// <param name="sender">The image editor.</param>
/// <param name="e">The event arguments.</param>
private async void OnImageEditorToolbarItemSelected(object? sender, ToolbarItemSelectedEventArgs e)
{
if (e.ToolbarItem == null || this.imageEditor == null)
{
return;
}
if (e.ToolbarItem.Name == "SaveEdit")
{
this.imageEditor.SaveEdits();
this.isCropEnabled = false;
this.isSaveIconEnabled = false;
this.SetSaveEditIconVisibility(false);
await this.SetFilterImages();
}
else if (e.ToolbarItem.Name == "Effects")
{
this.ImageFilters?.SelectedItems?.Clear();
if (this.isCropEnabled)
{
this.imageEditor.CancelEdits();
this.isCropEnabled = false;
this.isSaveIconEnabled = true;
}
else if (this.isSaveIconEnabled)
{
this.imageEditor.CancelEdits();
this.isSaveIconEnabled = false;
}
else
{
this.isSaveIconEnabled = true;
}
this.SetSaveEditIconVisibility(this.isSaveIconEnabled);
}
else if (e.ToolbarItem.Name == "Crop")
{
if (this.isCropEnabled)
{
this.imageEditor.CancelEdits();
this.isCropEnabled = false;
this.isSaveIconEnabled = false;
}
else
{
if (this.isSaveIconEnabled)
{
this.imageEditor.ImageEffect(ImageEffect.None);
}
this.imageEditor.Crop(ImageCropType.Free);
this.isCropEnabled = true;
this.isSaveIconEnabled = true;
}
this.SetSaveEditIconVisibility(this.isSaveIconEnabled);
}
else if (e.ToolbarItem.Name is not "Filters")
{
if (this.isCropEnabled || isSaveIconEnabled)
{
this.isCropEnabled = false;
this.isSaveIconEnabled = false;
this.imageEditor.ImageEffect(ImageEffect.None);
this.imageEditor.CancelEdits();
this.SetSaveEditIconVisibility(this.isSaveIconEnabled);
}
await this.SetFilterImages();
}
else if (e.ToolbarItem.Name == "Browse")
{
this.WireImageLoadedEvent();
}
}
/// <summary>
/// Method wires image loaded event.
/// </summary>
private void WireImageLoadedEvent()
{
if (this.imageEditor != null)
{
this.imageEditor.ImageLoaded -= this.OnImageEditorLoaded;
this.imageEditor.ImageLoaded += this.OnImageEditorLoaded;
}
}
/// <summary>
/// On image filter selection.
/// </summary>
/// <param name="sender">The collection view.</param>
/// <param name="e">The event arguments.</param>
private async void OnImageFiltersSelectionChanged(object? sender, ItemSelectionChangedEventArgs? e)
{
ImageFilterModel? filterModel = e?.AddedItems?.FirstOrDefault() as ImageFilterModel;
if (filterModel == null || this.imageEditor == null)
{
return;
}
this.imageEditor.CancelEdits();
#if IOS
await Task.Delay(200);
#else
await Task.Delay(0);
#endif
if (filterModel.Effect == "Brightness")
{
imageEditor.ImageEffect(ImageEffect.Brightness, -0.2);
}
else if (filterModel.Effect == "Hue")
{
imageEditor.ImageEffect(ImageEffect.Hue, 1);
}
else if (filterModel.Effect == "Grayscale")
{
imageEditor.ImageEffect(ImageEffect.Saturation, -1);
}
else if (filterModel.Effect == "Blur")
{
imageEditor.ImageEffect(ImageEffect.Blur, 0.5);
}
else if (filterModel.Effect == "Contrast")
{
imageEditor.ImageEffect(ImageEffect.Contrast, 1);
}
else if (filterModel.Effect == "Exposure")
{
imageEditor.ImageEffect(ImageEffect.Exposure, 0.3);
}
else if (filterModel.Effect == "Sharpen")
{
imageEditor.ImageEffect(ImageEffect.Sharpen, 1);
}
else if (filterModel.Effect == "Opacity")
{
imageEditor.ImageEffect(ImageEffect.Opacity, 0.5);
}
}
/// <summary>
/// Method to set save edit icon visibility.
/// </summary>
/// <param name="saveIconVisibility">True if save edit is visible.</param>
private void SetSaveEditIconVisibility(bool saveIconVisibility)
{
if (this.imageEditor == null)
{
return;
}
var imageEditorToolbar = this.imageEditor.Toolbars.FirstOrDefault();
if (imageEditorToolbar == null)
{
return;
}
var groupItems = imageEditorToolbar.ToolbarItems.OfType<ImageEditorToolbarGroupItem>();
foreach (var groupItem in groupItems)
{
foreach (var toolbarItem in groupItem.Items)
{
if (toolbarItem.Name == "SaveEdit")
{
toolbarItem.IsVisible = saveIconVisibility;
}
else
{
toolbarItem.IsVisible = !saveIconVisibility;
}
}
}
}
/// <summary>
/// Method to filter image sources.
/// </summary>
/// <returns>The task status.</returns>
private async Task SetFilterImages()
{
if (this.ImageFilters != null && this.imageEditor != null && this.ImageFilters.ItemsSource is List<ImageFilterModel> imageFilters)
{
await Task.Delay(500);
var imageSource = await this.imageEditor.GetImageStream();
if (imageSource == null)
{
return;
}
imageSource.Position = 0;
var imageBytes = this.GetBytesFromStream(imageSource);
foreach (var item in imageFilters)
{
item.IsBusy = true;
item.ImageSource = ImageSource.FromStream(() => new MemoryStream(imageBytes));
}
}
}
/// <summary>
/// Converts the stream into bytes.
/// </summary>
/// <param name="stream">The image stream.</param>
/// <returns>The image bytes.</returns>
private byte[] GetBytesFromStream(Stream stream)
{
byte[] bytes, buffer = new byte[32];
List<byte> totalStream = new List<byte>();
int read;
while ((read = stream.Read(buffer, 0, buffer.Length)) > 0)
{
totalStream.AddRange(buffer.Take(read));
}
bytes = totalStream.ToArray();
return bytes;
}
}
}

Просмотреть файл

@ -6,7 +6,6 @@
xmlns:imageEditor="clr-namespace:Syncfusion.Maui.ImageEditor;assembly=Syncfusion.Maui.ImageEditor"
xmlns:thickness="clr-namespace:Microsoft.Maui;assembly=Microsoft.Maui"
xmlns:local="clr-namespace:SampleBrowser.Maui.ImageEditor.SfImageEditor"
xmlns:listView="clr-namespace:Syncfusion.Maui.ListView;assembly=Syncfusion.Maui.ListView"
x:Class="SampleBrowser.Maui.ImageEditor.SfImageEditor.ImageFilters">
<localCore:SampleView.Content>
<Grid>
@ -43,7 +42,7 @@
</imageEditor:ImageEditorToolbar.ToolbarItems>
</imageEditor:ImageEditorToolbar>
<imageEditor:ImageEditorToolbar Position="End">
<!--<imageEditor:ImageEditorToolbar Position="End">
<imageEditor:ImageEditorToolbar.ToolbarItems>
<imageEditor:ImageEditorToolbarItem Name="Crop"/>
<imageEditor:ImageEditorToolbarItem Name="Rotate"/>
@ -82,7 +81,7 @@
</imageEditor:ImageEditorToolbarItem.SubToolbars>
</imageEditor:ImageEditorToolbarItem>
</imageEditor:ImageEditorToolbar.ToolbarItems>
</imageEditor:ImageEditorToolbar>
</imageEditor:ImageEditorToolbar>-->
</imageEditor:SfImageEditor.Toolbars>
</imageEditor:SfImageEditor>
</Grid>

Просмотреть файл

@ -25,7 +25,7 @@
<Sample Title="Culture and Formatting" SampleName="NumericEntryCultureAndFormatting" SearchTags="numeric,entry,textbox,formatting, culture" CodeViewerPath="NumericEntry/NumericEntryCultureAndFormatting/"/>
</Control>
<Control Title="NumericUpDown" ControlName="NumericUpDown" Image="numericupdown.png" Description="Allows the user to restrict the input to numeric values and provides buttons to easily increment and decrement values.">
<Control Title="NumericUpDown" ControlName="NumericUpDown" Image="numericupdown.png" Description="Allows the user to restrict the input to numeric values and provides buttons to easily change the values.">
<Sample Title="Getting Started" SampleName="NumericUpDownGettingStarted" SearchTags="numeric,entry,textbox,updownbutton, numericupdown" CodeViewerPath="NumericEntry/NumericEntryGettingStarted/"/>
</Control>

Просмотреть файл

@ -36,14 +36,17 @@ public partial class App : MauiWinUIApplication
protected override void OnLaunched(LaunchActivatedEventArgs args)
{
base.OnLaunched(args);
foreach (var item in Application.Windows)
if (IPlatformApplication.Current != null)
{
var platformWindow = (item?.Handler?.PlatformView as Microsoft.UI.Xaml.Window);
if (platformWindow != null)
foreach (var item in IPlatformApplication.Current.Application.Windows)
{
platformWindow.ExtendsContentIntoTitleBar = false;
platformWindow.Title = ".NET MAUI Inputs Demo";
var platformWindow = (item?.Handler?.PlatformView as Microsoft.UI.Xaml.Window);
if (platformWindow != null)
{
platformWindow.ExtendsContentIntoTitleBar = false;
platformWindow.Title = ".NET MAUI Inputs Demo";
}
}
}
}

Просмотреть файл

@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net6.0-android;net6.0-ios;net6.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net6.0-windows10.0.19041.0</TargetFrameworks>
<TargetFrameworks>net8.0-android;net8.0-ios;net8.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net8.0-windows10.0.19041.0</TargetFrameworks>
<OutputType>Exe</OutputType>
<RootNamespace>SampleBrowser.Maui.Inputs</RootNamespace>
<UseMaui>true</UseMaui>
@ -53,6 +53,10 @@
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<WarningLevel>5</WarningLevel>
</PropertyGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0' OR '$(TargetFramework)' == 'net8.0-android' OR '$(TargetFramework)' == 'net8.0-ios' OR '$(TargetFramework)' == 'net8.0-maccatalyst' OR '$(TargetFramework)' == 'net8.0-windows10.0.19041.0' ">
<PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiVersion)" />
</ItemGroup>
<ItemGroup>
<!-- App Icon -->
@ -81,14 +85,14 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="SampleBrowser.Maui.Base" version="23.1.36" />
<PackageReference Include="Syncfusion.Maui.Core" version="23.1.36" />
<PackageReference Include="Syncfusion.Maui.ProgressBar" version="23.1.36" />
<PackageReference Include="Syncfusion.Maui.TabView" version="23.1.36" />
<PackageReference Include="Syncfusion.Maui.DataSource" version="23.1.36" />
<PackageReference Include="Syncfusion.Maui.GridCommon" version="23.1.36" />
<PackageReference Include="Syncfusion.Maui.ListView" version="23.1.36" />
<PackageReference Include="Syncfusion.Maui.Inputs" version="23.1.36" />
<PackageReference Include="SampleBrowser.Maui.Base" version="23.2.4" />
<PackageReference Include="Syncfusion.Maui.Core" version="23.2.4" />
<PackageReference Include="Syncfusion.Maui.ProgressBar" version="23.2.4" />
<PackageReference Include="Syncfusion.Maui.TabView" version="23.2.4" />
<PackageReference Include="Syncfusion.Maui.DataSource" version="23.2.4" />
<PackageReference Include="Syncfusion.Maui.GridCommon" version="23.2.4" />
<PackageReference Include="Syncfusion.Maui.ListView" version="23.2.4" />
<PackageReference Include="Syncfusion.Maui.Inputs" version="23.2.4" />
</ItemGroup>
</Project>

Просмотреть файл

@ -36,10 +36,10 @@
<Image Source="{imageExtension:SfImageResource creditcard.png}"/>
<Grid RowDefinitions="0.5*,9*,0.5*" Grid.Column="1" VerticalOptions="FillAndExpand" HorizontalOptions="Center" Padding="10" Margin="0,-5,0,0">
<Grid RowDefinitions="0.4*,9.2*,0.4*" Grid.Column="1" VerticalOptions="FillAndExpand" HorizontalOptions="Center" Padding="10" Margin="0,-5,0,0">
<Grid Grid.Row="0"/>
<Frame Grid.Row="1" HasShadow="False" CornerRadius="10" Grid.Column="1" Padding="10" VerticalOptions="FillAndExpand" HorizontalOptions="Center" Margin="10">
<Grid RowDefinitions="280,*" ColumnDefinitions="235" RowSpacing="10">
<Grid RowDefinitions="Auto,*" ColumnDefinitions="235" RowSpacing="10">
<VerticalStackLayout Grid.Row="0" WidthRequest="235">
<HorizontalStackLayout HeightRequest="46" Spacing="10" HorizontalOptions="Center" VerticalOptions="Center">
@ -110,7 +110,7 @@
</VerticalStackLayout>
<Grid Grid.Row="1" VerticalOptions="End">
<Button Text="Pay Now" FontFamily="Roboto-Regular" />
<Button Text="Pay Now" FontFamily="Roboto-Regular" HeightRequest="40"/>
</Grid>
</Grid>
</Frame>

Просмотреть файл

@ -72,15 +72,15 @@
<Entry Placeholder="Name on your card" Margin="0,0,0,15"/>
</VerticalStackLayout>
<Grid ColumnDefinitions="*, 0.6*" Margin="0">
<Grid ColumnDefinitions="*, 0.8*" Margin="0">
<VerticalStackLayout Grid.Column="0">
<Label Text="Card Number"/>
<inputs:SfMaskedEntry MaskType="RegEx" Mask="\d{4}-\d{4}-\d{4}-\d{4}" PromptChar="_"/>
</VerticalStackLayout>
<Grid Grid.Column="1" ColumnDefinitions="*,*" ColumnSpacing="15" Margin="25,0,0,0">
<Grid Grid.Column="1" ColumnDefinitions="*,*" ColumnSpacing="15" Margin="20,0,0,0">
<VerticalStackLayout Grid.Column="0">
<Label Text="Month/Year"/>
<Label Text="MM/YY"/>
<inputs:SfMaskedEntry MaskType="Simple" Mask="00/00" PromptChar="_"/>
</VerticalStackLayout>

Просмотреть файл

@ -20,7 +20,7 @@
<Grid HorizontalOptions="Center" VerticalOptions="Center" RowSpacing="60">
<Grid.RowDefinitions>
<RowDefinition Height="40"/>
<RowDefinition Height="60"/>
<RowDefinition Height="20"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
@ -46,17 +46,17 @@
<ScrollView Grid.Row="2">
<Grid RowSpacing="20" WidthRequest="280" RowDefinitions="Auto,Auto,Auto,Auto,Auto,Auto">
<Grid ColumnDefinitions="*,120" Grid.Row="0">
<Grid ColumnDefinitions="*,150" Grid.Row="0">
<Label Text="Item Count"/>
<editors:SfComboBox Grid.Column="1" SelectionChanged="SfComboBox_ItemCount_SelectionChanged" HorizontalOptions="End" ItemsSource="{Binding ItemCountList}" SelectedIndex="4"/>
</Grid>
<Grid ColumnDefinitions="*,120" Grid.Row="1">
<Grid ColumnDefinitions="*,150" Grid.Row="1">
<Label Text="Precision"/>
<editors:SfComboBox Grid.Column="1" x:Name="precisionCombobox" SelectionChanged="SfComboBox_Precision_SelectionChanged" HorizontalOptions="End" ItemsSource="{Binding PrecisionList}" SelectedIndex="0"/>
</Grid>
<Grid ColumnDefinitions="*,120" Grid.Row="2">
<Grid ColumnDefinitions="*,150" Grid.Row="2">
<Label Text="Rating Shape"/>
<editors:SfComboBox Grid.Column="1" SelectionChanged="SfComboBox_SelectionChanged" ItemsSource="{Binding RatingShapeList}" SelectedIndex="3"/>
</Grid>

Просмотреть файл

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?>
<SyncfusionControls>
<ControlCategory Name="Layouts">
<Control Title="ListView" ControlName="SfListView" Image="listview.png" Description="Displays the set of data items in different layouts or views and in groups.">
<Control Title="ListView" ControlName="SfListView" Image="listview.png" Description="Displays items in various layouts and groups.">
<Sample SearchTags="GettingStarted" SampleName="GettingStarted" Title="Getting Started" CodeViewerPath="ListView/GettingStarted/" VideoLink ="https://www.youtube.com/watch?v=EFo2zIFw60Q" /> <!--Description="This sample illustrates about getting started with ListView by loading a set of data items with predefined template."-->
<Sample SearchTags="Grouping" SampleName="Grouping" Title="Grouping" CodeViewerPath="ListView/Grouping/" VideoLink="https://www.youtube.com/watch?v=EFo2zIFw60Q"/> <!--Description="This sample showcases the grouping capability of ListView which also provides support to freeze the group headers in view when grouped."-->
<Sample SearchTags="Selection" SampleName="Selection" Title="Selection" CodeViewerPath="ListView/Selection/" VideoLink="https://www.youtube.com/watch?v=EFo2zIFw60Q"/> <!--Description="This sample showcases the selection capability of ListView which provides selection mode options like Single, Multiple and None."-->

Просмотреть файл

@ -36,14 +36,18 @@ public partial class App : MauiWinUIApplication
protected override void OnLaunched(LaunchActivatedEventArgs args)
{
base.OnLaunched(args);
foreach (var item in Application.Windows)
if (IPlatformApplication.Current != null)
{
var platformWindow = (item?.Handler?.PlatformView as Microsoft.UI.Xaml.Window);
if (platformWindow != null)
foreach (var item in IPlatformApplication.Current.Application.Windows)
{
platformWindow.ExtendsContentIntoTitleBar = false;
platformWindow.Title = ".NET MAUI List View Demo";
var platformWindow = (item?.Handler?.PlatformView as Microsoft.UI.Xaml.Window);
if (platformWindow != null)
{
platformWindow.ExtendsContentIntoTitleBar = false;
platformWindow.Title = ".NET MAUI List View Demo";
}
}
}
}

Просмотреть файл

@ -1,8 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net6.0-android;net6.0-ios;net6.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net6.0-windows10.0.19041.0</TargetFrameworks>
<TargetFrameworks>net8.0-android;net8.0-ios;net8.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net8.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);net6.0-tizen</TargetFrameworks> -->
<OutputType>Exe</OutputType>
@ -55,6 +55,10 @@
<WarningLevel>5</WarningLevel>
</PropertyGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net8.0' OR '$(TargetFramework)' == 'net8.0-android' OR '$(TargetFramework)' == 'net8.0-ios' OR '$(TargetFramework)' == 'net8.0-maccatalyst' OR '$(TargetFramework)' == 'net8.0-windows10.0.19041.0' ">
<PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiVersion)" />
</ItemGroup>
<ItemGroup>
<!-- App Icon -->
<MauiIcon Include="Resources\AppIcon\appicon.svg" ForegroundFile="Resources\AppIcon\appiconfg.svg" Color="#4822E3" />
@ -82,12 +86,12 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="SampleBrowser.Maui.Base" version="23.1.36" />
<PackageReference Include="Syncfusion.Maui.Core" version="23.1.36" />
<PackageReference Include="Syncfusion.Maui.DataSource" version="23.1.36" />
<PackageReference Include="Syncfusion.Maui.GridCommon" version="23.1.36" />
<PackageReference Include="Syncfusion.Maui.ListView" version="23.1.36" />
<PackageReference Include="Syncfusion.Maui.TabView" version="23.1.36" />
<PackageReference Include="SampleBrowser.Maui.Base" version="23.2.4" />
<PackageReference Include="Syncfusion.Maui.Core" version="23.2.4" />
<PackageReference Include="Syncfusion.Maui.DataSource" version="23.2.4" />
<PackageReference Include="Syncfusion.Maui.GridCommon" version="23.2.4" />
<PackageReference Include="Syncfusion.Maui.ListView" version="23.2.4" />
<PackageReference Include="Syncfusion.Maui.TabView" version="23.2.4" />
</ItemGroup>
</Project>

Просмотреть файл

@ -17,8 +17,12 @@ namespace SampleBrowser.Maui.ListView.SfListView
public class ListViewRatingColorConverter : IValueConverter
{
int ratingCount = 0;
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
{
if(value == null)
{
return Color.FromArgb("#BDBDBB");
}
ratingCount++;
if (ratingCount > 5)
{
@ -34,7 +38,7 @@ namespace SampleBrowser.Maui.ListView.SfListView
}
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
public object? ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
{
throw new NotImplementedException();
}

Просмотреть файл

@ -13,9 +13,13 @@ namespace SampleBrowser.Maui.ListView.SfListView
{
public class ExpandCollapseIconConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
{
if((bool)value)
if (value == null)
{
return "\ue72B";
}
else if((bool)value)
{
return "\ue72C";
}
@ -25,7 +29,7 @@ namespace SampleBrowser.Maui.ListView.SfListView
}
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
public object? ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
@ -33,8 +37,12 @@ namespace SampleBrowser.Maui.ListView.SfListView
public class FoodSelectionIconConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
{
if (value == null)
{
return "\ue72E";
}
if ((bool)value)
{
return "\ue72D";
@ -45,7 +53,7 @@ namespace SampleBrowser.Maui.ListView.SfListView
}
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
public object? ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
{
throw new NotImplementedException();
}

Просмотреть файл

@ -33,7 +33,7 @@ namespace SampleBrowser.Maui.ListView.SfListView
// which might cause a indefinite loop as mentioned in the below doc
// https://docs.microsoft.com/en-us/windows/apps/design/layout/custom-panels-overview#other-layout-api,
// also as mentioned it is safer to use SizeChanged event.
#if (__ANDROID__ || __IOS__ || __MACCATALYST__)
#if !WINDOWS
bindable.PropertyChanged += this.View_PropertyChanged;
#else
bindable.HandlerChanged += Bindable_HandlerChanged;
@ -42,7 +42,7 @@ namespace SampleBrowser.Maui.ListView.SfListView
protected override void OnDetachingFrom(SampleView bindable)
{
#if (__ANDROID__ || __IOS__ || __MACCATALYST__)
#if !WINDOWS
bindable.PropertyChanged -= View_PropertyChanged;
#else
bindable.HandlerChanged -= Bindable_HandlerChanged;
@ -56,7 +56,7 @@ namespace SampleBrowser.Maui.ListView.SfListView
#region CallBacks
#if !(__ANDROID__ || __IOS__ || __MACCATALYST__)
#if WINDOWS
private void Bindable_HandlerChanged(object sender, EventArgs e)
{
if (sender is GridLayout && (sender as GridLayout).Handler != null)

Просмотреть файл

@ -13,29 +13,33 @@ namespace SampleBrowser.Maui.ListView.SfListView
{
public class FavoriteIconConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
{
if ((bool)value)
if (value == null)
return "\ue706";
else if ((bool)value)
return "\ue705";
else
return "\ue706";
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
public object? ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}
public class FavoriteIconColorConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
{
if ((bool)value)
if (value == null)
return Color.FromArgb("#99000000");
else if ((bool)value)
return Color.FromArgb("#E46D6D");
else
return Color.FromArgb("#99000000");
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
public object? ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
{
throw new NotImplementedException();
}

Просмотреть файл

@ -13,14 +13,14 @@ namespace SampleBrowser.Maui.ListView.SfListView
{
public class InverseZeroVisibilityConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
{
if (value is int @int && @int > 0)
return true;
return false;
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
public object? ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
@ -28,7 +28,7 @@ namespace SampleBrowser.Maui.ListView.SfListView
public class NumericZeroVisibilityConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
{
if (value is int @int && @int > 0)
{
@ -41,21 +41,21 @@ namespace SampleBrowser.Maui.ListView.SfListView
return false;
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
public object ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}
public class ZeroVisibilityConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
{
if (value is int @int && @int <= 0)
return true;
return false;
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
public object? ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
@ -64,14 +64,14 @@ namespace SampleBrowser.Maui.ListView.SfListView
public class TotalItemsCountConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
public object Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
{
if (value is int @int && @int <= 1)
return value + " Item |";
return value + " Items |";
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
public object? ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
@ -79,13 +79,21 @@ namespace SampleBrowser.Maui.ListView.SfListView
public class CurrencyFormatConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
{
var d = (double)value;
return string.Format("${0:0.00}", d);
if (value != null)
{
var d = (double)value;
return string.Format("${0:0.00}", d);
}
else
{
return string.Empty;
}
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
public object? ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
{
throw new NotImplementedException();
}

Просмотреть файл

@ -14,7 +14,7 @@ namespace SampleBrowser.Maui.ListView.SfListView
{
public class IconColorConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
{
if (value == null)
return Color.FromArgb("#6200EE");
@ -24,14 +24,14 @@ namespace SampleBrowser.Maui.ListView.SfListView
return Color.FromArgb("#b3b3b3");
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
public object? ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}
public class SelectionIconConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
{
if (value == null)
return "\ue703";
@ -41,7 +41,7 @@ namespace SampleBrowser.Maui.ListView.SfListView
return "\ue701";
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
public object? ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture)
{
throw new NotImplementedException();
}

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше