This commit is contained in:
SyncfusionBuild 2023-09-18 02:27:13 +00:00
Родитель cbf9fc93f0
Коммит 3a7dc8274b
511 изменённых файлов: 25017 добавлений и 1748 удалений

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

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?>
<SyncfusionControls>
<ControlCategory Name="Layouts">
<Control Title="Accordion" StatusTag="New" IsPreview="true" 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="Provides a vertical, collapsible panel with stacked headers for simultaneous expansion or collapse of one or multiple items, revealing related content.">
<Sample SearchTags="GettingStarted" SampleName="GettingStarted" Title="Getting Started" CodeViewerPath="Accordion/GettingStarted/" />
</Control>
</ControlCategory>

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

@ -4,7 +4,7 @@
<TargetFrameworks>net6.0-android;net6.0-ios;net6.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net6.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);net7.0-tizen</TargetFrameworks> -->
<!-- <TargetFrameworks>$(TargetFrameworks);net6.0-tizen</TargetFrameworks> -->
<OutputType>Exe</OutputType>
<RootNamespace>SampleBrowser.Maui.Accordion</RootNamespace>
<UseMaui>true</UseMaui>
@ -85,10 +85,10 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Syncfusion.Maui.Core" version="22.2.5" />
<PackageReference Include="Syncfusion.Maui.Expander" version="22.2.5" />
<PackageReference Include="Syncfusion.Maui.TabView" version="22.2.5" />
<PackageReference Include="SampleBrowser.Maui.Base" version="22.2.5" />
<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" />
</ItemGroup>
</Project>

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

@ -11,22 +11,5 @@
<iconUrl>http://www.syncfusion.com/content/images/nuget/sync_logo_icon.png</iconUrl>
<description>Accordion 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>

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

@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net6.0-android;net6.0-ios;net6.0-maccatalyst</TargetFrameworks>
@ -79,9 +79,9 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="SampleBrowser.Maui.Base" version="22.2.5" />
<PackageReference Include="Syncfusion.Maui.Core" version="22.2.5" />
<PackageReference Include="Syncfusion.Maui.TabView" version="22.2.5" />
<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" />
</ItemGroup>
</Project>

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

@ -11,22 +11,5 @@
<iconUrl>http://www.syncfusion.com/content/images/nuget/sync_logo_icon.png</iconUrl>
<description>AvatarView 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>

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

@ -102,10 +102,10 @@
<RowDefinition Height="130"/>
</Grid.RowDefinitions>
<Label HorizontalOptions="Start" Text="Choose gradient background"/>
<FlexLayout Grid.Row="1" Wrap="Wrap" x:Name="gradientcollection" BindableLayout.ItemsSource="{Binding ColorItemCollection}">
<FlexLayout Grid.Row="1" Wrap="Wrap" x:Name="gradientcollection" BindableLayout.ItemsSource="{Binding ColorItemCollection}" WidthRequest="{OnPlatform iOS='350',MacCatalyst='400',Android='350',WinUI='400'}">
<BindableLayout.ItemTemplate>
<DataTemplate>
<ContentView Content="{Binding}" Margin="5"/>
<ContentView Content="{Binding}" Margin="4"/>
</DataTemplate>
</BindableLayout.ItemTemplate>
</FlexLayout>

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

@ -74,10 +74,10 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Syncfusion.Maui.Core" version="22.2.5" />
<PackageReference Include="SampleBrowser.Maui.Base" version="22.2.5" />
<PackageReference Include="Syncfusion.Maui.Sliders" version="22.2.5" />
<PackageReference Include="Syncfusion.Maui.TabView" version="22.2.5" />
<PackageReference Include="Syncfusion.Maui.Backdrop" version="22.2.5" />
<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" />
</ItemGroup>
</Project>

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

@ -11,22 +11,5 @@
<iconUrl>http://www.syncfusion.com/content/images/nuget/sync_logo_icon.png</iconUrl>
<description>Backdrop page 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>

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

@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net6.0-android;net6.0-ios;net6.0-maccatalyst</TargetFrameworks>
@ -75,9 +75,9 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="SampleBrowser.Maui.Base" version="22.2.5" />
<PackageReference Include="Syncfusion.Maui.Core" version="22.2.5" />
<PackageReference Include="Syncfusion.Maui.TabView" version="22.2.5" />
<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" />
</ItemGroup>
<ItemGroup>

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

@ -11,22 +11,5 @@
<iconUrl>http://www.syncfusion.com/content/images/nuget/sync_logo_icon.png</iconUrl>
<description>BadgeView 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>

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

@ -16,7 +16,7 @@
<localCore:SampleView.Content>
<ScrollView HorizontalOptions="Center" HorizontalScrollBarVisibility="Never" VerticalScrollBarVisibility="Never">
<VerticalStackLayout WidthRequest="300"
<VerticalStackLayout WidthRequest="350"
VerticalOptions="Center"
HorizontalOptions="Center">
<Grid RowDefinitions="90,90" RowSpacing="20" ColumnSpacing="20"

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

@ -7,6 +7,7 @@
<localCore:SampleView.Resources>
<Style x:Key="DemoLabelStyle" TargetType="Label">
<Setter Property="Margin" Value='{OnPlatform iOS="16", Android="8", MacCatalyst="16"}'/>
<Setter Property="FontSize" Value="16"/>
<Setter Property="VerticalOptions" Value="Center"/>
<Setter Property="HorizontalOptions" Value="Center"/>
@ -102,7 +103,7 @@
Grid.Column="2"
BadgeText="5">
<Grid BackgroundColor="#EEEEEE" Margin="10">
<Label Text="BottomRight"
<Label Text="BottomRight" Margin="{OnPlatform Android=5}"
Style="{StaticResource DemoLabelStyle}"/>
</Grid>
<badge:SfBadgeView.BadgeSettings>

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

@ -80,7 +80,7 @@
TextColor="Black"
FontSize="12"
Text="{Binding Time}" />
<badge:SfBadgeView HeightRequest="22" BadgeText="{Binding Count}" Grid.Row="1">
<badge:SfBadgeView HeightRequest="26" BadgeText="{Binding Count}" Grid.Row="1">
<Label Text=""
HorizontalOptions="Center"
FontSize="10"/>

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

@ -3,12 +3,12 @@
<ControlCategory Name="Data Visualization">
<Control Title="Barcode Generator" ControlName="SfBarcodeGenerator" Image="barcode.png" Description="Generate and display data in machine-readable 1D and 2D barcodes.">
<Category Title="Showcase">
<Sample Title="Boarding Pass" SampleName="BoardingPass" SearchTags="BoardingPass" CodeViewerPath="Barcode/BoardingPass/" VideoLink="https://www.youtube.com/watch?v=WwdtIotODpE"/>
<Sample Title="Wi-Fi" SampleName="Wifi" SearchTags="Wifi" CodeViewerPath="Barcode/Wifi/" VideoLink="https://www.youtube.com/watch?v=WwdtIotODpE"/>
<Sample Title="Boarding Pass" SampleName="BoardingPass" SearchTags="BoardingPass" CodeViewerPath="Barcode/BoardingPass/"/>
<Sample Title="Wi-Fi" SampleName="Wifi" SearchTags="Wifi" CodeViewerPath="Barcode/Wifi/"/>
</Category>
<Sample Title="One Dimensional" SampleName="OneDimensional" SearchTags="OneDimensional" CodeViewerPath="Barcode/OneDimensional/" VideoLink="https://www.youtube.com/watch?v=WwdtIotODpE"/>
<Sample Title="QR Code" SampleName="QRCode" SearchTags="QRCode" CodeViewerPath="Barcode/QRCode/" VideoLink="https://www.youtube.com/watch?v=WwdtIotODpE"/>
<Sample Title="Data Matrix" SampleName="DataMatrix" SearchTags="DataMatrix" CodeViewerPath="Barcode/DataMatrix/" VideoLink="https://www.youtube.com/watch?v=WwdtIotODpE"/>
<Sample Title="One Dimensional" SampleName="OneDimensional" SearchTags="OneDimensional" CodeViewerPath="Barcode/OneDimensional/" VideoLink="https://www.youtube.com/watch?v=WwdtIotODpE&amp;t=239s"/>
<Sample Title="QR Code" SampleName="QRCode" SearchTags="QRCode" CodeViewerPath="Barcode/QRCode/" VideoLink="https://www.youtube.com/watch?v=WwdtIotODpE&amp;t=400s"/>
<Sample Title="Data Matrix" SampleName="DataMatrix" SearchTags="DataMatrix" CodeViewerPath="Barcode/DataMatrix/" VideoLink="https://www.youtube.com/watch?v=WwdtIotODpE&amp;t=419s"/>
</Control>
</ControlCategory>
</SyncfusionControls>

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

@ -74,10 +74,10 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="SampleBrowser.Maui.Base" version="22.2.5" />
<PackageReference Include="Syncfusion.Maui.Core" version="22.2.5" />
<PackageReference Include="Syncfusion.Maui.TabView" version="22.2.5" />
<PackageReference Include="Syncfusion.Maui.Barcode" version="22.2.5" />
<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" />
</ItemGroup>
<ItemGroup>

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

@ -11,22 +11,5 @@
<iconUrl>http://www.syncfusion.com/content/images/nuget/sync_logo_icon.png</iconUrl>
<description>Barcode 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>

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

@ -33,7 +33,7 @@
<VerticalStackLayout VerticalOptions="Center"
HorizontalOptions="Center">
<Label Text="&#xe700;"
FontFamily="{OnPlatform iOS=Barcode SB Icons, MacCatalyst=Barcode SB Icons, Android=Barcode SB Icons.ttf#, UWP=Barcode SB Icons.ttf#Barcode SB Icons}"
FontFamily="{OnPlatform iOS=Barcode SB Icons, MacCatalyst=Barcode SB Icons, Android=Barcode SB Icons.ttf#, WinUI=Barcode SB Icons.ttf#Barcode SB Icons}"
TextColor="White"
Grid.Row="1"
Grid.Column="1"

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

@ -36,7 +36,7 @@
LineBreakMode="WordWrap"
TextColor="#DE000000"
FontFamily="Roboto-Medium"
FontSize="{OnPlatform Android={OnIdiom Phone=15, Tablet=22}, iOS=16, UWP=16}" />
FontSize="{OnPlatform Android={OnIdiom Phone=15, Tablet=22}, iOS=16, WinUI=16}" />
<Label Text="Supports 0-9,-,$,:,/,.,+ "
Grid.Row="1"
LineBreakMode="WordWrap"
@ -44,7 +44,7 @@
TextColor="#99000000"
LineHeight="1.2"
FontFamily="Roboto-Regular"
FontSize="{OnPlatform Android={OnIdiom Phone=13, Tablet=13}, iOS=14, UWP=14}" />
FontSize="{OnPlatform Android={OnIdiom Phone=13, Tablet=13}, iOS=14, WinUI=14}" />
</Grid>
</Grid>
@ -79,7 +79,7 @@
LineBreakMode="WordWrap"
TextColor="#DE000000"
FontFamily="Roboto-Medium"
FontSize="{OnPlatform Android={OnIdiom Phone=15, Tablet=22}, iOS=16, UWP=16}" />
FontSize="{OnPlatform Android={OnIdiom Phone=15, Tablet=22}, iOS=16, WinUI=16}" />
<Label Text="Supports A-Z, 0-9,-, ., $, /, +, %, and space"
Grid.Row="1"
LineBreakMode="WordWrap"
@ -87,7 +87,7 @@
TextColor="#99000000"
LineHeight="1.2"
FontFamily="Roboto-Regular"
FontSize="{OnPlatform Android={OnIdiom Phone=13, Tablet=13}, iOS=14, UWP=14}" />
FontSize="{OnPlatform Android={OnIdiom Phone=13, Tablet=13}, iOS=14, WinUI=14}" />
</Grid>
</Grid>
@ -122,7 +122,7 @@
LineBreakMode="WordWrap"
TextColor="#DE000000"
FontFamily="Roboto-Medium"
FontSize="{OnPlatform Android={OnIdiom Phone=15, Tablet=22}, iOS=16, UWP=16}" />
FontSize="{OnPlatform Android={OnIdiom Phone=15, Tablet=22}, iOS=16, WinUI=16}" />
<Label Text="Supports only ASCII characters"
Grid.Row="1"
LineBreakMode="WordWrap"
@ -130,7 +130,7 @@
TextColor="#99000000"
LineHeight="1.2"
FontFamily="Roboto-Regular"
FontSize="{OnPlatform Android={OnIdiom Phone=13, Tablet=13}, iOS=14, UWP=14}" />
FontSize="{OnPlatform Android={OnIdiom Phone=13, Tablet=13}, iOS=14, WinUI=14}" />
</Grid>
</Grid>
@ -165,7 +165,7 @@
LineBreakMode="WordWrap"
TextColor="#DE000000"
FontFamily="Roboto-Medium"
FontSize="{OnPlatform Android={OnIdiom Phone=15, Tablet=22}, iOS=16, UWP=16}" />
FontSize="{OnPlatform Android={OnIdiom Phone=15, Tablet=22}, iOS=16, WinUI=16}" />
<Label Text="Supports A-Z, 0-9 , -, ., $, /, +, % and space"
Grid.Row="1"
LineBreakMode="WordWrap"
@ -173,7 +173,7 @@
TextColor="#99000000"
LineHeight="1.2"
FontFamily="Roboto-Regular"
FontSize="{OnPlatform Android={OnIdiom Phone=13, Tablet=13}, iOS=14, UWP=14}" />
FontSize="{OnPlatform Android={OnIdiom Phone=13, Tablet=13}, iOS=14, WinUI=14}" />
</Grid>
</Grid>
@ -208,14 +208,14 @@
LineBreakMode="WordWrap"
TextColor="#DE000000"
FontFamily="Roboto-Medium"
FontSize="{OnPlatform Android={OnIdiom Phone=15, Tablet=22}, iOS=16, UWP=16}" />
FontSize="{OnPlatform Android={OnIdiom Phone=15, Tablet=22}, iOS=16, WinUI=16}" />
<Label Text="Support 0-9, A-Z, a-z and special characters"
Grid.Row="1"
LineBreakMode="WordWrap"
Margin='{OnPlatform Android="0,5,5,0", Default="0,5,0,0"}'
TextColor="#99000000"
FontFamily="Roboto-Regular"
FontSize="{OnPlatform Android={OnIdiom Phone=13, Tablet=13}, iOS=14, UWP=14}" />
FontSize="{OnPlatform Android={OnIdiom Phone=13, Tablet=13}, iOS=14, WinUI=14}" />
</Grid>
</Grid>
@ -250,7 +250,7 @@
LineBreakMode="WordWrap"
TextColor="#DE000000"
FontFamily="Roboto-Medium"
FontSize="{OnPlatform Android={OnIdiom Phone=15, Tablet=22}, iOS=16, UWP=16}" />
FontSize="{OnPlatform Android={OnIdiom Phone=15, Tablet=22}, iOS=16, WinUI=16}" />
<Label Text="Support 0-9, A-Z and special characters"
Grid.Row="1"
LineBreakMode="WordWrap"
@ -258,7 +258,7 @@
TextColor="#99000000"
LineHeight="1.2"
FontFamily="Roboto-Regular"
FontSize="{OnPlatform Android={OnIdiom Phone=13, Tablet=13}, iOS=14, UWP=14}" />
FontSize="{OnPlatform Android={OnIdiom Phone=13, Tablet=13}, iOS=14, WinUI=14}" />
</Grid>
</Grid>
@ -293,7 +293,7 @@
LineBreakMode="WordWrap"
TextColor="#DE000000"
FontFamily="Roboto-Medium"
FontSize="{OnPlatform Android={OnIdiom Phone=15, Tablet=22}, iOS=16, UWP=16}" />
FontSize="{OnPlatform Android={OnIdiom Phone=15, Tablet=22}, iOS=16, WinUI=16}" />
<Label Text="Support 0-9, A-Z and special characters"
Grid.Row="1"
LineBreakMode="WordWrap"
@ -301,7 +301,7 @@
TextColor="#99000000"
LineHeight="1.2"
FontFamily="Roboto-Regular"
FontSize="{OnPlatform Android={OnIdiom Phone=13, Tablet=13}, iOS=14, UWP=14}" />
FontSize="{OnPlatform Android={OnIdiom Phone=13, Tablet=13}, iOS=14, WinUI=14}" />
</Grid>
</Grid>
@ -336,7 +336,7 @@
LineBreakMode="WordWrap"
TextColor="#DE000000"
FontFamily="Roboto-Medium"
FontSize="{OnPlatform Android={OnIdiom Phone=15, Tablet=22}, iOS=16, UWP=16}" />
FontSize="{OnPlatform Android={OnIdiom Phone=15, Tablet=22}, iOS=16, WinUI=16}" />
<Label Text="Support even number of digits"
Grid.Row="1"
LineBreakMode="WordWrap"
@ -344,7 +344,7 @@
TextColor="#99000000"
LineHeight="1.2"
FontFamily="Roboto-Regular"
FontSize="{OnPlatform Android={OnIdiom Phone=13, Tablet=13}, iOS=14, UWP=14}" />
FontSize="{OnPlatform Android={OnIdiom Phone=13, Tablet=13}, iOS=14, WinUI=14}" />
</Grid>
</Grid>
@ -379,7 +379,7 @@
LineBreakMode="WordWrap"
TextColor="#DE000000"
FontFamily="Roboto-Medium"
FontSize="{OnPlatform Android={OnIdiom Phone=15, Tablet=22}, iOS=16, UWP=16}" />
FontSize="{OnPlatform Android={OnIdiom Phone=15, Tablet=22}, iOS=16, WinUI=16}" />
<Label Text="Supports 11 numbers as input"
Grid.Row="1"
LineBreakMode="WordWrap"
@ -387,7 +387,7 @@
TextColor="#99000000"
LineHeight="1.2"
FontFamily="Roboto-Regular"
FontSize="{OnPlatform Android={OnIdiom Phone=13, Tablet=13}, iOS=14, UWP=14}" />
FontSize="{OnPlatform Android={OnIdiom Phone=13, Tablet=13}, iOS=14, WinUI=14}" />
</Grid>
</Grid>
@ -422,7 +422,7 @@
LineBreakMode="WordWrap"
TextColor="#DE000000"
FontFamily="Roboto-Medium"
FontSize="{OnPlatform Android={OnIdiom Phone=15, Tablet=22}, iOS=16, UWP=16}" />
FontSize="{OnPlatform Android={OnIdiom Phone=15, Tablet=22}, iOS=16, WinUI=16}" />
<Label Text="Supports 6 numbers as input"
Grid.Row="1"
LineBreakMode="WordWrap"
@ -430,7 +430,7 @@
TextColor="#99000000"
LineHeight="1.2"
FontFamily="Roboto-Regular"
FontSize="{OnPlatform Android={OnIdiom Phone=13, Tablet=13}, iOS=14, UWP=14}" />
FontSize="{OnPlatform Android={OnIdiom Phone=13, Tablet=13}, iOS=14, WinUI=14}" />
</Grid>
</Grid>
@ -465,7 +465,7 @@
LineBreakMode="WordWrap"
TextColor="#DE000000"
FontFamily="Roboto-Medium"
FontSize="{OnPlatform Android={OnIdiom Phone=15, Tablet=22}, iOS=16, UWP=16}" />
FontSize="{OnPlatform Android={OnIdiom Phone=15, Tablet=22}, iOS=16, WinUI=16}" />
<Label Text="Supports 8 numbers as input"
Grid.Row="1"
LineBreakMode="WordWrap"
@ -473,7 +473,7 @@
TextColor="#99000000"
LineHeight="1.2"
FontFamily="Roboto-Regular"
FontSize="{OnPlatform Android={OnIdiom Phone=13, Tablet=13}, iOS=14, UWP=14}" />
FontSize="{OnPlatform Android={OnIdiom Phone=13, Tablet=13}, iOS=14, WinUI=14}" />
</Grid>
</Grid>
@ -508,13 +508,13 @@
LineBreakMode="WordWrap"
TextColor="#DE000000"
FontFamily="Roboto-Medium"
FontSize="{OnPlatform Android={OnIdiom Phone=15, Tablet=22}, iOS=16, UWP=16}" />
FontSize="{OnPlatform Android={OnIdiom Phone=15, Tablet=22}, iOS=16, WinUI=16}" />
<Label Grid.Row="1"
Text="Supports 13 numbers as input"
LineBreakMode="WordWrap"
Margin='{OnPlatform Android="0,5,5,0", Default="0,5,0,0"}'
TextColor="#99000000"
FontSize="{OnPlatform Android={OnIdiom Phone=13, Tablet=13}, iOS=14, UWP=14}" />
FontSize="{OnPlatform Android={OnIdiom Phone=13, Tablet=13}, iOS=14, WinUI=14}" />
</Grid>
</Grid>

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

@ -18,7 +18,7 @@
HorizontalOptions="Center"
TextColor="White"
FontFamily="Roboto-Medium"
FontSize="{OnPlatform Android={OnIdiom Phone=15, Tablet=22}, iOS=16, UWP=16}" />
FontSize="{OnPlatform Android={OnIdiom Phone=15, Tablet=22}, iOS=16, WinUI=16}" />
<Grid BackgroundColor="White"
HeightRequest="{OnPlatform Android=170, Default= 170}"
WidthRequest="{OnPlatform Android=170, Default= 170}"
@ -43,7 +43,7 @@
LineBreakMode="WordWrap"
TextColor="White"
FontFamily="Roboto-Medium"
FontSize="{OnPlatform Android={OnIdiom Phone=12, Tablet=20}, iOS=12, UWP=16}"
FontSize="{OnPlatform Android={OnIdiom Phone=12, Tablet=20}, iOS=12, WinUI=16}"
HorizontalOptions="Center"
Margin="20,20" />
</StackLayout>
@ -57,14 +57,14 @@
LineBreakMode="WordWrap"
TextColor="#DE000000"
FontFamily="Roboto-Medium"
FontSize="{OnPlatform Android={OnIdiom Phone=15, Tablet=22}, iOS=16, UWP=16}" />
FontSize="{OnPlatform Android={OnIdiom Phone=15, Tablet=22}, iOS=16, WinUI=16}" />
<Label Text="Connected"
LineBreakMode="WordWrap"
Margin='{OnPlatform Android="0,5,5,0", Default="0,5,0,0"}'
TextColor="#99000000"
LineHeight="1.2"
FontFamily="Roboto-Regular"
FontSize="{OnPlatform Android={OnIdiom Phone=13, Tablet=13}, iOS=14, UWP=14}" />
FontSize="{OnPlatform Android={OnIdiom Phone=13, Tablet=13}, iOS=14, WinUI=14}" />
</StackLayout>
<BoxView HeightRequest="3"
@ -76,14 +76,14 @@
LineBreakMode="WordWrap"
TextColor="#DE000000"
FontFamily="Roboto-Medium"
FontSize="{OnPlatform Android={OnIdiom Phone=15, Tablet=22}, iOS=16, UWP=16}" />
FontSize="{OnPlatform Android={OnIdiom Phone=15, Tablet=22}, iOS=16, WinUI=16}" />
<Label Text="Excellent"
LineBreakMode="WordWrap"
Margin='{OnPlatform Android="0,5,5,0", Default="0,5,0,0"}'
TextColor="#99000000"
LineHeight="1.2"
FontFamily="Roboto-Regular"
FontSize="{OnPlatform Android={OnIdiom Phone=13, Tablet=13}, iOS=14, UWP=14}" />
FontSize="{OnPlatform Android={OnIdiom Phone=13, Tablet=13}, iOS=14, WinUI=14}" />
</StackLayout>
<BoxView HeightRequest="3"
@ -95,14 +95,14 @@
LineBreakMode="WordWrap"
TextColor="#DE000000"
FontFamily="Roboto-Medium"
FontSize="{OnPlatform Android={OnIdiom Phone=15, Tablet=22}, iOS=16, UWP=16}" />
FontSize="{OnPlatform Android={OnIdiom Phone=15, Tablet=22}, iOS=16, WinUI=16}" />
<Label Text="72 Mbps"
LineBreakMode="WordWrap"
Margin='{OnPlatform Android="0,5,5,0", Default="0,5,0,0"}'
TextColor="#99000000"
LineHeight="1.2"
FontFamily="Roboto-Regular"
FontSize="{OnPlatform Android={OnIdiom Phone=13, Tablet=13}, iOS=14, UWP=14}" />
FontSize="{OnPlatform Android={OnIdiom Phone=13, Tablet=13}, iOS=14, WinUI=14}" />
</StackLayout>
<BoxView HeightRequest="3"
@ -114,14 +114,14 @@
LineBreakMode="WordWrap"
TextColor="#DE000000"
FontFamily="Roboto-Medium"
FontSize="{OnPlatform Android={OnIdiom Phone=15, Tablet=22}, iOS=16, UWP=16}" />
FontSize="{OnPlatform Android={OnIdiom Phone=15, Tablet=22}, iOS=16, WinUI=16}" />
<Label Text="WPA/WPA2 PSK"
LineBreakMode="WordWrap"
Margin='{OnPlatform Android="0,5,5,0", Default="0,5,0,0"}'
TextColor="#99000000"
LineHeight="1.2"
FontFamily="Roboto-Regular"
FontSize="{OnPlatform Android={OnIdiom Phone=13, Tablet=13}, iOS=14, UWP=14}" />
FontSize="{OnPlatform Android={OnIdiom Phone=13, Tablet=13}, iOS=14, WinUI=14}" />
</StackLayout>
</StackLayout>

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

@ -5,6 +5,7 @@
// licensing@syncfusion.com. Any infringement will be prosecuted under
// applicable laws.
#endregion
using SampleBrowser.Maui.Base.Hosting;
using Syncfusion.Maui.Core.Hosting;
namespace SampleBrowser.Maui.BulletChart;
@ -22,6 +23,7 @@ public static class MauiProgram
fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");
});
builder.ConfigureSampleBrowserBase();
return builder.Build();
}

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

@ -74,10 +74,10 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="SampleBrowser.Maui.Base" version="22.2.5" />
<PackageReference Include="Syncfusion.Maui.Core" version="22.2.5" />
<PackageReference Include="Syncfusion.Maui.TabView" version="22.2.5" />
<PackageReference Include="Syncfusion.Maui.Gauges" version="22.2.5" />
<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" />
</ItemGroup>
<ItemGroup>

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

@ -11,22 +11,5 @@
<iconUrl>http://www.syncfusion.com/content/images/nuget/sync_logo_icon.png</iconUrl>
<description>RadialGauge and LinearGauge components 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>

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

@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net6.0-android;net6.0-ios;net6.0-maccatalyst</TargetFrameworks>
@ -80,10 +80,10 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="SampleBrowser.Maui.Base" version="22.2.5" />
<PackageReference Include="Syncfusion.Maui.Core" version="22.2.5" />
<PackageReference Include="Syncfusion.Maui.Charts" version="22.2.5" />
<PackageReference Include="Syncfusion.Maui.TabView" version="22.2.5" />
<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" />
</ItemGroup>
</Project>

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

@ -11,22 +11,5 @@
<iconUrl>http://www.syncfusion.com/content/images/nuget/sync_logo_icon.png</iconUrl>
<description>BusyIndicator 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>

14
MAUI/Buttons/NuGet.config Normal file
Просмотреть файл

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageRestore>
<add key="enabled" value="True" />
<add key="automatic" value="True" />
</packageRestore>
<packageSources>
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
</packageSources>
<bindingRedirects>
<add key="skip" value="False" />
</bindingRedirects>
</configuration>

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

@ -0,0 +1,31 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.31611.283
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SampleBrowser.Maui.Buttons", "SampleBrowser.Maui.Buttons\SampleBrowser.Maui.Buttons.csproj", "{B036E9B1-7BA0-4F43-A692-A28F5932F2E2}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
Release-Xml|Any CPU = Release-Xml|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{B036E9B1-7BA0-4F43-A692-A28F5932F2E2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B036E9B1-7BA0-4F43-A692-A28F5932F2E2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B036E9B1-7BA0-4F43-A692-A28F5932F2E2}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
{B036E9B1-7BA0-4F43-A692-A28F5932F2E2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B036E9B1-7BA0-4F43-A692-A28F5932F2E2}.Release|Any CPU.Build.0 = Release|Any CPU
{B036E9B1-7BA0-4F43-A692-A28F5932F2E2}.Release|Any CPU.Deploy.0 = Release|Any CPU
{B036E9B1-7BA0-4F43-A692-A28F5932F2E2}.Release-Xml|Any CPU.ActiveCfg = Release-Xml|Any CPU
{B036E9B1-7BA0-4F43-A692-A28F5932F2E2}.Release-Xml|Any CPU.Build.0 = Release-Xml|Any CPU
{B036E9B1-7BA0-4F43-A692-A28F5932F2E2}.Release-Xml|Any CPU.Deploy.0 = Release-Xml|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {61F7FB11-1E47-470C-91E2-47F8143E1572}
EndGlobalSection
EndGlobal

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

@ -0,0 +1,15 @@
<?xml version = "1.0" encoding = "UTF-8" ?>
<Application xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:SampleBrowser.Maui.Buttons"
xmlns:base="clr-namespace:SampleBrowser.Maui.Base;assembly=SampleBrowser.Maui.Base"
x:Class="SampleBrowser.Maui.Buttons.App">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<base:SampleBrowserStyles />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
</Application>

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

@ -0,0 +1,23 @@
#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.Reflection;
namespace SampleBrowser.Maui.Buttons;
public partial class App : Application
{
public App()
{
InitializeComponent();
Assembly assembly = typeof(App).GetTypeInfo().Assembly;
SampleBrowser.Maui.Base.BaseConfig.IsIndividualSB = true;
MainPage = SampleBrowser.Maui.Base.BaseConfig.MainPageInit(assembly);
}
}

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

@ -0,0 +1,76 @@
<?xml version="1.0" encoding="utf-8" ?>
<SyncfusionControls>
<ControlCategory Name="Buttons">
<Control ControlName="Button"
Title="Button"
Image="button.png"
Description="A button is a UI element for user interaction, representing a one-click or tap action."
StatusTag="New"
IsPreview="True">
<Sample SampleName="GettingStarted"
Title="Getting Started"
SearchTags="PrimaryButton, SfButton, Buttons, FlatButton, IconButton, OutlineButton, CircleButton"
CodeViewerPath="Button/GettingStarted/"
VideoLink=""/>
<Sample SampleName="Customizations"
Title="Customizations"
IsGettingStarted="True"
SearchTags="Button, SfButton, Buttons"
CodeViewerPath="Button/Customizations/"
VideoLink=""/>
</Control>
<Control Title="Segmented Control"
ControlName="SfSegmentedControl"
Image="segmentedcontrol.png"
Description="Offer choices from a linear set of segments, each as an independent button."
SearchTags="SfSegmentedControl,segmented buttons,segment,seg"
StatusTag="New"
IsPreview="True">
<Sample Title="Getting Started"
SampleName="GettingStarted"
CodeViewerPath="SegmentedControl/GettingStarted/"/>
</Control>
<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."
StatusTag="New"
IsPreview="True">
<Sample SampleName="GettingStarted"
Title="Getting Started"
SearchTags="checkbox, selection, threestates"
CodeViewerPath="CheckBox/GettingStarted/"
VideoLink=""/>
<Sample SampleName="Customizations"
Title="Customizations"
IsGettingStarted="True"
SearchTags="checkbox, selection, threestates"
CodeViewerPath="CheckBox/Customizations/"
VideoLink=""/>
</Control>
<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."
StatusTag="New"
IsPreview="True">
<Sample SampleName="GettingStarted"
Title="Getting Started"
SearchTags="radiobutton, twostate, button"
CodeViewerPath="RadioButton/GettingStarted/"
VideoLink=""/>
<Sample SampleName="Customizations"
Title="Customizations"
IsGettingStarted="True"
SearchTags="radiobutton, twostate, button"
CodeViewerPath="RadioButton/Customizations/"
VideoLink=""/>
</Control>
</ControlCategory>
</SyncfusionControls>

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

@ -0,0 +1,14 @@
#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
namespace SampleBrowser.Maui.Buttons
{
// All the code in this file is included in all platforms.
public class ControlConfig
{
}
}

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

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<SampleBrowser>
<Assemblies Prefix="SampleBrowser.Maui.Buttons" QualifiedInfo="Version=1.0.0.0, Culture=neutral, PublicKeyToken=null">
<Assembly Name="Buttons" />
</Assemblies>
</SampleBrowser>

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

@ -0,0 +1,33 @@
#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 Syncfusion.Maui.Core.Hosting;
using SampleBrowser.Maui.Base.Hosting;
namespace SampleBrowser.Maui.Buttons;
public static class MauiProgram
{
public static MauiApp CreateMauiApp()
{
var builder = MauiApp.CreateBuilder();
builder
.UseMauiApp<App>()
.ConfigureSyncfusionCore()
.ConfigureSampleBrowserBase()
.ConfigureFonts(fonts =>
{
fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");
fonts.AddFont("Roboto-Medium.ttf", "RobotoMedium");
fonts.AddFont("Roboto-Regular.ttf", "Roboto");
fonts.AddFont("SegmentIcon.ttf", "SegmentIcon");
});
return builder.Build();
}
}

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

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<application android:allowBackup="true" android:icon="@mipmap/appicon" android:roundIcon="@mipmap/appicon_round" android:supportsRtl="true"></application>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
</manifest>

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

@ -0,0 +1,17 @@
#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 Android.App;
using Android.Content.PM;
using Android.OS;
namespace SampleBrowser.Maui.Buttons;
[Activity(Theme = "@style/Maui.SplashTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize | ConfigChanges.Density)]
public class MainActivity : MauiAppCompatActivity
{
}

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

@ -0,0 +1,22 @@
#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 Android.App;
using Android.Runtime;
namespace SampleBrowser.Maui.Buttons;
[Application]
public class MainApplication : MauiApplication
{
public MainApplication(IntPtr handle, JniHandleOwnership ownership)
: base(handle, ownership)
{
}
protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
}

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

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">#512BD4</color>
<color name="colorPrimaryDark">#2B0B98</color>
<color name="colorAccent">#2B0B98</color>
</resources>

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

@ -0,0 +1,16 @@
#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 Foundation;
namespace SampleBrowser.Maui.Buttons;
[Register("AppDelegate")]
public class AppDelegate : MauiUIApplicationDelegate
{
protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
}

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

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>UIDeviceFamily</key>
<array>
<integer>1</integer>
<integer>2</integer>
</array>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>arm64</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>XSAppIconAssets</key>
<string>Assets.xcassets/appicon.appiconset</string>
</dict>
</plist>

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

@ -0,0 +1,22 @@
#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 ObjCRuntime;
using UIKit;
namespace SampleBrowser.Maui.Buttons;
public class Program
{
// This is the main entry point of the application.
static void Main(string[] args)
{
// if you want to use a different Application Delegate class from "AppDelegate"
// you can specify it here.
UIApplication.Main(args, null, typeof(AppDelegate));
}
}

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

@ -0,0 +1,23 @@
#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 Microsoft.Maui;
using Microsoft.Maui.Hosting;
namespace SampleBrowser.Maui.Buttons;
class Program : MauiApplication
{
protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
static void Main(string[] args)
{
var app = new Program();
app.Run(args);
}
}

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

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest package="com.companyname.SampleBrowser.Maui.Buttons" version="1.0.0" api-version="7" xmlns="http://tizen.org/ns/packages">
<profile name="common" />
<ui-application appid="com.companyname.SampleBrowser.Maui.Buttons" exec="SampleBrowser.Maui.Buttons.dll" multiple="false" nodisplay="false" taskmanage="true" type="dotnet" launch_mode="single">
<label>SampleBrowser.Maui.Buttons</label>
<icon>appicon.xhigh.png</icon>
<metadata key="http://tizen.org/metadata/prefer_dotnet_aot" value="true" />
</ui-application>
<shortcut-list />
<privileges>
<privilege>http://tizen.org/privilege/internet</privilege>
</privileges>
<dependencies />
<provides-appdefined-privileges />
</manifest>

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

@ -0,0 +1,8 @@
<maui:MauiWinUIApplication
x:Class="SampleBrowser.Maui.Buttons.WinUI.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:maui="using:Microsoft.Maui"
xmlns:local="using:SampleBrowser.Maui.Buttons.WinUI">
</maui:MauiWinUIApplication>

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

@ -0,0 +1,51 @@
#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 Microsoft.Maui;
using Microsoft.Maui.Hosting;
using Microsoft.UI;
using Microsoft.UI.Windowing;
using Microsoft.UI.Xaml;
using WinRT.Interop;
// To learn more about WinUI, the WinUI project structure,
// and more about our project templates, see: http://aka.ms/winui-project-info.
namespace SampleBrowser.Maui.Buttons.WinUI;
/// <summary>
/// Provides application-specific behavior to supplement the default Application class.
/// </summary>
public partial class App : MauiWinUIApplication
{
/// <summary>
/// Initializes the singleton application object. This is the first line of authored code
/// executed, and as such is the logical equivalent of main() or WinMain().
/// </summary>
public App()
{
this.InitializeComponent();
}
protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
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)
{
platformWindow.ExtendsContentIntoTitleBar = false;
platformWindow.Title = ".NET MAUI Buttons Demo";
}
}
}
}

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

@ -0,0 +1,35 @@
<?xml version="1.0" encoding="utf-8"?>
<Package
xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
IgnorableNamespaces="uap rescap">
<Identity Publisher="CN=User Name" />
<Properties>
<PublisherDisplayName>User Name</PublisherDisplayName>
</Properties>
<Dependencies>
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.17763.0" MaxVersionTested="10.0.19041.0" />
<TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.17763.0" MaxVersionTested="10.0.19041.0" />
<PackageDependency Name="Microsoft.VCLibs.140.00" MinVersion="14.0.24217.0" Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US" />
<PackageDependency Name="Microsoft.VCLibs.140.00.UWPDesktop" MinVersion="14.0.24217.0" Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US" />
</Dependencies>
<Resources>
<Resource Language="x-generate" />
</Resources>
<Applications>
<Application Id="App" Executable="$targetnametoken$.exe" EntryPoint="$targetentrypoint$">
<uap:VisualElements />
</Application>
</Applications>
<Capabilities>
<rescap:Capability Name="runFullTrust" />
</Capabilities>
</Package>

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

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity version="1.0.0.0" name="SampleBrowser.Maui.Buttons.WinUI.app"/>
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<!-- The combination of below two tags have the following effect:
1) Per-Monitor for >= Windows 10 Anniversary Update
2) System < Windows 10 Anniversary Update
-->
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true/PM</dpiAware>
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitorV2, PerMonitor</dpiAwareness>
</windowsSettings>
</application>
</assembly>

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

@ -0,0 +1,16 @@
#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 Foundation;
namespace SampleBrowser.Maui.Buttons;
[Register("AppDelegate")]
public class AppDelegate : MauiUIApplicationDelegate
{
protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
}

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

@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UIDeviceFamily</key>
<array>
<integer>1</integer>
<integer>2</integer>
</array>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>arm64</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>XSAppIconAssets</key>
<string>Assets.xcassets/appicon.appiconset</string>
</dict>
</plist>

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

@ -0,0 +1,22 @@
#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 ObjCRuntime;
using UIKit;
namespace SampleBrowser.Maui.Buttons;
public class Program
{
// This is the main entry point of the application.
static void Main(string[] args)
{
// if you want to use a different Application Delegate class from "AppDelegate"
// you can specify it here.
UIApplication.Main(args, null, typeof(AppDelegate));
}
}

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

@ -0,0 +1,8 @@
{
"profiles": {
"Windows Machine": {
"commandName": "MsixPackage",
"nativeDebugging": false
}
}
}

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

@ -0,0 +1,3 @@
<svg width="456" height="456" viewBox="0 0 456 456" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M456 0H0V456H456V0Z" fill="#4822E3"/>
</svg>

После

Ширина:  |  Высота:  |  Размер: 154 B

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

@ -0,0 +1,14 @@
<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M48 0H0V48H48V0Z" fill="#4822E3"/>
<g opacity="0.9">
<rect x="15" y="17.3984" width="4.8406" height="4.80195" fill="white"/>
<rect x="15" y="22.8086" width="4.8406" height="4.80195" fill="white"/>
<rect x="15" y="28.1992" width="4.8406" height="4.80195" fill="white"/>
<rect x="20.4473" y="17.3984" width="4.8406" height="4.80195" fill="white"/>
<rect x="20.4473" y="22.8086" width="4.8406" height="4.80195" fill="white"/>
<rect x="20.4473" y="28.1992" width="4.8406" height="4.80195" fill="white"/>
<rect width="4.82131" height="4.82131" transform="matrix(0.709935 0.704267 -0.709935 0.704267 30.5234 15)" fill="white"/>
<rect x="25.8906" y="22.8086" width="4.8406" height="4.80195" fill="white"/>
<rect x="25.8906" y="28.1992" width="4.8406" height="4.80195" fill="white"/>
</g>
</svg>

После

Ширина:  |  Высота:  |  Размер: 893 B

Двоичный файл не отображается.

Двоичный файл не отображается.

Двоичный файл не отображается.

Двоичный файл не отображается.

Двоичный файл не отображается.

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

@ -0,0 +1,14 @@
Any raw assets you want to be deployed with your application can be placed in
this directory (and child directories) and given a Build Action of "MauiAsset":
<MauiAsset Include="AboutAssets.txt" />
These files will be deployed with you package and will be accessible using Essentials:
async Task LoadMauiAsset()
{
using var stream = await FileSystem.OpenAppPackageFileAsync("AboutAssets.txt");
using var reader = new StreamReader(stream);
var contents = reader.ReadToEnd();
}

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

После

Ширина:  |  Высота:  |  Размер: 17 KiB

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

@ -0,0 +1,89 @@
<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>
<OutputType>Exe</OutputType>
<RootNamespace>SampleBrowser.Maui.Buttons</RootNamespace>
<UseMaui>true</UseMaui>
<SingleProject>true</SingleProject>
<ImplicitUsings>enable</ImplicitUsings>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<AnalysisLevel>latest</AnalysisLevel>
<AnalysisLevelSecurity>latest-recommended</AnalysisLevelSecurity>
<CodeAnalysisTreatWarningsAsErrors>true</CodeAnalysisTreatWarningsAsErrors>
<Nullable>enable</Nullable>
<NoWarn>$(NoWarn);NU1803</NoWarn>
<!-- Display name -->
<ApplicationTitle>SampleBrowser.Maui.Buttons</ApplicationTitle>
<!-- App Identifier -->
<ApplicationId>com.syncfusion.samplebrowser.maui.buttons</ApplicationId>
<ApplicationIdGuid>B91FD42F-E73F-48E9-83B7-320695D31C9E</ApplicationIdGuid>
<!-- Versions -->
<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
<ApplicationVersion>1</ApplicationVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">14.2</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">14.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">21.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.18362.0</SupportedOSPlatformVersion>
<TargetPlatformMinVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.18362.0</TargetPlatformMinVersion>
<Configurations>Debug;Release;Release-Xml</Configurations>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DefineConstants>TRACE;DEBUG;</DefineConstants>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<WarningLevel>5</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DefineConstants>TRACE;RELEASE;</DefineConstants>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<WarningLevel>5</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release-Xml|AnyCPU' ">
<DefineConstants>TRACE;RELEASE;</DefineConstants>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<WarningLevel>5</WarningLevel>
</PropertyGroup>
<ItemGroup>
<!-- App Icon -->
<MauiIcon Include="Resources\AppIcon\appicon.svg" ForegroundFile="Resources\AppIcon\appiconfg.svg" Color="#4822E3" />
<!-- Splash Screen -->
<MauiSplashScreen Include="Resources\Splash\splash.svg" Color="#4822E3" BaseSize="*,*" />
<!-- Custom Fonts -->
<MauiFont Include="Resources\Fonts\*" />
<!-- Raw Assets (also remove the "Resources\Raw" prefix) -->
<MauiAsset Include="Resources\Raw\**" LogicalName="%(RecursiveDir)%(Filename)%(Extension)" />
</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" />
</ItemGroup>
</Project>

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

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata>
<id>SampleBrowser.Maui.Buttons</id>
<version>20.1.0.1</version>
<authors>Syncfusion Inc.</authors>
<owners>Syncfusion Inc.</owners>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<licenseUrl>http://www.syncfusion.com/nuget/license</licenseUrl>
<projectUrl>http://www.syncfusion.com/</projectUrl>
<iconUrl>http://www.syncfusion.com/content/images/nuget/sync_logo_icon.png</iconUrl>
<description>Buttons component for Syncfusion .NET MAUI</description>
<copyright>Copyright 2001 - 2019 Syncfusion Inc.</copyright>
</metadata>
</package>

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

@ -0,0 +1,265 @@
<Project>
<ItemGroup>
<Compile Include="$(msbuildthisfiledirectory)\Samples\SegmentedControl\GettingStarted\View\GettingStarted.xaml.cs">
<Link>Samples\SegmentedControl\GettingStarted\View\GettingStarted.xaml.cs</Link>
<dependentupon>GettingStarted.xaml</dependentupon>
</Compile>
<Compile Include="$(msbuildthisfiledirectory)\Samples\SegmentedControl\GettingStarted\View\GettingStartedDesktopUI.xaml.cs">
<Link>Samples\SegmentedControl\GettingStarted\View\GettingStartedDesktopUI.xaml.cs</Link>
<dependentupon>GettingStartedDesktopUI.xaml</dependentupon>
</Compile>
<Compile Include="$(msbuildthisfiledirectory)\Samples\SegmentedControl\GettingStarted\View\GettingStartedMobileUI.xaml.cs">
<Link>Samples\SegmentedControl\GettingStarted\View\GettingStartedMobileUI.xaml.cs</Link>
<dependentupon>GettingStartedMobileUI.xaml</dependentupon>
</Compile>
<Compile Include="$(MSBuildThisFileDirectory)Samples\SegmentedControl\GettingStarted\ViewModel\GettingStartedViewModel.cs">
<Link>Samples\SegmentedControl\GettingStarted\ViewModel\GettingStartedViewModel.cs</Link>
</Compile>
<Compile Include="$(MSBuildThisFileDirectory)Samples\CheckBox\GettingStarted\ViewModel\GettingStartedViewModel.cs">
<Link>Samples\CheckBox\GettingStarted\ViewModel\GettingStartedViewModel.cs</Link>
</Compile>
<Compile Include="$(MSBuildThisFileDirectory)\Samples\CheckBox\GettingStarted\GettingStarted.xaml.cs">
<Link>Samples\CheckBox\GettingStarted\GettingStarted.xaml.cs</Link>
<DependentUpon>GettingStarted.xaml</DependentUpon>
</Compile>
<Compile Include="$(MSBuildThisFileDirectory)\Samples\CheckBox\GettingStarted\GettingStartedDesktop.xaml.cs">
<Link>Samples\CheckBox\GettingStarted\GettingStartedDesktop.xaml.cs</Link>
<DependentUpon>GettingStartedDesktop.xaml</DependentUpon>
</Compile>
<Compile Include="$(MSBuildThisFileDirectory)\Samples\CheckBox\GettingStarted\GettingStartedMobile.xaml.cs">
<Link>Samples\CheckBox\GettingStarted\GettingStartedMobile.xaml.cs</Link>
<DependentUpon>GettingStartedMobile.xaml</DependentUpon>
</Compile>
<Compile Include="$(MSBuildThisFileDirectory)\Samples\CheckBox\Customizations\View\Customizations.xaml.cs">
<Link>Samples\CheckBox\Customizations\View\Customizations.xaml.cs</Link>
<DependentUpon>Customizations.xaml</DependentUpon>
</Compile>
<Compile Include="$(MSBuildThisFileDirectory)\Samples\CheckBox\Customizations\View\CustomizationsDesktop.xaml.cs">
<Link>Samples\CheckBox\Customizations\View\CustomizationsDesktop.xaml.cs</Link>
<DependentUpon>CustomizationsDesktop.xaml</DependentUpon>
</Compile>
<Compile Include="$(MSBuildThisFileDirectory)\Samples\CheckBox\Customizations\View\CustomizationsMobile.xaml.cs">
<Link>Samples\CheckBox\Customizations\View\CustomizationsMobile.xaml.cs</Link>
<DependentUpon>CustomizationsMobile.xaml</DependentUpon>
</Compile>
<Compile Include="$(MSBuildThisFileDirectory)\Samples\CheckBox\Customizations\ViewModel\ViewModel.cs">
<Link>Samples\CheckBox\Customizations\ViewModel\ViewModel.cs</Link>
</Compile>
<Compile Include="$(MSBuildThisFileDirectory)\Samples\RadioButton\GettingStarted\GettingStarted.xaml.cs">
<Link>Samples\RadioButton\GettingStarted\GettingStarted.xaml.cs</Link>
<DependentUpon>GettingStarted.xaml</DependentUpon>
</Compile>
<Compile Include="$(MSBuildThisFileDirectory)\Samples\RadioButton\GettingStarted\GettingStartedDesktop.xaml.cs">
<Link>Samples\RadioButton\GettingStarted\GettingStartedDesktop.xaml.cs</Link>
<DependentUpon>GettingStartedDesktop.xaml</DependentUpon>
</Compile>
<Compile Include="$(MSBuildThisFileDirectory)\Samples\RadioButton\GettingStarted\GettingStartedMobile.xaml.cs">
<Link>Samples\RadioButton\GettingStarted\GettingStartedMobile.xaml.cs</Link>
<DependentUpon>GettingStartedMobile.xaml</DependentUpon>
</Compile>
<Compile Include="$(MSBuildThisFileDirectory)\Samples\RadioButton\Customizations\View\Customizations.xaml.cs">
<Link>Samples\RadioButton\Customizations\View\Customizations.xaml.cs</Link>
<DependentUpon>Customizations.xaml</DependentUpon>
</Compile>
<Compile Include="$(MSBuildThisFileDirectory)\Samples\RadioButton\Customizations\View\CustomizationsDesktop.xaml.cs">
<Link>Samples\RadioButton\Customizations\View\CustomizationsDesktop.xaml.cs</Link>
<DependentUpon>CustomizationsDesktop.xaml</DependentUpon>
</Compile>
<Compile Include="$(MSBuildThisFileDirectory)\Samples\RadioButton\Customizations\View\CustomizationsMobile.xaml.cs">
<Link>Samples\RadioButton\Customizations\View\CustomizationsMobile.xaml.cs</Link>
<DependentUpon>CustomizationsMobile.xaml</DependentUpon>
</Compile>
<Compile Include="$(MSBuildThisFileDirectory)\Samples\RadioButton\Customizations\ViewModel\ViewModel.cs">
<Link>Samples\RadioButton\Customizations\ViewModel\ViewModel.cs</Link>
</Compile>
<Compile Include="$(MSBuildThisFileDirectory)\Samples\Button\GettingStarted\GettingStarted.xaml.cs">
<Link>Samples\Button\GettingStarted\GettingStarted.xaml.cs</Link>
<DependentUpon>GettingStarted.xaml</DependentUpon>
</Compile>
<Compile Include="$(msbuildthisfiledirectory)\Samples\Button\GettingStarted\GettingStartedDesktop.xaml.cs">
<Link>Samples\Button\GettingStarted\GettingStartedDesktop.xaml.cs</Link>
<dependentupon>GettingStartedDesktop.xaml</dependentupon>
</Compile>
<Compile Include="$(msbuildthisfiledirectory)\Samples\Button\GettingStarted\GettingStartedMobile.xaml.cs">
<Link>Samples\Button\GettingStarted\GettingStartedMobile.xaml.cs</Link>
<dependentupon>GettingStartedMobile.xaml</dependentupon>
</Compile>
<Compile Include="$(MSBuildThisFileDirectory)\Samples\Button\Customizations\View\Customizations.xaml.cs">
<Link>Samples\Button\Customizations\View\Customizations.xaml.cs</Link>
<DependentUpon>Customizations.xaml</DependentUpon>
</Compile>
<Compile Include="$(MSBuildThisFileDirectory)\Samples\Button\Customizations\View\CustomizationsDesktop.xaml.cs">
<Link>Samples\Button\Customizations\View\CustomizationsDesktop.xaml.cs</Link>
<DependentUpon>CustomizationsDesktop.xaml</DependentUpon>
</Compile>
<Compile Include="$(MSBuildThisFileDirectory)\Samples\Button\Customizations\View\CustomizationsMobile.xaml.cs">
<Link>Samples\Button\Customizations\View\CustomizationsMobile.xaml.cs</Link>
<DependentUpon>CustomizationsMobile.xaml</DependentUpon>
</Compile>
<Compile Include="$(MSBuildThisFileDirectory)\Samples\Button\Customizations\ViewModel\ViewModel.cs">
<Link>Samples\Button\Customizations\ViewModel\ViewModel.cs</Link>
</Compile>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="$(MSBuildThisFileDirectory)\ButtonsSamplesList.xml" >
<Link>ButtonsSamplesList.xml</Link>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<MauiXaml Include="$(MSBuildThisFileDirectory)\Samples\SegmentedControl\GettingStarted\View\GettingStarted.xaml">
<Link>Samples\SegmentedControl\GettingStarted\View\GettingStarted.xaml</Link>
</MauiXaml>
</ItemGroup>
<ItemGroup>
<MauiXaml Include="$(MSBuildThisFileDirectory)\Samples\SegmentedControl\GettingStarted\View\GettingStartedDesktopUI.xaml">
<Link>Samples\SegmentedControl\GettingStarted\View\GettingStartedDesktopUI.xaml</Link>
</MauiXaml>
</ItemGroup>
<ItemGroup>
<MauiXaml Include="$(MSBuildThisFileDirectory)\Samples\SegmentedControl\GettingStarted\View\GettingStartedMobileUI.xaml">
<Link>Samples\SegmentedControl\GettingStarted\View\GettingStartedMobileUI.xaml</Link>
</MauiXaml>
</ItemGroup>
<ItemGroup>
<MauiXaml Include="$(MSBuildThisFileDirectory)\Samples\CheckBox\GettingStarted\GettingStarted.xaml">
<Link>Samples\CheckBox\GettingStarted\GettingStarted.xaml</Link>
</MauiXaml>
</ItemGroup>
<ItemGroup>
<MauiXaml Include="$(MSBuildThisFileDirectory)\Samples\CheckBox\GettingStarted\GettingStartedDesktop.xaml">
<Link>Samples\CheckBox\GettingStarted\GettingStartedDesktop.xaml</Link>
</MauiXaml>
</ItemGroup>
<ItemGroup>
<MauiXaml Include="$(MSBuildThisFileDirectory)\Samples\CheckBox\GettingStarted\GettingStartedMobile.xaml">
<Link>Samples\CheckBox\GettingStarted\GettingStartedMobile.xaml</Link>
</MauiXaml>
</ItemGroup>
<ItemGroup>
<MauiXaml Include="$(MSBuildThisFileDirectory)\Samples\CheckBox\Customizations\View\Customizations.xaml">
<Link>Samples\CheckBox\Customizations\View\Customizations.xaml</Link>
</MauiXaml>
</ItemGroup>
<ItemGroup>
<MauiXaml Include="$(MSBuildThisFileDirectory)\Samples\CheckBox\Customizations\View\CustomizationsDesktop.xaml">
<Link>Samples\CheckBox\Customizations\View\CustomizationsDesktop.xaml</Link>
</MauiXaml>
</ItemGroup>
<ItemGroup>
<MauiXaml Include="$(MSBuildThisFileDirectory)\Samples\CheckBox\Customizations\View\CustomizationsMobile.xaml">
<Link>Samples\CheckBox\Customizations\View\CustomizationsMobile.xaml</Link>
</MauiXaml>
</ItemGroup>
<ItemGroup>
<MauiXaml Include="$(MSBuildThisFileDirectory)\Samples\RadioButton\GettingStarted\GettingStarted.xaml">
<Link>Samples\RadioButton\GettingStarted\GettingStarted.xaml</Link>
</MauiXaml>
</ItemGroup>
<ItemGroup>
<MauiXaml Include="$(MSBuildThisFileDirectory)\Samples\RadioButton\GettingStarted\GettingStartedDesktop.xaml">
<Link>Samples\RadioButton\GettingStarted\GettingStartedDesktop.xaml</Link>
</MauiXaml>
</ItemGroup>
<ItemGroup>
<MauiXaml Include="$(MSBuildThisFileDirectory)\Samples\RadioButton\GettingStarted\GettingStartedMobile.xaml">
<Link>Samples\RadioButton\GettingStarted\GettingStartedMobile.xaml</Link>
</MauiXaml>
</ItemGroup>
<ItemGroup>
<MauiXaml Include="$(MSBuildThisFileDirectory)\Samples\RadioButton\Customizations\View\Customizations.xaml">
<Link>Samples\RadioButton\Customizations\View\Customizations.xaml</Link>
</MauiXaml>
</ItemGroup>
<ItemGroup>
<MauiXaml Include="$(MSBuildThisFileDirectory)\Samples\RadioButton\Customizations\View\CustomizationsDesktop.xaml">
<Link>Samples\RadioButton\Customizations\View\CustomizationsDesktop.xaml</Link>
</MauiXaml>
</ItemGroup>
<ItemGroup>
<MauiXaml Include="$(MSBuildThisFileDirectory)\Samples\RadioButton\Customizations\View\CustomizationsMobile.xaml">
<Link>Samples\RadioButton\Customizations\View\CustomizationsMobile.xaml</Link>
</MauiXaml>
</ItemGroup>
<ItemGroup>
<MauiXaml Include="$(MSBuildThisFileDirectory)\Samples\Button\GettingStarted\GettingStarted.xaml">
<Link>Samples\Button\GettingStarted\GettingStarted.xaml</Link>
</MauiXaml>
</ItemGroup>
<ItemGroup>
<MauiXaml Include="$(MSBuildThisFileDirectory)\Samples\Button\GettingStarted\GettingStartedDesktop.xaml">
<Link>Samples\Button\GettingStarted\GettingStartedDesktop.xaml</Link>
</MauiXaml>
</ItemGroup>
<ItemGroup>
<MauiXaml Include="$(MSBuildThisFileDirectory)\Samples\Button\GettingStarted\GettingStartedMobile.xaml">
<Link>Samples\Button\GettingStarted\GettingStartedMobile.xaml</Link>
</MauiXaml>
</ItemGroup>
<ItemGroup>
<MauiXaml Include="$(MSBuildThisFileDirectory)\Samples\Button\Customizations\View\Customizations.xaml">
<Link>Samples\Button\Customizations\View\Customizations.xaml</Link>
</MauiXaml>
</ItemGroup>
<ItemGroup>
<MauiXaml Include="$(MSBuildThisFileDirectory)\Samples\Button\Customizations\View\CustomizationsDesktop.xaml">
<Link>Samples\Button\Customizations\View\CustomizationsDesktop.xaml</Link>
</MauiXaml>
</ItemGroup>
<ItemGroup>
<MauiXaml Include="$(MSBuildThisFileDirectory)\Samples\Button\Customizations\View\CustomizationsMobile.xaml">
<Link>Samples\Button\Customizations\View\CustomizationsMobile.xaml</Link>
</MauiXaml>
</ItemGroup>
</Project>

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

@ -0,0 +1,7 @@
<localCore:SampleView x:Class="SampleBrowser.Maui.Buttons.Button.Customizations"
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:localCore="clr-namespace:SampleBrowser.Maui.Base;assembly=SampleBrowser.Maui.Base"
BackgroundColor="White">
</localCore:SampleView>

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

@ -0,0 +1,23 @@
#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 SampleBrowser.Maui.Base;
namespace SampleBrowser.Maui.Buttons.Button;
public partial class Customizations : SampleView
{
public Customizations()
{
InitializeComponent();
#if ANDROID || IOS
this.Content = new CustomizationsMobile();
#else
this.Content = new CustomizationsDesktop();
#endif
}
}

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

@ -0,0 +1,344 @@
<?xml version="1.0" encoding="utf-8" ?>
<localCore:SampleView x:Class="SampleBrowser.Maui.Buttons.Button.CustomizationsDesktop"
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:localCore="clr-namespace:SampleBrowser.Maui.Base;assembly=SampleBrowser.Maui.Base"
xmlns:tabView="clr-namespace:Syncfusion.Maui.TabView;assembly=Syncfusion.Maui.TabView"
xmlns:Core="clr-namespace:Syncfusion.Maui.Core;assembly=Syncfusion.Maui.Core"
xmlns:button="clr-namespace:Syncfusion.Maui.Buttons;assembly=Syncfusion.Maui.Buttons"
xmlns:sliders="clr-namespace:Syncfusion.Maui.Sliders;assembly=Syncfusion.Maui.Sliders"
xmlns:local="clr-namespace:SampleBrowser.Maui.Buttons.Button"
BackgroundColor="White"
WidthRequest="380">
<localCore:SampleView.Resources>
<Style x:Key="CheckBoxNormalStyle" TargetType="button:SfCheckBox">
<Setter Property="TextColor" Value="Black"/>
<Setter Property="CheckedColor" Value="#6200EE"/>
<Setter Property="FontFamily" Value="Roboto-Regular"/>
</Style>
<Style x:Key="EntryNormalStyle" TargetType="Entry">
<Setter Property="TextColor" Value="Black"/>
<Setter Property="FontFamily" Value="Roboto-Regular"/>
</Style>
</localCore:SampleView.Resources>
<localCore:SampleView.Content>
<Grid WidthRequest="380" HorizontalOptions="Center">
<Grid.RowDefinitions>
<RowDefinition Height="150"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Border Margin="5,10" Grid.Row="0" BackgroundColor="#f6f6f8" Stroke="Gray" StrokeShape="RoundRectangle 10" StrokeThickness="0.3">
<Grid>
<button:SfButton x:Name="cartButton"
Background="#6200EE"
StrokeThickness="{Binding BorderWidth}"
WidthRequest="150"
HeightRequest="50"
BackgroundImageSource="{Binding BackgroundImage}"
TextColor="{Binding TextColor}"
CornerRadius="{Binding CornerRadius,Mode=TwoWay}">
<button:SfButton.Content>
<DataTemplate>
<Grid HorizontalOptions="Center" VerticalOptions="Center">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid Padding="5,0,5,0">
<Label Text="&#xE7BF;"
HorizontalTextAlignment="Center"
VerticalOptions="Center"
VerticalTextAlignment="Center"
HorizontalOptions="Start"
FontSize="25"
FontFamily="SegmentIcon"
TextColor="{Binding TextColor}"/>
</Grid>
<Grid Padding="0,15,15,15" Grid.Column="1" >
<Label Text="{Binding Text}"
HorizontalOptions="Center"
HorizontalTextAlignment="Center"
FontSize="15"
HeightRequest="20"
TextColor="{Binding TextColor}"
VerticalTextAlignment="Center"
VerticalOptions="Center"
LineBreakMode="NoWrap" >
</Label>
</Grid>
</Grid>
</DataTemplate>
</button:SfButton.Content>
</button:SfButton>
</Grid>
</Border>
<Border Grid.Row="1" Margin="5,0,5,10" BackgroundColor="#f6f6f8" Stroke="Gray" StrokeShape="RoundRectangle 10" StrokeThickness="0.3">
<Grid>
<ScrollView VerticalScrollBarVisibility="Never">
<StackLayout HorizontalOptions="Center" VerticalOptions="Start">
<Core:SfTextInputLayout ContainerType="Outlined" Hint="Text" Margin="10,5,15,0">
<Entry Style="{StaticResource EntryNormalStyle}"
Text="{Binding Text,Mode=TwoWay}"
Placeholder="ADD TO CART"/>
</Core:SfTextInputLayout>
<tabView:SfTabView
Margin="15,0"
IndicatorBackground="#c6c6c6"
TabBarBackground="White"
HorizontalOptions="Start"
VerticalOptions="Center"
HeightRequest="130">
<tabView:SfTabItem Header="Text Color"
FontFamily="Roboto-Regular"
HeightRequest="40">
<tabView:SfTabItem.FontSize>
<OnPlatform x:TypeArguments="x:Double">
<On Platform="WinUI" Value ="12"/>
<On Platform="MacCatalyst" Value="10"/>
</OnPlatform>
</tabView:SfTabItem.FontSize>
<tabView:SfTabItem.Content>
<StackLayout HorizontalOptions="CenterAndExpand" VerticalOptions="CenterAndExpand">
<HorizontalStackLayout Spacing="15">
<Button WidthRequest="40"
HeightRequest="40"
CornerRadius="20"
BackgroundColor="#E5E4E2"
Clicked="TextColorSegment_Clicked"
x:Name="TextColorSegment" >
</Button>
<Button WidthRequest="40"
HeightRequest="40"
CornerRadius="20"
BackgroundColor="#c6c6c6"
Clicked="TextColorSegment_Clicked_1"
x:Name="TextColorSegment1" >
</Button>
<Button WidthRequest="40"
HeightRequest="40"
CornerRadius="20"
BackgroundColor="#538eed"
Clicked="TextColorSegment_Clicked_2"
x:Name="TextColorSegment2" >
</Button>
<Button WidthRequest="40"
HeightRequest="40"
CornerRadius="20"
BackgroundColor="#af2463"
Clicked="TextColorSegment_Clicked_3"
x:Name="TextColorSegment3" >
</Button>
<Button WidthRequest="40"
HeightRequest="40"
CornerRadius="20"
BackgroundColor="#000000"
Clicked="TextColorSegment_Clicked_4"
x:Name="TextColorSegment4" >
</Button>
</HorizontalStackLayout>
</StackLayout>
</tabView:SfTabItem.Content>
</tabView:SfTabItem>
<tabView:SfTabItem Header="Background" FontFamily="Roboto-Regular" HeightRequest="40">
<tabView:SfTabItem.FontSize>
<OnPlatform x:TypeArguments="x:Double">
<On Platform="WinUI" Value ="12"/>
<On Platform="MacCatalyst" Value="10"/>
</OnPlatform>
</tabView:SfTabItem.FontSize>
<tabView:SfTabItem.Content>
<StackLayout HorizontalOptions="CenterAndExpand" VerticalOptions="CenterAndExpand">
<HorizontalStackLayout Spacing="15">
<Button WidthRequest="40"
HeightRequest="40"
CornerRadius="20"
BackgroundColor="#E5E4E2"
Clicked="BackgroundColorSegment_Clicked"
x:Name="BackgroundColorSegment">
</Button>
<Button WidthRequest="40"
HeightRequest="40"
CornerRadius="20"
BackgroundColor="#c6c6c6"
Clicked="BackgroundColorSegment_Clicked_1"
x:Name="BackgroundColorSegment1">
</Button>
<Button WidthRequest="40"
HeightRequest="40"
CornerRadius="20"
BackgroundColor="#538eed"
Clicked="BackgroundColorSegment_Clicked_2"
x:Name="BackgroundColorSegment2">
</Button>
<Button WidthRequest="40"
HeightRequest="40"
CornerRadius="20"
BackgroundColor="#af2463"
Clicked="BackgroundColorSegment_Clicked_3"
x:Name="BackgroundColorSegment3">
</Button>
<Button WidthRequest="40"
HeightRequest="40"
CornerRadius="20"
BackgroundColor="#000000"
Clicked="BackgroundColorSegment_Clicked_4"
x:Name="BackgroundColorSegment4">
</Button>
</HorizontalStackLayout>
</StackLayout>
</tabView:SfTabItem.Content>
</tabView:SfTabItem>
<tabView:SfTabItem Header="Border Color" FontFamily="Roboto-Regular" HeightRequest="40">
<tabView:SfTabItem.FontSize>
<OnPlatform x:TypeArguments="x:Double">
<On Platform="WinUI" Value ="12"/>
<On Platform="MacCatalyst" Value="10"/>
</OnPlatform>
</tabView:SfTabItem.FontSize>
<tabView:SfTabItem.Content>
<StackLayout HorizontalOptions="CenterAndExpand" VerticalOptions="CenterAndExpand">
<HorizontalStackLayout Spacing="15">
<Button WidthRequest="40"
HeightRequest="40"
CornerRadius="20"
BackgroundColor="#E5E4E2"
Clicked="BorderColorSegment_Clicked"
x:Name="BorderColorSegment" >
</Button>
<Button WidthRequest="40"
HeightRequest="40"
CornerRadius="20"
BackgroundColor="#c6c6c6"
Clicked="BorderColorSegment_Clicked_1"
x:Name="BorderColorSegment1" >
</Button>
<Button WidthRequest="40"
HeightRequest="40"
CornerRadius="20"
BackgroundColor="#538eed"
Clicked="BorderColorSegment_Clicked_2"
x:Name="BorderColorSegment2" >
</Button>
<Button WidthRequest="40"
HeightRequest="40"
CornerRadius="20"
BackgroundColor="#af2463"
Clicked="BorderColorSegment_Clicked_3"
x:Name="BorderColorSegment3" >
</Button>
<Button WidthRequest="40"
HeightRequest="40"
CornerRadius="20"
BackgroundColor="#000000"
Clicked="BorderColorSegment_Clicked_4"
x:Name="BorderColorSegment4" >
</Button>
</HorizontalStackLayout>
</StackLayout>
</tabView:SfTabItem.Content>
</tabView:SfTabItem>
</tabView:SfTabView>
<Label Margin="14,0,33,0" FontFamily="Roboto-Regular" FontAttributes="Bold" Text="Border Thickness"/>
<Grid Margin="14,10" RowDefinitions="20">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="35"/>
</Grid.ColumnDefinitions>
<Slider x:Name="borderSlider"
HeightRequest="50"
VerticalOptions="CenterAndExpand"
Minimum="0"
Maximum="10"
MaximumTrackColor="#E0E0E0"
MinimumTrackColor="#6200EE"
Value="{Binding BorderWidth,Mode=TwoWay}"
ThumbColor="#6200EE">
<Slider.Margin>
<OnPlatform x:TypeArguments="Thickness">
<On Platform="WinUI" Value="0,15,0,0"/>
</OnPlatform>
</Slider.Margin>
</Slider>
<Label Text="{Binding BorderWidth}"
Grid.Column="1"
FontFamily="Roboto-Regular"
HorizontalTextAlignment="Center"
VerticalTextAlignment="Center" />
</Grid>
<Label Margin="14,5,33,0" Text="Corner Radius" FontFamily="Roboto-Regular" FontAttributes="Bold"/>
<Grid Margin="14,10,14,5" Padding="0,5,0,0" RowDefinitions="20" >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="45"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="35"/>
</Grid.ColumnDefinitions>
<Label Text="Left" FontFamily="Roboto-Regular"
HorizontalTextAlignment="Start"
VerticalTextAlignment="Center"/>
<Slider x:Name="leftCornerRadius"
Grid.Column="1"
HeightRequest="50"
VerticalOptions="CenterAndExpand"
Minimum="0"
Maximum="50"
MaximumTrackColor="#E0E0E0"
MinimumTrackColor="#6200EE"
Value="{Binding LeftCornerRadius, Mode=TwoWay}"
ThumbColor="#6200EE">
<Slider.Margin>
<OnPlatform x:TypeArguments="Thickness">
<On Platform="WinUI" Value="0,15,0,0"/>
</OnPlatform>
</Slider.Margin>
</Slider>
<Label Text="{Binding LeftCornerRadius}"
Grid.Column="2" FontFamily="Roboto-Regular"
HorizontalTextAlignment="Center"
VerticalTextAlignment="Center"/>
</Grid>
<Grid Margin="14,10" Padding="0,0,0,0" RowDefinitions="20">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="45"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="35"/>
</Grid.ColumnDefinitions>
<Label Text="Right" FontFamily="Roboto-Regular"
HorizontalTextAlignment="Start"
VerticalTextAlignment="Center"/>
<Slider x:Name="rightCornerRadius"
Grid.Column="1"
HeightRequest="50"
VerticalOptions="CenterAndExpand"
Minimum="0"
Maximum="50"
MaximumTrackColor="#E0E0E0"
MinimumTrackColor="#6200EE"
ThumbColor="#6200EE"
Value="{Binding RightCornerRadius, Mode=TwoWay}">
<Slider.Margin>
<OnPlatform x:TypeArguments="Thickness">
<On Platform="WinUI" Value="0,15,0,0"/>
</OnPlatform>
</Slider.Margin>
</Slider>
<Label Text="{Binding RightCornerRadius}"
HorizontalTextAlignment="Center"
Grid.Column="2" FontFamily="Roboto-Regular"
VerticalTextAlignment="Center"/>
</Grid>
<Grid Margin="4,0,0,5" HorizontalOptions="Start">
<button:SfCheckBox Text="Show Background Image"
Style="{StaticResource CheckBoxNormalStyle}"
IsChecked="{Binding CanShowBackgroundImage}"/>
</Grid>
</StackLayout>
</ScrollView>
</Grid>
</Border>
</Grid>
</localCore:SampleView.Content>
</localCore:SampleView>

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

@ -0,0 +1,96 @@
#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 SampleBrowser.Maui.Base;
using SampleBrowser.Maui.Buttons.Button;
namespace SampleBrowser.Maui.Buttons.Button;
public partial class CustomizationsDesktop : SampleView
{
ViewModel viewModel;
public CustomizationsDesktop()
{
InitializeComponent();
viewModel = new ViewModel();
this.BindingContext = viewModel;
}
private void TextColorSegment_Clicked(object sender, EventArgs e)
{
viewModel.TextColor = Color.FromArgb("#E5E4E2");
}
private void TextColorSegment_Clicked_1(object sender, EventArgs e)
{
viewModel.TextColor = Color.FromArgb("#c6c6c6");
}
private void TextColorSegment_Clicked_2(object sender, EventArgs e)
{
viewModel.TextColor = Color.FromArgb("#538eed");
}
private void TextColorSegment_Clicked_3(object sender, EventArgs e)
{
viewModel.TextColor = Color.FromArgb("#af2463");
}
private void TextColorSegment_Clicked_4(object sender, EventArgs e)
{
viewModel.TextColor = Color.FromArgb("#000000");
}
private void BackgroundColorSegment_Clicked(object sender, EventArgs e)
{
cartButton.Background = Color.FromArgb("#E5E4E2");
}
private void BackgroundColorSegment_Clicked_1(object sender, EventArgs e)
{
cartButton.Background = Color.FromArgb("#c6c6c6");
}
private void BackgroundColorSegment_Clicked_2(object sender, EventArgs e)
{
cartButton.Background = Color.FromArgb("#538eed");
}
private void BackgroundColorSegment_Clicked_3(object sender, EventArgs e)
{
cartButton.Background = Color.FromArgb("#af2463");
}
private void BackgroundColorSegment_Clicked_4(object sender, EventArgs e)
{
cartButton.Background = Color.FromArgb("#000000");
}
private void BorderColorSegment_Clicked(object sender, EventArgs e)
{
cartButton.Stroke = Color.FromArgb("#E5E4E2");
}
private void BorderColorSegment_Clicked_1(object sender, EventArgs e)
{
cartButton.Stroke = Color.FromArgb("#c6c6c6");
}
private void BorderColorSegment_Clicked_2(object sender, EventArgs e)
{
cartButton.Stroke = Color.FromArgb("#538eed");
}
private void BorderColorSegment_Clicked_3(object sender, EventArgs e)
{
cartButton.Stroke = Color.FromArgb("#af2463");
}
private void BorderColorSegment_Clicked_4(object sender, EventArgs e)
{
cartButton.Stroke = Color.FromArgb("#000000");
}
}

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

@ -0,0 +1,330 @@
<?xml version="1.0" encoding="utf-8" ?>
<localCore:SampleView x:Class="SampleBrowser.Maui.Buttons.Button.CustomizationsMobile"
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:localCore="clr-namespace:SampleBrowser.Maui.Base;assembly=SampleBrowser.Maui.Base"
xmlns:tabView="clr-namespace:Syncfusion.Maui.TabView;assembly=Syncfusion.Maui.TabView"
xmlns:Core="clr-namespace:Syncfusion.Maui.Core;assembly=Syncfusion.Maui.Core"
xmlns:button="clr-namespace:Syncfusion.Maui.Buttons;assembly=Syncfusion.Maui.Buttons"
xmlns:sliders="clr-namespace:Syncfusion.Maui.Sliders;assembly=Syncfusion.Maui.Sliders"
xmlns:local="clr-namespace:SampleBrowser.Maui.Buttons.Button"
BackgroundColor="White">
<localCore:SampleView.Resources>
<Style x:Key="CheckBoxNormalStyle" TargetType="button:SfCheckBox">
<Setter Property="TextColor" Value="#007DE4"/>
<Setter Property="FontSize" Value="14"/>
</Style>
<Style x:Key="EntryNormalStyle" TargetType="Entry">
<Setter Property="TextColor" Value="#007DE4"/>
<Setter Property="FontSize" Value="15"/>
</Style>
</localCore:SampleView.Resources>
<localCore:SampleView.Content>
<Grid Padding="5" Margin="0,5,0,0">
<Grid.RowDefinitions>
<RowDefinition Height="200"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<button:SfButton Grid.Row="0" x:Name="cartButton"
Background="#af2463"
StrokeThickness="{Binding BorderWidth}"
WidthRequest="150"
HeightRequest="50"
TextColor="{Binding TextColor}"
BackgroundImageSource="{Binding BackgroundImage}"
CornerRadius="{Binding CornerRadius,Mode=TwoWay}">
<button:SfButton.Content>
<DataTemplate>
<Grid HorizontalOptions="Center" VerticalOptions="Center">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid Padding="5,0,5,0">
<Label Text="&#xE7BF;"
HorizontalTextAlignment="Center"
VerticalOptions="Center"
VerticalTextAlignment="Center"
HorizontalOptions="Start"
FontSize="25"
FontFamily="SegmentIcon"
TextColor="{Binding TextColor}"/>
</Grid>
<Grid Padding="0,15,15,15" Grid.Column="1" >
<Label Text="{Binding Text}"
HorizontalOptions="Center"
HorizontalTextAlignment="Center"
FontSize="15"
HeightRequest="20"
FontFamily="Roboto-Regular"
TextColor="{Binding TextColor}"
VerticalTextAlignment="Center"
VerticalOptions="Center"
LineBreakMode="NoWrap" >
</Label>
</Grid>
</Grid>
</DataTemplate>
</button:SfButton.Content>
</button:SfButton>
<Grid Grid.Row="1" Margin="18,0,11,5">
<ScrollView>
<StackLayout>
<Label Text="Options" Margin="2,0,0,0" FontFamily="Roboto-Medium" FontSize="16"/>
<Core:SfTextInputLayout ContainerType="Outlined" Margin="2,10,10,0" ContainerBackground="Transparent"
Hint="Text">
<Entry TextColor="#212121" FontFamily="Roboto-Regular"
Style="{StaticResource EntryNormalStyle}"
Text="{Binding Text,Mode=TwoWay}" />
</Core:SfTextInputLayout>
<StackLayout Margin="5,0,12,0">
<tabView:SfTabView WidthRequest="340"
HorizontalOptions="Center"
VerticalOptions="Center"
HeightRequest="130">
<tabView:SfTabItem Header="Text Color" FontFamily="Roboto-Regular" HeightRequest="40" >
<tabView:SfTabItem.FontSize>
<OnPlatform x:TypeArguments="x:Double">
<On Platform="Android" Value ="12"/>
<On Platform="iOS" Value="10"/>
</OnPlatform>
</tabView:SfTabItem.FontSize>
<tabView:SfTabItem.Content>
<StackLayout HorizontalOptions="CenterAndExpand" Margin="0,10,0,0" >
<HorizontalStackLayout Spacing="15">
<Button WidthRequest="40"
HeightRequest="40"
CornerRadius="20"
BackgroundColor="#f2f3f4"
Clicked="TextColorSegment_Clicked"
x:Name="TextColorSegment" >
</Button>
<Button WidthRequest="40"
HeightRequest="40"
CornerRadius="20"
BackgroundColor="#c6c6c6"
Clicked="TextColorSegment_Clicked_1"
x:Name="TextColorSegment1" >
</Button>
<Button WidthRequest="40"
HeightRequest="40"
CornerRadius="20"
BackgroundColor="#538eed"
Clicked="TextColorSegment_Clicked_2"
x:Name="TextColorSegment2" >
</Button>
<Button WidthRequest="40"
HeightRequest="40"
CornerRadius="20"
BackgroundColor="#af2463"
Clicked="TextColorSegment_Clicked_3"
x:Name="TextColorSegment3" >
</Button>
<Button WidthRequest="40"
HeightRequest="40"
CornerRadius="20"
BackgroundColor="#000000"
Clicked="TextColorSegment_Clicked_4"
x:Name="TextColorSegment4" >
</Button>
</HorizontalStackLayout>
</StackLayout>
</tabView:SfTabItem.Content>
</tabView:SfTabItem>
<tabView:SfTabItem Header="Background" FontFamily="Roboto-Regular" HeightRequest="40">
<tabView:SfTabItem.FontSize>
<OnPlatform x:TypeArguments="x:Double">
<On Platform="Android" Value ="12"/>
<On Platform="iOS" Value="10"/>
</OnPlatform>
</tabView:SfTabItem.FontSize>
<tabView:SfTabItem.Content>
<StackLayout HorizontalOptions="CenterAndExpand" Margin="0,10,0,0">
<HorizontalStackLayout Spacing="15">
<Button WidthRequest="40"
HeightRequest="40"
CornerRadius="20"
BackgroundColor="#f2f3f4"
Clicked="BackgroundColorSegment_Clicked"
x:Name="BackgroundColorSegment">
</Button>
<Button WidthRequest="40"
HeightRequest="40"
CornerRadius="20"
BackgroundColor="#c6c6c6"
Clicked="BackgroundColorSegment_Clicked_1"
x:Name="BackgroundColorSegment1">
</Button>
<Button WidthRequest="40"
HeightRequest="40"
CornerRadius="20"
BackgroundColor="#538eed"
Clicked="BackgroundColorSegment_Clicked_2"
x:Name="BackgroundColorSegment2">
</Button>
<Button WidthRequest="40"
HeightRequest="40"
CornerRadius="20"
BackgroundColor="#af2463"
Clicked="BackgroundColorSegment_Clicked_3"
x:Name="BackgroundColorSegment3">
</Button>
<Button WidthRequest="40"
HeightRequest="40"
CornerRadius="20"
BackgroundColor="#000000"
Clicked="BackgroundColorSegment_Clicked_4"
x:Name="BackgroundColorSegment4">
</Button>
</HorizontalStackLayout>
</StackLayout>
</tabView:SfTabItem.Content>
</tabView:SfTabItem>
<tabView:SfTabItem Header="Border Color" FontFamily="Roboto-Regular" HeightRequest="40">
<tabView:SfTabItem.FontSize>
<OnPlatform x:TypeArguments="x:Double">
<On Platform="Android" Value ="12"/>
<On Platform="iOS" Value="10"/>
</OnPlatform>
</tabView:SfTabItem.FontSize>
<tabView:SfTabItem.Content>
<StackLayout HorizontalOptions="CenterAndExpand" Margin="0,10,0,0">
<HorizontalStackLayout Spacing="15">
<Button WidthRequest="40"
HeightRequest="40"
CornerRadius="20"
BackgroundColor="#f2f3f4"
Clicked="BorderColorSegment_Clicked"
x:Name="BorderColorSegment" >
</Button>
<Button WidthRequest="40"
HeightRequest="40"
CornerRadius="20"
BackgroundColor="#c6c6c6"
Clicked="BorderColorSegment_Clicked_1"
x:Name="BorderColorSegment1" >
</Button>
<Button WidthRequest="40"
HeightRequest="40"
CornerRadius="20"
BackgroundColor="#538eed"
Clicked="BorderColorSegment_Clicked_2"
x:Name="BorderColorSegment2" >
</Button>
<Button WidthRequest="40"
HeightRequest="40"
CornerRadius="20"
BackgroundColor="#af2463"
Clicked="BorderColorSegment_Clicked_3"
x:Name="BorderColorSegment3" >
</Button>
<Button WidthRequest="40"
HeightRequest="40"
CornerRadius="20"
BackgroundColor="#000000"
Clicked="BorderColorSegment_Clicked_4"
x:Name="BorderColorSegment4" >
</Button>
</HorizontalStackLayout>
</StackLayout>
</tabView:SfTabItem.Content>
</tabView:SfTabItem>
</tabView:SfTabView>
</StackLayout>
<Label Text="Border Thickness" FontFamily="Roboto-Medium" Margin="6,0,5,0"/>
<StackLayout>
<Grid RowDefinitions="40" Margin="0,5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="45"/>
</Grid.ColumnDefinitions>
<Slider x:Name="borderSlider"
HeightRequest="50"
VerticalOptions="CenterAndExpand"
Minimum="0"
Maximum="10"
MaximumTrackColor="#E0E0E0"
MinimumTrackColor="#4285F4"
Value="{Binding BorderWidth,Mode=TwoWay}"
ThumbColor="#4285F4">
</Slider>
<Label Text="{Binding BorderThickness}"
Grid.Column="1"
FontFamily="Roboto-Regular"
HorizontalTextAlignment="Center"
VerticalTextAlignment="Center" />
</Grid>
</StackLayout>
<Label Text="Corner Radius" FontFamily="Roboto-Medium" Margin="6,0"/>
<Grid RowDefinitions="40" Margin="8,3">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="45"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="35"/>
</Grid.ColumnDefinitions>
<Label Text="Left"
FontFamily="Roboto-Regular"
HorizontalTextAlignment="Start"
VerticalTextAlignment="Center"/>
<Slider x:Name="leftCornerRadius"
Grid.Column="1"
HeightRequest="50"
VerticalOptions="CenterAndExpand"
Minimum="0"
Maximum="20"
MaximumTrackColor="#E0E0E0"
MinimumTrackColor="#4285F4"
Value="{Binding LeftCornerRadius,Mode=TwoWay}"
ThumbColor="#4285F4">
</Slider>
<Label Text="{Binding Source={x:Reference leftCornerRadius},Path=Value}"
FontFamily="Roboto-Regular"
Grid.Column="2"
HorizontalTextAlignment="Center"
VerticalTextAlignment="Center"/>
</Grid>
<Grid RowDefinitions="20" Margin="8,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="45"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="35"/>
</Grid.ColumnDefinitions>
<Label Text="Right"
FontFamily="Roboto-Regular"
HorizontalTextAlignment="Start"
VerticalTextAlignment="Center"/>
<Slider x:Name="rightCornerRadius"
Grid.Column="1"
HeightRequest="50"
VerticalOptions="CenterAndExpand"
Minimum="0"
Maximum="20"
MaximumTrackColor="#E0E0E0"
MinimumTrackColor="#4285F4"
Value="{Binding RightCornerRadius,Mode=TwoWay}"
ThumbColor="#4285F4">
</Slider>
<Label Text="{Binding Source={x:Reference rightCornerRadius},Path=Value}"
HorizontalTextAlignment="Center"
FontFamily="Roboto-Regular"
Grid.Column="2"
VerticalTextAlignment="Center"/>
</Grid>
<Grid Margin="0,20">
<HorizontalStackLayout Grid.Column="0" HorizontalOptions="Start">
<button:SfCheckBox IsChecked="{Binding CanShowBackgroundImage}"/>
<Label Text="Show Background Image" FontFamily="Roboto-Regular" VerticalOptions="Center"/>
</HorizontalStackLayout>
</Grid>
</StackLayout>
</ScrollView>
</Grid>
</Grid>
</localCore:SampleView.Content>
</localCore:SampleView>

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

@ -0,0 +1,97 @@
#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 SampleBrowser.Maui.Base;
using SampleBrowser.Maui.Buttons.Button;
namespace SampleBrowser.Maui.Buttons.Button;
public partial class CustomizationsMobile : SampleView
{
ViewModel viewModel;
public CustomizationsMobile()
{
InitializeComponent();
viewModel = new ViewModel();
this.BindingContext = viewModel;
}
private void TextColorSegment_Clicked(object sender, EventArgs e)
{
viewModel.TextColor = Color.FromArgb("#E5E4E2");
}
private void TextColorSegment_Clicked_1(object sender, EventArgs e)
{
viewModel.TextColor = Color.FromArgb("#c6c6c6");
}
private void TextColorSegment_Clicked_2(object sender, EventArgs e)
{
viewModel.TextColor = Color.FromArgb("#538eed");
}
private void TextColorSegment_Clicked_3(object sender, EventArgs e)
{
viewModel.TextColor = Color.FromArgb("#af2463");
}
private void TextColorSegment_Clicked_4(object sender, EventArgs e)
{
viewModel.TextColor = Color.FromArgb("#000000");
}
private void BackgroundColorSegment_Clicked(object sender, EventArgs e)
{
cartButton.Background = Color.FromArgb("#E5E4E2");
}
private void BackgroundColorSegment_Clicked_1(object sender, EventArgs e)
{
cartButton.Background = Color.FromArgb("#c6c6c6");
}
private void BackgroundColorSegment_Clicked_2(object sender, EventArgs e)
{
cartButton.Background = Color.FromArgb("#538eed");
}
private void BackgroundColorSegment_Clicked_3(object sender, EventArgs e)
{
cartButton.Background = Color.FromArgb("#af2463");
}
private void BackgroundColorSegment_Clicked_4(object sender, EventArgs e)
{
cartButton.Background = Color.FromArgb("#000000");
}
private void BorderColorSegment_Clicked(object sender, EventArgs e)
{
cartButton.Stroke = Color.FromArgb("#E5E4E2");
}
private void BorderColorSegment_Clicked_1(object sender, EventArgs e)
{
cartButton.Stroke = Color.FromArgb("#c6c6c6");
}
private void BorderColorSegment_Clicked_2(object sender, EventArgs e)
{
cartButton.Stroke = Color.FromArgb("#538eed");
}
private void BorderColorSegment_Clicked_3(object sender, EventArgs e)
{
cartButton.Stroke = Color.FromArgb("#af2463");
}
private void BorderColorSegment_Clicked_4(object sender, EventArgs e)
{
cartButton.Stroke = Color.FromArgb("#000000");
}
}

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

@ -0,0 +1,383 @@
#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 Syncfusion.Maui.Buttons;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;
using SampleBrowser.Maui.Base.Converters;
using System.Reflection;
namespace SampleBrowser.Maui.Buttons.Button;
public class ViewModel : INotifyPropertyChanged
{
#region Fields
/// <summary>
/// The background image of button
/// </summary>
public ImageSource? backgroundImage;
/// <summary>
/// The border color of button.
/// </summary>
private Color borderColor = Colors.Black;
/// <summary>
/// The background color of button.
/// </summary>
private Color backgroundColor = Colors.DarkRed;
/// <summary>
/// Represents the text color
/// </summary>
private Color textColor = Colors.White;
/// <summary>
/// Represents the visibility of image
/// </summary>
private bool showImage = true;
/// <summary>
/// The corner radius slider.
/// </summary>
#if ANDROID || IOS
private int rightSlider = 8;
#elif WINDOWS || MACCATALYST
private int rightSlider = 8;
#endif
/// <summary>
/// The corner radius of button.
/// </summary>
#if ANDROID || IOS
private CornerRadius cornerRadius = 8;
#elif WINDOWS || MACCATALYST
private CornerRadius cornerRadius = 8;
#endif
/// <summary>
/// The default corner radius.
/// </summary>
#if ANDROID || IOS
private int leftSlider = 8;
#elif WINDOWS || MACCATALYST
private int leftSlider = 8;
#endif
/// <summary>
/// Represents the border width
/// </summary>
private int borderWidth = 1;
/// <summary>
/// The text of button.
/// </summary>
private string text = "ADD TO CART";
/// <summary>
/// The can show background image
/// </summary>
private bool canShowBackgroundImage = false;
/// <summary>
/// Represents the enable or disable the shadow
/// </summary>
private bool enableShadow;
#endregion
#region Property
/// <summary>
/// Gets or sets the color of the border of button.
/// </summary>
/// <value>The color of the border of button.</value>
public Color BorderColor
{
get
{
return borderColor;
}
set
{
borderColor = value;
OnPropertyChanged("BorderColor");
}
}
/// <summary>
/// Gets or Sets the text color
/// </summary>
public Color TextColor
{
get
{
return textColor;
}
set
{
textColor = value;
OnPropertyChanged("TextColor");
}
}
/// <summary>
/// Gets or sets the background color of button.
/// </summary>
/// <value>The background color of button</value>
[Obsolete]
public Color BackgroundColor
{
get
{
return backgroundColor;
}
set
{
backgroundColor = value;
OnPropertyChanged("BackgroundColor");
}
}
/// <summary>
/// Gets or sets the slider value.
/// </summary>
/// <value>The slider value.</value>
#if ANDROID || IOS
public int RightCornerRadius
{
get
{
return rightSlider;
}
set
{
rightSlider = value;
CornerRadius = new CornerRadius(cornerRadius.TopLeft, value, value, cornerRadius.BottomRight);
OnPropertyChanged("RightCornerRadius");
}
}
#elif WINDOWS || MACCATALYST
public int RightCornerRadius
{
get
{
return rightSlider;
}
set
{
rightSlider = value;
CornerRadius = new CornerRadius(cornerRadius.TopLeft, value, value, cornerRadius.BottomRight);
OnPropertyChanged("RightCornerRadius");
}
}
#endif
/// <summary>
/// Gets or sets the slider value.
/// </summary>
/// <value>The slider value.</value>
#if ANDROID || IOS
public int LeftCornerRadius
{
get
{
return leftSlider;
}
set
{
leftSlider = value;
CornerRadius = new CornerRadius(value, cornerRadius.TopRight, cornerRadius.BottomLeft, value);
OnPropertyChanged("LeftCornerRadius");
}
}
#elif MACCATALYST || WINDOWS
public int LeftCornerRadius
{
get
{
return leftSlider;
}
set
{
leftSlider = value;
CornerRadius = new CornerRadius(value, cornerRadius.TopRight, cornerRadius.BottomLeft, value);
OnPropertyChanged("LeftCornerRadius");
}
}
#endif
/// <summary>
/// Gets or sets the border width.
/// </summary>
public int BorderWidth
{
get
{
return borderWidth;
}
set
{
borderWidth = value;
OnPropertyChanged("BorderWidth");
}
}
/// <summary>
/// Gets or sets the corner radius.
/// </summary>
/// <value>The corner radius.</value>
#if ANDROID || IOS
public CornerRadius CornerRadius
{
get
{
return cornerRadius;
}
set
{
cornerRadius = value;
OnPropertyChanged("CornerRadius");
}
}
#elif WINDOWS || MACCATALYST
public CornerRadius CornerRadius
{
get
{
return cornerRadius;
}
set
{
cornerRadius = value;
OnPropertyChanged("CornerRadius");
}
}
#endif
/// <summary>
/// Gets or Sets the image visibility
/// </summary>
public bool ShowImage
{
get
{
return showImage;
}
set
{
showImage = value;
OnPropertyChanged("ShowImage");
}
}
/// <summary>
/// Gets or sets the text.
/// </summary>
/// <value>The text.</value>
public string Text
{
get
{
return text;
}
set
{
text = value;
OnPropertyChanged("Text");
}
}
/// <summary>
/// Gets or sets a value indicating whether this <see cref="T:button.buttonViewModel"/> is enable stack.
/// </summary>
/// <value><c>true</c> if is enable stack; otherwise, <c>false</c>.</value>
public bool CanShowBackgroundImage
{
get
{
return canShowBackgroundImage;
}
set
{
canShowBackgroundImage = value;
if (value)
{
var ResourceAssembly = typeof(SfImageResourceExtension).GetTypeInfo().Assembly;
BackgroundImage = ImageSource.FromResource("SampleBrowser.Maui.Base.Resources.Images.april.png", ResourceAssembly);
}
else
{
BackgroundImage = null;
}
OnPropertyChanged("CanShowBackgroundImage");
OnPropertyChanged("BackgroundImage");
}
}
/// <summary>
/// Source for transparent background
/// </summary>
public ImageSource? BackgroundImage
{
get
{
return backgroundImage;
}
set
{
backgroundImage=value;
OnPropertyChanged("BackgroundImage");
}
}
/// <summary>
/// Gets or sets whether shadow enable or disable
/// </summary>
public bool EnableShadow
{
get
{
return enableShadow;
}
set
{
enableShadow = value;
OnPropertyChanged("EnableShadow");
}
}
#endregion
#region Property changed method
/// <summary>
/// Occurs when property changed.
/// </summary>
public event PropertyChangedEventHandler? PropertyChanged;
public void OnPropertyChanged([CallerMemberName] string? name = null) =>
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(name));
#endregion
}

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

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<localcore:SampleView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:localcore="clr-namespace:SampleBrowser.Maui.Base;assembly=SampleBrowser.Maui.Base"
xmlns:ev="clr-namespace:Syncfusion.Maui.Core;assembly=Syncfusion.Maui.Core"
xmlns:button="clr-namespace:Syncfusion.Maui.Buttons;assembly=Syncfusion.Maui.Buttons"
xmlns:local="clr-namespace:SampleBrowser.Maui.Buttons.Button"
x:Class="SampleBrowser.Maui.Buttons.Button.GettingStarted"
Background="White">
</localcore:SampleView>

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

@ -0,0 +1,25 @@
#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 SampleBrowser.Maui.Base;
namespace SampleBrowser.Maui.Buttons.Button
{
public partial class GettingStarted : SampleView
{
public GettingStarted()
{
InitializeComponent();
#if ANDROID || IOS
this.Content = new GettingStartedMobile();
#elif WINDOWS || MACCATALYST
this.Content = new GettingStartedDesktop();
#endif
}
}
}

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

@ -0,0 +1,244 @@
<?xml version="1.0" encoding="utf-8" ?>
<localcore:SampleView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="SampleBrowser.Maui.Buttons.Button.GettingStartedDesktop"
xmlns:localcore="clr-namespace:SampleBrowser.Maui.Base;assembly=SampleBrowser.Maui.Base"
xmlns:ev="clr-namespace:Syncfusion.Maui.Core;assembly=Syncfusion.Maui.Core"
xmlns:button="clr-namespace:Syncfusion.Maui.Buttons;assembly=Syncfusion.Maui.Buttons"
xmlns:local="clr-namespace:SampleBrowser.Maui.Buttons.Button">
<localcore:SampleView.Resources>
<Style TargetType="button:SfButton" x:Key="radialVisualStyle">
<Setter Property="VisualStateManager.VisualStateGroups">
<VisualStateGroupList>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Pressed" >
<VisualState.Setters>
<Setter Property="Background">
<Setter.Value>
<RadialGradientBrush Radius="1.5">
<RadialGradientBrush.GradientStops>
<GradientStop Color="#0D62D4" Offset="0.3"/>
<GradientStop Color="#9F3CDC" Offset="1"/>
</RadialGradientBrush.GradientStops>
</RadialGradientBrush>
</Setter.Value>
</Setter>
</VisualState.Setters>
</VisualState>
<VisualState x:Name="Normal">
<VisualState.Setters>
<Setter Property="Background">
<Setter.Value>
<RadialGradientBrush Radius="1">
<RadialGradientBrush.GradientStops>
<GradientStop Color="#9F3CDC" Offset="0"/>
<GradientStop Color="#0D62D4" Offset="1"/>
</RadialGradientBrush.GradientStops>
</RadialGradientBrush>
</Setter.Value>
</Setter>
</VisualState.Setters>
</VisualState>
</VisualStateGroup>
</VisualStateGroupList>
</Setter>
<Setter Property="WidthRequest" Value="150"/>
<Setter Property="HeightRequest" Value="50"/>
<Setter Property="Padding" Value="10"/>
<Setter Property="StrokeThickness" Value="0"/>
<Setter Property="Stroke" Value="Transparent"/>
<Setter Property="CornerRadius" Value="2"/>
</Style>
<Style TargetType="button:SfButton" x:Key="linearVisualStyle">
<Setter Property="VisualStateManager.VisualStateGroups">
<VisualStateGroupList>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Pressed" >
<VisualState.Setters>
<Setter Property="Background">
<Setter.Value>
<LinearGradientBrush EndPoint="0,1">
<LinearGradientBrush.GradientStops>
<GradientStop Color="#9F3CDC" Offset="0"/>
<GradientStop Color="#0D62D4" Offset="1"/>
</LinearGradientBrush.GradientStops>
</LinearGradientBrush>
</Setter.Value>
</Setter>
</VisualState.Setters>
</VisualState>
<VisualState x:Name="Normal">
<VisualState.Setters>
<Setter Property="Background">
<Setter.Value>
<LinearGradientBrush EndPoint="0,1">
<LinearGradientBrush.GradientStops>
<GradientStop Color="#0D62D4" Offset="0"/>
<GradientStop Color="#9F3CDC" Offset="1"/>
</LinearGradientBrush.GradientStops>
</LinearGradientBrush>
</Setter.Value>
</Setter>
</VisualState.Setters>
</VisualState>
</VisualStateGroup>
</VisualStateGroupList>
</Setter>
<Setter Property="WidthRequest" Value="150"/>
<Setter Property="HeightRequest" Value="50"/>
<Setter Property="Padding" Value="10"/>
<Setter Property="StrokeThickness" Value="0"/>
<Setter Property="Stroke" Value="Transparent"/>
<Setter Property="CornerRadius" Value="2"/>
</Style>
<Style TargetType="button:SfButton" x:Key="sfButtonStyle">
<Setter Property="WidthRequest" Value="150"/>
<Setter Property="HeightRequest" Value="50"/>
<Setter Property="Padding" Value="10"/>
<Setter Property="StrokeThickness" Value="0"/>
<Setter Property="Stroke" Value="Transparent"/>
<Setter Property="CornerRadius" Value="2"/>
</Style>
</localcore:SampleView.Resources>
<localcore:SampleView.Content>
<ScrollView>
<StackLayout HorizontalOptions="Center" VerticalOptions="Center">
<Grid Padding="5">
<Grid.RowDefinitions>
<RowDefinition Height="130"/>
<RowDefinition Height="130"/>
<RowDefinition Height="130"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="200"/>
<ColumnDefinition Width="200"/>
<ColumnDefinition Width="200"/>
</Grid.ColumnDefinitions>
<button:SfButton Grid.Row="0" Grid.Column="0" Text="Primary Button" TextColor="White" Style="{StaticResource sfButtonStyle}"/>
<button:SfButton Grid.Row="1" Grid.Column="0" Style="{StaticResource sfButtonStyle}">
<button:SfButton.Content>
<DataTemplate>
<Grid HorizontalOptions="Center" VerticalOptions="Center">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid Padding="0,0,5,0">
<Label Text="&#xEB52;"
HorizontalTextAlignment="Center"
VerticalOptions="Center"
VerticalTextAlignment="Center"
HorizontalOptions="Start"
FontSize="24"
FontFamily="SegmentIcon"
TextColor="White">
</Label>
</Grid>
<Grid Padding="0,15,15,15" Grid.Column="1" >
<Label HorizontalOptions="Center"
HorizontalTextAlignment="Center"
FontSize="15"
HeightRequest="20"
TextColor="White"
VerticalTextAlignment="Center"
VerticalOptions="Center"
LineBreakMode="NoWrap"
Text="Left Icon">
</Label>
</Grid>
</Grid>
</DataTemplate>
</button:SfButton.Content>
</button:SfButton>
<button:SfButton Grid.Row="1" Grid.Column="1" WidthRequest="50" CornerRadius="50" Style="{StaticResource sfButtonStyle}">
<button:SfButton.Content>
<DataTemplate>
<Grid HorizontalOptions="Center" VerticalOptions="Center">
<Grid Padding="5,0,5,0" Grid.Column="1" >
<Label Text="&#xEB52;"
FontFamily="SegmentIcon"
HorizontalTextAlignment="Center"
VerticalOptions="Center"
VerticalTextAlignment="Center"
HorizontalOptions="Start"
FontSize="24"
TextColor="White">
</Label>
</Grid>
</Grid>
</DataTemplate>
</button:SfButton.Content>
</button:SfButton>
<button:SfButton Grid.Row="2" Grid.Column="0" Text="Linear Gradient" TextColor="White" CornerRadius="25,50,25,50" Style="{StaticResource linearVisualStyle}"/>
<button:SfButton Grid.Row="0" Grid.Column="1" Text="Normal Button" Background="#D8D6D7" Style="{StaticResource sfButtonStyle}"/>
<button:SfButton Grid.Row="0" Grid.Column="2" Text="Outline Button" TextColor="Blue" CornerRadius="0" Background="White" Stroke="Blue" StrokeThickness="2" Style="{StaticResource sfButtonStyle}"/>
<button:SfButton Grid.Row="1" Grid.Column="2" Style="{StaticResource sfButtonStyle}">
<button:SfButton.Content>
<DataTemplate>
<Grid HorizontalOptions="Center" VerticalOptions="Center">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid Padding="15,15,0,15">
<Label HorizontalOptions="Start"
HorizontalTextAlignment="Start"
FontSize="15"
HeightRequest="20"
TextColor="White"
VerticalTextAlignment="Center"
VerticalOptions="Center"
LineBreakMode="NoWrap"
Text="Right Icon">
</Label>
</Grid>
<Grid Padding="5,0,5,0" Grid.Column="1" >
<Label Text="&#xEB52;"
FontFamily="SegmentIcon"
HorizontalTextAlignment="Center"
VerticalOptions="Center"
VerticalTextAlignment="Center"
HorizontalOptions="Start"
FontSize="24"
TextColor="White">
</Label>
</Grid>
</Grid>
</DataTemplate>
</button:SfButton.Content>
</button:SfButton>
<button:SfButton Grid.Row="2" Grid.Column="1" StrokeThickness="0" WidthRequest="50" HeightRequest="50" CornerRadius="25" Style="{StaticResource sfButtonStyle}" Background="White">
<button:SfButton.Content>
<DataTemplate>
<Grid HorizontalOptions="Center" VerticalOptions="Center">
<Grid Padding="5,0,5,0" Grid.Column="1" >
<Label Text="&#xEB52;"
FontFamily="SegmentIcon"
HorizontalTextAlignment="Center"
VerticalOptions="Center"
VerticalTextAlignment="Center"
HorizontalOptions="Start"
FontSize="24"
TextColor="Black">
</Label>
</Grid>
</Grid>
</DataTemplate>
</button:SfButton.Content>
</button:SfButton>
<button:SfButton Grid.Row="2" Grid.Column="2" Text="Radial Gradient" TextColor="White" CornerRadius="25" Style="{StaticResource radialVisualStyle}"/>
</Grid>
</StackLayout>
</ScrollView>
</localcore:SampleView.Content>
</localcore:SampleView>

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

@ -0,0 +1,17 @@
#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 SampleBrowser.Maui.Base;
namespace SampleBrowser.Maui.Buttons.Button;
public partial class GettingStartedDesktop : SampleView
{
public GettingStartedDesktop()
{
InitializeComponent();
}
}

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

@ -0,0 +1,240 @@
<?xml version="1.0" encoding="utf-8" ?>
<localcore:SampleView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="SampleBrowser.Maui.Buttons.Button.GettingStartedMobile"
xmlns:ev="clr-namespace:Syncfusion.Maui.Core;assembly=Syncfusion.Maui.Core"
xmlns:button="clr-namespace:Syncfusion.Maui.Buttons;assembly=Syncfusion.Maui.Buttons"
xmlns:local="clr-namespace:SampleBrowser.Maui.Buttons.Button"
xmlns:localcore="clr-namespace:SampleBrowser.Maui.Base;assembly=SampleBrowser.Maui.Base">
<localcore:SampleView.Resources>
<Style TargetType="button:SfButton" x:Key="radialVisualStyle">
<Setter Property="VisualStateManager.VisualStateGroups">
<VisualStateGroupList>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Pressed" >
<VisualState.Setters>
<Setter Property="Background">
<Setter.Value>
<RadialGradientBrush Radius="1.5">
<RadialGradientBrush.GradientStops>
<GradientStop Color="#0D62D4" Offset="0.3"/>
<GradientStop Color="#9F3CDC" Offset="1"/>
</RadialGradientBrush.GradientStops>
</RadialGradientBrush>
</Setter.Value>
</Setter>
</VisualState.Setters>
</VisualState>
<VisualState x:Name="Normal">
<VisualState.Setters>
<Setter Property="Background">
<Setter.Value>
<RadialGradientBrush Radius="1">
<RadialGradientBrush.GradientStops>
<GradientStop Color="#9F3CDC" Offset="0"/>
<GradientStop Color="#0D62D4" Offset="1"/>
</RadialGradientBrush.GradientStops>
</RadialGradientBrush>
</Setter.Value>
</Setter>
</VisualState.Setters>
</VisualState>
</VisualStateGroup>
</VisualStateGroupList>
</Setter>
<Setter Property="WidthRequest" Value="150"/>
<Setter Property="HeightRequest" Value="50"/>
<Setter Property="Padding" Value="10"/>
<Setter Property="StrokeThickness" Value="0"/>
<Setter Property="Stroke" Value="Transparent"/>
<Setter Property="CornerRadius" Value="2"/>
</Style>
<Style TargetType="button:SfButton" x:Key="linearVisualStyle">
<Setter Property="VisualStateManager.VisualStateGroups">
<VisualStateGroupList>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Pressed" >
<VisualState.Setters>
<Setter Property="Background">
<Setter.Value>
<LinearGradientBrush EndPoint="0,1">
<LinearGradientBrush.GradientStops>
<GradientStop Color="#9F3CDC" Offset="0"/>
<GradientStop Color="#0D62D4" Offset="1"/>
</LinearGradientBrush.GradientStops>
</LinearGradientBrush>
</Setter.Value>
</Setter>
</VisualState.Setters>
</VisualState>
<VisualState x:Name="Normal">
<VisualState.Setters>
<Setter Property="Background">
<Setter.Value>
<LinearGradientBrush EndPoint="0,1">
<LinearGradientBrush.GradientStops>
<GradientStop Color="#0D62D4" Offset="0"/>
<GradientStop Color="#9F3CDC" Offset="1"/>
</LinearGradientBrush.GradientStops>
</LinearGradientBrush>
</Setter.Value>
</Setter>
</VisualState.Setters>
</VisualState>
</VisualStateGroup>
</VisualStateGroupList>
</Setter>
<Setter Property="WidthRequest" Value="150"/>
<Setter Property="HeightRequest" Value="50"/>
<Setter Property="Padding" Value="10"/>
<Setter Property="StrokeThickness" Value="0"/>
<Setter Property="Stroke" Value="Transparent"/>
<Setter Property="CornerRadius" Value="2"/>
</Style>
<Style TargetType="button:SfButton" x:Key="sfButtonStyle">
<Setter Property="WidthRequest" Value="150"/>
<Setter Property="HeightRequest" Value="50"/>
<Setter Property="Padding" Value="10"/>
<Setter Property="StrokeThickness" Value="0"/>
<Setter Property="Stroke" Value="Transparent"/>
<Setter Property="CornerRadius" Value="2"/>
</Style>
</localcore:SampleView.Resources>
<localcore:SampleView.Content>
<Grid Padding="5" >
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<button:SfButton Grid.Row="0" Grid.Column="0" Text="Primary Button" TextColor="White" Style="{StaticResource sfButtonStyle}"/>
<button:SfButton Grid.Row="1" Grid.Column="0" Text="Flat Button" TextColor="Blue" Background="White" Style="{StaticResource sfButtonStyle}" />
<button:SfButton Grid.Row="2" Grid.Column="0" Style="{StaticResource sfButtonStyle}">
<button:SfButton.Content>
<DataTemplate>
<Grid HorizontalOptions="Center" VerticalOptions="Center">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid Padding="0,0,5,0">
<Label Text="&#xEB52;"
HorizontalTextAlignment="Center"
VerticalOptions="Center"
VerticalTextAlignment="Center"
HorizontalOptions="Start"
FontSize="24"
FontFamily="SegmentIcon"
TextColor="White">
</Label>
</Grid>
<Grid Padding="0,15,15,15" Grid.Column="1" >
<Label HorizontalOptions="Center"
HorizontalTextAlignment="Center"
FontSize="15"
HeightRequest="20"
TextColor="White"
VerticalTextAlignment="Center"
VerticalOptions="Center"
LineBreakMode="NoWrap"
Text="Left Icon">
</Label>
</Grid>
</Grid>
</DataTemplate>
</button:SfButton.Content>
</button:SfButton>
<button:SfButton Grid.Row="3" Grid.Column="0" WidthRequest="50" CornerRadius="25" Style="{StaticResource sfButtonStyle}">
<button:SfButton.Content>
<DataTemplate>
<Grid HorizontalOptions="Center" VerticalOptions="Center">
<Grid Padding="5,0,5,0" Grid.Column="1" >
<Label Text="&#xEB52;"
FontFamily="SegmentIcon"
HorizontalTextAlignment="Center"
VerticalOptions="Center"
VerticalTextAlignment="Center"
HorizontalOptions="Start"
FontSize="23"
TextColor="White">
</Label>
</Grid>
</Grid>
</DataTemplate>
</button:SfButton.Content>
</button:SfButton>
<button:SfButton Grid.Row="4" Grid.Column="0" Text="Linear Gradient" TextColor="White" CornerRadius="25,50,25,50" Style="{StaticResource linearVisualStyle}"/>
<button:SfButton Grid.Row="0" Grid.Column="1" Text="Normal Button" Background="#D8D6D7" Style="{StaticResource sfButtonStyle}"/>
<button:SfButton Grid.Row="1" Grid.Column="1" Text="Outline Button" TextColor="Blue" CornerRadius="0" Background="White" Stroke="Blue" StrokeThickness="2" Style="{StaticResource sfButtonStyle}"/>
<button:SfButton Grid.Row="2" Grid.Column="1" Style="{StaticResource sfButtonStyle}">
<button:SfButton.Content>
<DataTemplate>
<Grid HorizontalOptions="Center" VerticalOptions="Center">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid Padding="15,15,0,15">
<Label HorizontalOptions="Start"
HorizontalTextAlignment="Start"
FontSize="15"
HeightRequest="20"
TextColor="White"
VerticalTextAlignment="Center"
VerticalOptions="Center"
LineBreakMode="NoWrap"
Text="Right Icon">
</Label>
</Grid>
<Grid Padding="5,0,5,0" Grid.Column="1" >
<Label Text="&#xEB52;"
FontFamily="SegmentIcon"
HorizontalTextAlignment="Center"
VerticalOptions="Center"
VerticalTextAlignment="Center"
HorizontalOptions="Start"
FontSize="24"
TextColor="White">
</Label>
</Grid>
</Grid>
</DataTemplate>
</button:SfButton.Content>
</button:SfButton>
<button:SfButton Grid.Row="3" Grid.Column="1" StrokeThickness="0" WidthRequest="50" HeightRequest="50" CornerRadius="25" Style="{StaticResource sfButtonStyle}" Background="White">
<button:SfButton.Content>
<DataTemplate>
<Grid HorizontalOptions="Center" VerticalOptions="Center">
<Grid Padding="5,0,5,0" Grid.Column="1" >
<Label Text="&#xEB52;"
FontFamily="SegmentIcon"
HorizontalTextAlignment="Center"
VerticalOptions="Center"
VerticalTextAlignment="Center"
HorizontalOptions="Start"
FontSize="23"
TextColor="Black">
</Label>
</Grid>
</Grid>
</DataTemplate>
</button:SfButton.Content>
</button:SfButton>
<button:SfButton Grid.Row="4" Grid.Column="1" Text="Radial Gradient" TextColor="White" CornerRadius="25" Style="{StaticResource radialVisualStyle}"/>
</Grid>
</localcore:SampleView.Content>
</localcore:SampleView>

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

@ -0,0 +1,19 @@
#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 SampleBrowser.Maui.Base;
namespace SampleBrowser.Maui.Buttons.Button;
public partial class GettingStartedMobile : SampleView
{
public GettingStartedMobile()
{
InitializeComponent();
}
}

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

@ -0,0 +1,7 @@
<localCore:SampleView x:Class="SampleBrowser.Maui.Buttons.CheckBox.Customizations"
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:localCore="clr-namespace:SampleBrowser.Maui.Base;assembly=SampleBrowser.Maui.Base"
BackgroundColor="White">
</localCore:SampleView>

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

@ -0,0 +1,23 @@
#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 SampleBrowser.Maui.Base;
namespace SampleBrowser.Maui.Buttons.CheckBox;
public partial class Customizations : SampleView
{
public Customizations()
{
InitializeComponent();
#if ANDROID || IOS
this.Content = new CustomizationsMobile();
#else
this.Content = new CustomizationsDesktop();
#endif
}
}

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

@ -0,0 +1,257 @@
<?xml version="1.0" encoding="utf-8" ?>
<localCore:SampleView x:Class="SampleBrowser.Maui.Buttons.CheckBox.CustomizationsDesktop"
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:localCore="clr-namespace:SampleBrowser.Maui.Base;assembly=SampleBrowser.Maui.Base"
xmlns:tabView="clr-namespace:Syncfusion.Maui.TabView;assembly=Syncfusion.Maui.TabView"
xmlns:Core="clr-namespace:Syncfusion.Maui.Core;assembly=Syncfusion.Maui.Core"
xmlns:button="clr-namespace:Syncfusion.Maui.Buttons;assembly=Syncfusion.Maui.Buttons"
xmlns:sliders="clr-namespace:Syncfusion.Maui.Sliders;assembly=Syncfusion.Maui.Sliders"
xmlns:local="clr-namespace:SampleBrowser.Maui.Buttons.CheckBox"
BackgroundColor="White"
Padding="0"
WidthRequest="400">
<localCore:SampleView.Resources>
<Style x:Key="CheckBoxNormalStyle" TargetType="button:SfCheckBox">
<Setter Property="TextColor" Value="Black"/>
<Setter Property="CheckedColor" Value="#6200EE"/>
<Setter Property="FontFamily" Value="Roboto-Regular"/>
</Style>
<Style x:Key="EntryNormalStyle" TargetType="Entry">
<Setter Property="TextColor" Value="Black"/>
<Setter Property="FontSize" Value="15"/>
<Setter Property="FontFamily" Value="Roboto-Regular"/>
</Style>
</localCore:SampleView.Resources>
<localCore:SampleView.Content>
<Grid HorizontalOptions="Center" WidthRequest="380">
<Grid.RowDefinitions>
<RowDefinition Height="150"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Border Margin="0,10" BackgroundColor="#f6f6f8" Grid.Row="0" Stroke="Gray" StrokeShape="RoundRectangle 10" StrokeThickness="0.3">
<button:SfCheckBox x:Name="checkBox"
WidthRequest="150"
HeightRequest="50"
IsChecked="{Binding IsChecked}"
IsThreeState="{Binding IsThreeState}"
TextColor="{Binding TextColor}"
Text="{Binding Text}"
HorizontalOptions="Center"
HorizontalTextAlignment="Start"
Style="{StaticResource CheckBoxNormalStyle}"
CornerRadius="{Binding CornerRadius,Mode=TwoWay}">
</button:SfCheckBox>
</Border>
<Border BackgroundColor="#f6f6f8" Margin="0,10" Padding="5,10" Grid.Row="1" Stroke="Gray" StrokeShape="RoundRectangle 10" StrokeThickness="0.3">
<Grid>
<ScrollView VerticalScrollBarVisibility="Never">
<StackLayout HorizontalOptions="Center" VerticalOptions="Start">
<Core:SfTextInputLayout Margin="5,0" HeightRequest="76" ContainerType="Outlined" Hint="Text">
<Entry Style="{StaticResource EntryNormalStyle}" MinimumHeightRequest="0"
Text="{Binding Text,Mode=TwoWay}"
Placeholder="Enter the Text"/>
</Core:SfTextInputLayout>
<tabView:SfTabView
IndicatorBackground="#c6c6c6"
Margin="5,0"
TabBarBackground="White"
HorizontalOptions="Start"
VerticalOptions="Center"
HeightRequest="130">
<tabView:SfTabItem Header="Text Color"
FontFamily="Roboto-Regular"
HeightRequest="40">
<tabView:SfTabItem.FontSize>
<OnPlatform x:TypeArguments="x:Double">
<On Platform="WinUI" Value ="12"/>
<On Platform="MacCatalyst" Value="10"/>
</OnPlatform>
</tabView:SfTabItem.FontSize>
<tabView:SfTabItem.Content>
<StackLayout HorizontalOptions="CenterAndExpand" VerticalOptions="CenterAndExpand">
<HorizontalStackLayout Spacing="15">
<Button WidthRequest="40"
HeightRequest="40"
CornerRadius="20"
BackgroundColor="#E5E4E2"
Clicked="TextColorSegment_Clicked"
x:Name="TextColorSegment" >
</Button>
<Button WidthRequest="40"
HeightRequest="40"
CornerRadius="20"
BackgroundColor="#c6c6c6"
Clicked="TextColorSegment_Clicked_1"
x:Name="TextColorSegment1" >
</Button>
<Button WidthRequest="40"
HeightRequest="40"
CornerRadius="20"
BackgroundColor="#538eed"
Clicked="TextColorSegment_Clicked_2"
x:Name="TextColorSegment2" >
</Button>
<Button WidthRequest="40"
HeightRequest="40"
CornerRadius="20"
BackgroundColor="#af2463"
Clicked="TextColorSegment_Clicked_3"
x:Name="TextColorSegment3" >
</Button>
<Button WidthRequest="40"
HeightRequest="40"
CornerRadius="20"
BackgroundColor="#000000"
Clicked="TextColorSegment_Clicked_4"
x:Name="TextColorSegment4" >
</Button>
</HorizontalStackLayout>
</StackLayout>
</tabView:SfTabItem.Content>
</tabView:SfTabItem>
<tabView:SfTabItem Header="Checked Color" FontFamily="Roboto-Regular" HeightRequest="40">
<tabView:SfTabItem.FontSize>
<OnPlatform x:TypeArguments="x:Double">
<On Platform="WinUI" Value ="12"/>
<On Platform="MacCatalyst" Value="10"/>
</OnPlatform>
</tabView:SfTabItem.FontSize>
<tabView:SfTabItem.Content>
<StackLayout HorizontalOptions="CenterAndExpand" VerticalOptions="CenterAndExpand">
<HorizontalStackLayout Spacing="15">
<Button WidthRequest="40"
HeightRequest="40"
CornerRadius="20"
BackgroundColor="#E5E4E2"
Clicked="CheckedColorSegment_Clicked"
x:Name="CheckedColorSegment">
</Button>
<Button WidthRequest="40"
HeightRequest="40"
CornerRadius="20"
BackgroundColor="#c6c6c6"
Clicked="CheckedColorSegment_Clicked_1"
x:Name="CheckedColorSegment1">
</Button>
<Button WidthRequest="40"
HeightRequest="40"
CornerRadius="20"
BackgroundColor="#538eed"
Clicked="CheckedColorSegment_Clicked_2"
x:Name="CheckedColorSegment2">
</Button>
<Button WidthRequest="40"
HeightRequest="40"
CornerRadius="20"
BackgroundColor="#af2463"
Clicked="CheckedColorSegment_Clicked_3"
x:Name="CheckedColorSegment3">
</Button>
<Button WidthRequest="40"
HeightRequest="40"
CornerRadius="20"
BackgroundColor="#000000"
Clicked="CheckedColorSegment_Clicked_4"
x:Name="CheckedColorSegment4">
</Button>
</HorizontalStackLayout>
</StackLayout>
</tabView:SfTabItem.Content>
</tabView:SfTabItem>
<tabView:SfTabItem Header="Unchecked Color" FontFamily="Roboto-Regular" HeightRequest="40">
<tabView:SfTabItem.FontSize>
<OnPlatform x:TypeArguments="x:Double">
<On Platform="WinUI" Value ="12"/>
<On Platform="MacCatalyst" Value="10"/>
</OnPlatform>
</tabView:SfTabItem.FontSize>
<tabView:SfTabItem.Content>
<StackLayout HorizontalOptions="CenterAndExpand" VerticalOptions="CenterAndExpand">
<HorizontalStackLayout Spacing="15">
<Button WidthRequest="40"
HeightRequest="40"
CornerRadius="20"
BackgroundColor="#E5E4E2"
Clicked="UncheckedColorSegment_Clicked"
x:Name="UncheckedColorSegment" >
</Button>
<Button WidthRequest="40"
HeightRequest="40"
CornerRadius="20"
BackgroundColor="#c6c6c6"
Clicked="UncheckedColorSegment_Clicked_1"
x:Name="UncheckedColorSegment1" >
</Button>
<Button WidthRequest="40"
HeightRequest="40"
CornerRadius="20"
BackgroundColor="#538eed"
Clicked="UncheckedColorSegment_Clicked_2"
x:Name="UncheckedColorSegment2" >
</Button>
<Button WidthRequest="40"
HeightRequest="40"
CornerRadius="20"
BackgroundColor="#af2463"
Clicked="UncheckedColorSegment_Clicked_3"
x:Name="UncheckedColorSegment3" >
</Button>
<Button WidthRequest="40"
HeightRequest="40"
CornerRadius="20"
BackgroundColor="#000000"
Clicked="UncheckedColorSegment_Clicked_4"
x:Name="UncheckedColorSegment4" >
</Button>
</HorizontalStackLayout>
</StackLayout>
</tabView:SfTabItem.Content>
</tabView:SfTabItem>
</tabView:SfTabView>
<Label Margin="14,5,33,0" Text="Corner Radius" FontFamily="Roboto-Regular" FontAttributes="Bold"/>
<Grid Margin="14,10" RowDefinitions="20">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="35"/>
</Grid.ColumnDefinitions>
<Slider x:Name="cornerRadiusSlider"
HeightRequest="50"
VerticalOptions="CenterAndExpand"
Minimum="0"
Maximum="10"
MaximumTrackColor="#E0E0E0"
MinimumTrackColor="#6200EE"
Value="{Binding Radius,Mode=TwoWay}"
ThumbColor="#6200EE">
<Slider.Margin>
<OnPlatform x:TypeArguments="Thickness">
<On Platform="WinUI" Value="0,15,0,0"/>
</OnPlatform>
</Slider.Margin>
</Slider>
<Label Text="{Binding Radius}"
Grid.Column="1"
FontFamily="Roboto-Regular"
HorizontalTextAlignment="Center"
VerticalTextAlignment="Center" />
</Grid>
<button:SfCheckBox Margin="4,5" HorizontalOptions="Start" Grid.Column="1" Text="Enable Intermediate state"
Style="{StaticResource CheckBoxNormalStyle}"
IsChecked="{Binding IsThreeState}"/>
</StackLayout>
</ScrollView>
</Grid>
</Border>
</Grid>
</localCore:SampleView.Content>
</localCore:SampleView>

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

@ -0,0 +1,96 @@
#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 SampleBrowser.Maui.Base;
using SampleBrowser.Maui.Buttons.CheckBox;
namespace SampleBrowser.Maui.Buttons.CheckBox;
public partial class CustomizationsDesktop : SampleView
{
ViewModel viewModel;
public CustomizationsDesktop()
{
InitializeComponent();
viewModel = new ViewModel();
this.BindingContext = viewModel;
}
private void TextColorSegment_Clicked(object sender, EventArgs e)
{
viewModel.TextColor = Color.FromArgb("#E5E4E2");
}
private void TextColorSegment_Clicked_1(object sender, EventArgs e)
{
viewModel.TextColor = Color.FromArgb("#c6c6c6");
}
private void TextColorSegment_Clicked_2(object sender, EventArgs e)
{
viewModel.TextColor = Color.FromArgb("#538eed");
}
private void TextColorSegment_Clicked_3(object sender, EventArgs e)
{
viewModel.TextColor = Color.FromArgb("#af2463");
}
private void TextColorSegment_Clicked_4(object sender, EventArgs e)
{
viewModel.TextColor = Color.FromArgb("#000000");
}
private void CheckedColorSegment_Clicked(object sender, EventArgs e)
{
checkBox.CheckedColor = Color.FromArgb("#E5E4E2");
}
private void CheckedColorSegment_Clicked_1(object sender, EventArgs e)
{
checkBox.CheckedColor = Color.FromArgb("#c6c6c6");
}
private void CheckedColorSegment_Clicked_2(object sender, EventArgs e)
{
checkBox.CheckedColor = Color.FromArgb("#538eed");
}
private void CheckedColorSegment_Clicked_3(object sender, EventArgs e)
{
checkBox.CheckedColor = Color.FromArgb("#af2463");
}
private void CheckedColorSegment_Clicked_4(object sender, EventArgs e)
{
checkBox.CheckedColor = Color.FromArgb("#000000");
}
private void UncheckedColorSegment_Clicked(object sender, EventArgs e)
{
checkBox.UncheckedColor = Color.FromArgb("#E5E4E2");
}
private void UncheckedColorSegment_Clicked_1(object sender, EventArgs e)
{
checkBox.UncheckedColor = Color.FromArgb("#c6c6c6");
}
private void UncheckedColorSegment_Clicked_2(object sender, EventArgs e)
{
checkBox.UncheckedColor = Color.FromArgb("#538eed");
}
private void UncheckedColorSegment_Clicked_3(object sender, EventArgs e)
{
checkBox.UncheckedColor = Color.FromArgb("#af2463");
}
private void UncheckedColorSegment_Clicked_4(object sender, EventArgs e)
{
checkBox.UncheckedColor = Color.FromArgb("#000000");
}
}

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

@ -0,0 +1,244 @@
<?xml version="1.0" encoding="utf-8" ?>
<localCore:SampleView x:Class="SampleBrowser.Maui.Buttons.CheckBox.CustomizationsMobile"
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:localCore="clr-namespace:SampleBrowser.Maui.Base;assembly=SampleBrowser.Maui.Base"
xmlns:tabView="clr-namespace:Syncfusion.Maui.TabView;assembly=Syncfusion.Maui.TabView"
xmlns:Core="clr-namespace:Syncfusion.Maui.Core;assembly=Syncfusion.Maui.Core"
xmlns:button="clr-namespace:Syncfusion.Maui.Buttons;assembly=Syncfusion.Maui.Buttons"
xmlns:sliders="clr-namespace:Syncfusion.Maui.Sliders;assembly=Syncfusion.Maui.Sliders"
xmlns:local="clr-namespace:SampleBrowser.Maui.Buttons.CheckBox"
BackgroundColor="White">
<localCore:SampleView.Resources>
<Style x:Key="CheckBoxNormalStyle" TargetType="button:SfCheckBox">
<Setter Property="TextColor" Value="Black"/>
<Setter Property="FontSize" Value="14"/>
</Style>
<Style x:Key="EntryNormalStyle" TargetType="Entry">
<Setter Property="TextColor" Value="Black"/>
<Setter Property="FontSize" Value="15"/>
</Style>
</localCore:SampleView.Resources>
<localCore:SampleView.Content>
<Grid Padding="5" Margin="10,5,10,0">
<Grid.RowDefinitions>
<RowDefinition Height="200"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<button:SfCheckBox Grid.Row="0" x:Name="checkBox"
WidthRequest="150"
HeightRequest="50"
IsThreeState="{Binding IsThreeState}"
TextColor="{Binding TextColor}"
Text="{Binding Text}"
HorizontalOptions="Center"
HorizontalTextAlignment="Start"
FontSize="15"
FontFamily="Roboto-Regular"
CornerRadius="{Binding CornerRadius,Mode=TwoWay}">
</button:SfCheckBox>
<Grid Grid.Row="1" Margin="8,5,5,5">
<ScrollView>
<StackLayout>
<Label Text="Options" FontFamily="Roboto-Medium" FontSize="16"/>
<Core:SfTextInputLayout ContainerType="Outlined" Margin="0,10,5,0" ContainerBackground="Transparent"
Hint="Text">
<Entry TextColor="#212121" MinimumHeightRequest="0" FontFamily="Roboto-Regular"
Style="{StaticResource EntryNormalStyle}"
Text="{Binding Text,Mode=TwoWay}" />
</Core:SfTextInputLayout>
<StackLayout Margin="5,0,10,0" Spacing="3">
<tabView:SfTabView WidthRequest="340"
HorizontalOptions="Center"
VerticalOptions="Center"
HeightRequest="130">
<tabView:SfTabItem Header="Text Color" FontFamily="Roboto-Regular" HeightRequest="40">
<tabView:SfTabItem.FontSize>
<OnPlatform x:TypeArguments="x:Double">
<On Platform="Android" Value ="11"/>
<On Platform="iOS" Value="10"/>
</OnPlatform>
</tabView:SfTabItem.FontSize>
<tabView:SfTabItem.Content>
<StackLayout HorizontalOptions="CenterAndExpand" Margin="0,10,0,0" >
<HorizontalStackLayout Spacing="15">
<Button WidthRequest="40"
HeightRequest="40"
CornerRadius="20"
BackgroundColor="#f2f3f4"
Clicked="TextColorSegment_Clicked"
x:Name="TextColorSegment" >
</Button>
<Button WidthRequest="40"
HeightRequest="40"
CornerRadius="20"
BackgroundColor="#c6c6c6"
Clicked="TextColorSegment_Clicked_1"
x:Name="TextColorSegment1" >
</Button>
<Button WidthRequest="40"
HeightRequest="40"
CornerRadius="20"
BackgroundColor="#538eed"
Clicked="TextColorSegment_Clicked_2"
x:Name="TextColorSegment2" >
</Button>
<Button WidthRequest="40"
HeightRequest="40"
CornerRadius="20"
BackgroundColor="#af2463"
Clicked="TextColorSegment_Clicked_3"
x:Name="TextColorSegment3" >
</Button>
<Button WidthRequest="40"
HeightRequest="40"
CornerRadius="20"
BackgroundColor="#000000"
Clicked="TextColorSegment_Clicked_4"
x:Name="TextColorSegment4" >
</Button>
</HorizontalStackLayout>
</StackLayout>
</tabView:SfTabItem.Content>
</tabView:SfTabItem>
<tabView:SfTabItem Header="Checked Color" FontFamily="Roboto-Regular" HeightRequest="40">
<tabView:SfTabItem.FontSize>
<OnPlatform x:TypeArguments="x:Double">
<On Platform="Android" Value ="11"/>
<On Platform="iOS" Value="10"/>
</OnPlatform>
</tabView:SfTabItem.FontSize>
<tabView:SfTabItem.Content>
<StackLayout HorizontalOptions="CenterAndExpand" Margin="0,10,0,0">
<HorizontalStackLayout Spacing="15">
<Button WidthRequest="40"
HeightRequest="40"
CornerRadius="20"
BackgroundColor="#f2f3f4"
Clicked="CheckedColorSegment_Clicked"
x:Name="CheckedColorSegment">
</Button>
<Button WidthRequest="40"
HeightRequest="40"
CornerRadius="20"
BackgroundColor="#c6c6c6"
Clicked="CheckedColorSegment_Clicked_1"
x:Name="CheckedColorSegment1">
</Button>
<Button WidthRequest="40"
HeightRequest="40"
CornerRadius="20"
BackgroundColor="#538eed"
Clicked="CheckedColorSegment_Clicked_2"
x:Name="CheckedColorSegment2">
</Button>
<Button WidthRequest="40"
HeightRequest="40"
CornerRadius="20"
BackgroundColor="#af2463"
Clicked="CheckedColorSegment_Clicked_3"
x:Name="CheckedColorSegment3">
</Button>
<Button WidthRequest="40"
HeightRequest="40"
CornerRadius="20"
BackgroundColor="#000000"
Clicked="CheckedColorSegment_Clicked_4"
x:Name="CheckedColorSegment4">
</Button>
</HorizontalStackLayout>
</StackLayout>
</tabView:SfTabItem.Content>
</tabView:SfTabItem>
<tabView:SfTabItem Header="UnChecked Color" FontFamily="Roboto-Regular" HeightRequest="40">
<tabView:SfTabItem.FontSize>
<OnPlatform x:TypeArguments="x:Double">
<On Platform="Android" Value ="11"/>
<On Platform="iOS" Value="10"/>
</OnPlatform>
</tabView:SfTabItem.FontSize>
<tabView:SfTabItem.Content>
<StackLayout HorizontalOptions="CenterAndExpand" Margin="0,10,0,0">
<HorizontalStackLayout Spacing="15">
<Button WidthRequest="40"
HeightRequest="40"
CornerRadius="20"
BackgroundColor="#f2f3f4"
Clicked="UnCheckedColorSegment_Clicked"
x:Name="UnCheckedColorSegment" >
</Button>
<Button WidthRequest="40"
HeightRequest="40"
CornerRadius="20"
BackgroundColor="#c6c6c6"
Clicked="UnCheckedColorSegment_Clicked_1"
x:Name="UnCheckedColorSegment1" >
</Button>
<Button WidthRequest="40"
HeightRequest="40"
CornerRadius="20"
BackgroundColor="#538eed"
Clicked="UnCheckedColorSegment_Clicked_2"
x:Name="UnCheckedColorSegment2" >
</Button>
<Button WidthRequest="40"
HeightRequest="40"
CornerRadius="20"
BackgroundColor="#af2463"
Clicked="UnCheckedColorSegment_Clicked_3"
x:Name="UnCheckedColorSegment3" >
</Button>
<Button WidthRequest="40"
HeightRequest="40"
CornerRadius="20"
BackgroundColor="#000000"
Clicked="UnCheckedColorSegment_Clicked_4"
x:Name="UnCheckedColorSegment4" >
</Button>
</HorizontalStackLayout>
</StackLayout>
</tabView:SfTabItem.Content>
</tabView:SfTabItem>
</tabView:SfTabView>
</StackLayout>
<Label Text="Corner Radius" FontFamily="Roboto-Medium" Margin="0,0,5,0"/>
<StackLayout>
<Grid RowDefinitions="40" Margin="0,5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="45"/>
</Grid.ColumnDefinitions>
<Slider x:Name="borderSlider"
HeightRequest="50"
VerticalOptions="CenterAndExpand"
Minimum="0"
Maximum="10"
MaximumTrackColor="#E0E0E0"
MinimumTrackColor="#4285F4"
Value="{Binding Radius,Mode=TwoWay}"
ThumbColor="#4285F4">
</Slider>
<Label Text="{Binding Radius}"
Grid.Column="1"
FontFamily="Roboto-Regular"
HorizontalTextAlignment="Center"
VerticalTextAlignment="Center" />
</Grid>
</StackLayout>
<Grid Margin="-10,10">
<HorizontalStackLayout HorizontalOptions="Start">
<button:SfCheckBox IsChecked="{Binding IsThreeState}"/>
<Label Text="Enable Intermediate State" FontFamily="Roboto-Regular" VerticalOptions="Center"/>
</HorizontalStackLayout>
</Grid>
</StackLayout>
</ScrollView>
</Grid>
</Grid>
</localCore:SampleView.Content>
</localCore:SampleView>

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

@ -0,0 +1,97 @@
#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 SampleBrowser.Maui.Base;
using SampleBrowser.Maui.Buttons.RadioButton;
namespace SampleBrowser.Maui.Buttons.CheckBox;
public partial class CustomizationsMobile : SampleView
{
ViewModel viewModel;
public CustomizationsMobile()
{
InitializeComponent();
viewModel = new ViewModel();
this.BindingContext = viewModel;
}
private void TextColorSegment_Clicked(object sender, EventArgs e)
{
viewModel.TextColor = Color.FromArgb("#E5E4E2");
}
private void TextColorSegment_Clicked_1(object sender, EventArgs e)
{
viewModel.TextColor = Color.FromArgb("#c6c6c6");
}
private void TextColorSegment_Clicked_2(object sender, EventArgs e)
{
viewModel.TextColor = Color.FromArgb("#538eed");
}
private void TextColorSegment_Clicked_3(object sender, EventArgs e)
{
viewModel.TextColor = Color.FromArgb("#af2463");
}
private void TextColorSegment_Clicked_4(object sender, EventArgs e)
{
viewModel.TextColor = Color.FromArgb("#000000");
}
private void CheckedColorSegment_Clicked(object sender, EventArgs e)
{
checkBox.CheckedColor = Color.FromArgb("#E5E4E2");
}
private void CheckedColorSegment_Clicked_1(object sender, EventArgs e)
{
checkBox.CheckedColor = Color.FromArgb("#c6c6c6");
}
private void CheckedColorSegment_Clicked_2(object sender, EventArgs e)
{
checkBox.CheckedColor = Color.FromArgb("#538eed");
}
private void CheckedColorSegment_Clicked_3(object sender, EventArgs e)
{
checkBox.CheckedColor = Color.FromArgb("#af2463");
}
private void CheckedColorSegment_Clicked_4(object sender, EventArgs e)
{
checkBox.CheckedColor = Color.FromArgb("#000000");
}
private void UnCheckedColorSegment_Clicked(object sender, EventArgs e)
{
checkBox.UncheckedColor = Color.FromArgb("#E5E4E2");
}
private void UnCheckedColorSegment_Clicked_1(object sender, EventArgs e)
{
checkBox.UncheckedColor = Color.FromArgb("#c6c6c6");
}
private void UnCheckedColorSegment_Clicked_2(object sender, EventArgs e)
{
checkBox.UncheckedColor = Color.FromArgb("#538eed");
}
private void UnCheckedColorSegment_Clicked_3(object sender, EventArgs e)
{
checkBox.UncheckedColor = Color.FromArgb("#af2463");
}
private void UnCheckedColorSegment_Clicked_4(object sender, EventArgs e)
{
checkBox.UncheckedColor = Color.FromArgb("#000000");
}
}

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

@ -0,0 +1,178 @@
#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 Syncfusion.Maui.Buttons;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;
using SampleBrowser.Maui.Base.Converters;
using System.Reflection;
namespace SampleBrowser.Maui.Buttons.CheckBox;
public class ViewModel : INotifyPropertyChanged
{
#region Fields
/// <summary>
/// Represents the text color
/// </summary>
private Color textColor = Colors.Black;
/// <summary>
/// The corner radius of button.
/// </summary>
private CornerRadius cornerRadius = 50;
/// <summary>
/// Represents the border width
/// </summary>
private int radius = 1;
/// <summary>
/// The text of button.
/// </summary>
private string text = "CheckBox";
/// <summary>
/// The can show background image
/// </summary>
private bool ischecked = false;
/// <summary>
/// Represents the enable or disable the shadow
/// </summary>
private bool isThreestate;
#endregion
#region Property
/// <summary>
/// Gets or Sets the text color
/// </summary>
public Color TextColor
{
get
{
return textColor;
}
set
{
textColor = value;
OnPropertyChanged("TextColor");
}
}
/// <summary>
/// Gets or sets the border width.
/// </summary>
public int Radius
{
get
{
return radius;
}
set
{
radius = value;
CornerRadius = new CornerRadius(value, value, value, value);
OnPropertyChanged("Radius");
}
}
/// <summary>
/// Gets or sets the corner radius.
/// </summary>
/// <value>The corner radius.</value>
public CornerRadius CornerRadius
{
get
{
return cornerRadius;
}
set
{
cornerRadius = value;
OnPropertyChanged("CornerRadius");
}
}
/// <summary>
/// Gets or sets the text.
/// </summary>
/// <value>The text.</value>
public string Text
{
get
{
return text;
}
set
{
text = value;
OnPropertyChanged("Text");
}
}
/// <summary>
/// Gets or sets a value indicating whether this <see cref="T:button.buttonViewModel"/> is enable stack.
/// </summary>
/// <value><c>true</c> if is enable stack; otherwise, <c>false</c>.</value>
public bool IsChecked
{
get
{
return ischecked;
}
set
{
ischecked = value;
OnPropertyChanged("IsChecked");
}
}
/// <summary>
/// Gets or sets whether shadow enable or disable
/// </summary>
public bool IsThreeState
{
get
{
return isThreestate;
}
set
{
isThreestate = value;
OnPropertyChanged("IsThreeState");
}
}
#endregion
#region Property changed method
/// <summary>
/// Occurs when property changed.
/// </summary>
public event PropertyChangedEventHandler? PropertyChanged;
public void OnPropertyChanged([CallerMemberName] string? name = null) =>
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(name));
#endregion
}

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

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?>
<localcore:SampleView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="SampleBrowser.Maui.Buttons.CheckBox.GettingStarted"
xmlns:localcore="clr-namespace:SampleBrowser.Maui.Base;assembly=SampleBrowser.Maui.Base">
</localcore:SampleView>

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

@ -0,0 +1,33 @@
#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 SampleBrowser.Maui.Base;
namespace SampleBrowser.Maui.Buttons.CheckBox;
public partial class GettingStarted : SampleView
{
#if ANDROID || IOS
GettingStartedMobile gettingStartedMobile;
#else
GettingStartedDesktop gettingStartedDesktop;
#endif
public GettingStarted()
{
InitializeComponent();
#if ANDROID || IOS
gettingStartedMobile = new GettingStartedMobile();
this.Content = gettingStartedMobile.Content;
this.OptionView = gettingStartedMobile.OptionView;
#else
gettingStartedDesktop = new GettingStartedDesktop();
this.Content = gettingStartedDesktop.Content;
this.OptionView = gettingStartedDesktop.OptionView;
this.WidthRequest = gettingStartedDesktop.WidthRequest;
#endif
}
}

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

@ -0,0 +1,192 @@
<?xml version="1.0" encoding="utf-8" ?>
<localcore:SampleView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="SampleBrowser.Maui.Buttons.CheckBox.GettingStartedDesktop"
xmlns:localcore="clr-namespace:SampleBrowser.Maui.Base;assembly=SampleBrowser.Maui.Base"
xmlns:core="clr-namespace:Syncfusion.Maui.Core;assembly=Syncfusion.Maui.Core"
xmlns:imageExtension="clr-namespace:SampleBrowser.Maui.Base.Converters;assembly=SampleBrowser.Maui.Base"
xmlns:Syncfusion="clr-namespace:Syncfusion.Maui.Buttons;assembly=Syncfusion.Maui.Buttons"
xmlns:listView="clr-namespace:Syncfusion.Maui.ListView;assembly=Syncfusion.Maui.ListView"
xmlns:local="clr-namespace:SampleBrowser.Maui.Buttons.Samples.CheckBox"
xmlns:thickness ="clr-namespace:Microsoft.Maui;assembly=Microsoft.Maui"
BackgroundColor="White">
<localcore:SampleView.Resources>
<ResourceDictionary>
<local:GettingStartedViewModel x:Key="ViewModel"/>
<imageExtension:SfImageSourceConverter x:Key="imageconverter"/>
<Style TargetType="Syncfusion:SfCheckBox">
<Setter Property="CheckedColor" Value="#6200EE"/>
<Setter Property="FontFamily" Value="Roboto-Regular"/>
</Style>
<Style TargetType="Border" x:Key="ColorBorder">
<Setter Property="Stroke" Value="Gray"/>
<Setter Property="StrokeThickness" Value="0"/>
<Setter Property="HeightRequest" Value="15"/>
<Setter Property="WidthRequest" Value="15"/>
<Setter Property="StrokeShape" Value="RoundRectangle 7.5"/>
</Style>
</ResourceDictionary>
</localcore:SampleView.Resources>
<localcore:SampleView.Content>
<Grid ColumnDefinitions="2.5*,7.5*">
<Border
Grid.Column="0"
Margin="5"
Padding="5"
Stroke="Gray"
StrokeThickness="0.3"
StrokeShape="RoundRectangle 10">
<ScrollView>
<StackLayout Spacing="5">
<Label
Margin="10,5"
FontSize="16"
VerticalTextAlignment="Center"
FontFamily="Roboto-Medium"
Text="Filters" />
<Label
Margin="10,0"
FontFamily="Roboto-Medium"
FontSize="14"
Padding="0,10,0,0"
Text="BRAND" />
<StackLayout>
<Syncfusion:SfCheckBox BindingContext="{x:StaticResource ViewModel}" HorizontalOptions="Start" Text="CAMPUS" IsChecked="{Binding BrandFilterChecked1}"/>
<Syncfusion:SfCheckBox BindingContext="{x:StaticResource ViewModel}" HorizontalOptions="Start" Text="Skechers" IsChecked="{Binding BrandFilterChecked2}"/>
<Syncfusion:SfCheckBox BindingContext="{x:StaticResource ViewModel}" HorizontalOptions="Start" Text="RED TAPE" IsChecked="{Binding BrandFilterChecked3}"/>
<Syncfusion:SfCheckBox BindingContext="{x:StaticResource ViewModel}" HorizontalOptions="Start" Text="Roadster" IsChecked="{Binding BrandFilterChecked4}"/>
</StackLayout>
<Label
Margin="10,0"
FontFamily="Roboto-Medium"
FontSize="14"
Padding="0,20,0,0"
Text="SIZE" />
<StackLayout>
<Syncfusion:SfCheckBox BindingContext="{x:StaticResource ViewModel}" HorizontalOptions="Start" Text="7" IsChecked="{Binding SizeFilterChecked2}"/>
<Syncfusion:SfCheckBox BindingContext="{x:StaticResource ViewModel}" HorizontalOptions="Start" Text="8" IsChecked="{Binding SizeFilterChecked3}"/>
<Syncfusion:SfCheckBox BindingContext="{x:StaticResource ViewModel}" HorizontalOptions="Start" Text="9" IsChecked="{Binding SizeFilterChecked4}"/>
<Syncfusion:SfCheckBox BindingContext="{x:StaticResource ViewModel}" HorizontalOptions="Start" Text="10" IsChecked="{Binding SizeFilterChecked5}"/>
</StackLayout>
<Label
FontFamily="Roboto-Medium"
Margin="10,0"
Padding="0,20,0,0"
FontSize="14"
Text="COLORS" />
<StackLayout>
<HorizontalStackLayout>
<Syncfusion:SfCheckBox x:Name="brown" HorizontalOptions="Start" BindingContext="{x:StaticResource ViewModel}" IsChecked="{Binding ColorFilterChecked1}"/>
<Border Style="{x:StaticResource ColorBorder}">
<BoxView Color="SandyBrown" />
</Border>
<Label Text="Brown" Margin="5" VerticalTextAlignment="Center">
<Label.GestureRecognizers>
<TapGestureRecognizer Tapped="TapGestureRecognizer_Tapped"/>
</Label.GestureRecognizers>
</Label>
</HorizontalStackLayout>
<HorizontalStackLayout>
<Syncfusion:SfCheckBox x:Name="green" HorizontalOptions="Start" BindingContext="{x:StaticResource ViewModel}" IsChecked="{Binding ColorFilterChecked2}"/>
<Border Style="{x:StaticResource ColorBorder}">
<BoxView Color="Green" />
</Border>
<Label Text="Green" Margin="5" VerticalTextAlignment="Center">
<Label.GestureRecognizers>
<TapGestureRecognizer Tapped="TapGestureRecognizer_Tapped_1"/>
</Label.GestureRecognizers>
</Label>
</HorizontalStackLayout>
<HorizontalStackLayout>
<Syncfusion:SfCheckBox x:Name="red" HorizontalOptions="Start" BindingContext="{x:StaticResource ViewModel}" IsChecked="{Binding ColorFilterChecked3}"/>
<Border Style="{x:StaticResource ColorBorder}">
<BoxView Color="Red" />
</Border>
<Label Text="Red" Margin="5" VerticalTextAlignment="Center">
<Label.GestureRecognizers>
<TapGestureRecognizer Tapped="TapGestureRecognizer_Tapped_2"/>
</Label.GestureRecognizers>
</Label>
</HorizontalStackLayout>
<HorizontalStackLayout>
<Syncfusion:SfCheckBox x:Name="sandal" HorizontalOptions="Start" BindingContext="{x:StaticResource ViewModel}" IsChecked="{Binding ColorFilterChecked4}"/>
<Border Style="{x:StaticResource ColorBorder}">
<BoxView Color="Tan"/>
</Border>
<Label Text="Sandal" Margin="5" VerticalTextAlignment="Center">
<Label.GestureRecognizers>
<TapGestureRecognizer Tapped="TapGestureRecognizer_Tapped_3"/>
</Label.GestureRecognizers>
</Label>
</HorizontalStackLayout>
<HorizontalStackLayout>
<Syncfusion:SfCheckBox x:Name="violet" HorizontalOptions="Start" BindingContext="{x:StaticResource ViewModel}" IsChecked="{Binding ColorFilterChecked5}"/>
<Border Style="{x:StaticResource ColorBorder}">
<BoxView Color="DarkViolet" />
</Border>
<Label Text="Violet" Margin="5" VerticalTextAlignment="Center">
<Label.GestureRecognizers>
<TapGestureRecognizer Tapped="TapGestureRecognizer_Tapped_4"/>
</Label.GestureRecognizers>
</Label>
</HorizontalStackLayout>
</StackLayout>
</StackLayout>
</ScrollView>
</Border>
<Border Grid.Column="1"
Margin="5"
Padding="5"
Stroke="Gray"
StrokeThickness="0.3"
StrokeShape="RoundRectangle 10">
<listView:SfListView BindingContext="{x:StaticResource ViewModel}" SelectionMode="None" ItemSpacing="5" ItemSize="260" ItemsSource="{Binding Filtered}">
<listView:SfListView.ItemsLayout>
<listView:GridLayout SpanCount="3" />
</listView:SfListView.ItemsLayout>
<listView:SfListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<Border
BackgroundColor="White"
Stroke="Gray"
StrokeThickness="0.3"
StrokeShape="RoundRectangle 0">
<Border.Margin>
<OnPlatform x:TypeArguments="thickness:Thickness">
<On Platform="MacCatalyst" Value="0"/>
<On Platform="WinUI" Value="0,0,7,0"/>
</OnPlatform>
</Border.Margin>
<Grid Margin="5" RowDefinitions="7*,3*">
<Image Source="{Binding Image,Converter={StaticResource imageconverter}}"/>
<Grid
RowDefinitions="1*,3*"
Grid.Row="1"
Margin="0,10"
Padding="5,0"
RowSpacing="5"
VerticalOptions="EndAndExpand">
<Label
FontSize="14"
VerticalTextAlignment="Center"
Text="{Binding Brand}"
FontFamily="Roboto-Medium"/>
<Label Grid.Row="1" FontFamily="Roboto-Regular" Text="{Binding Description}" LineBreakMode="WordWrap"/>
</Grid>
</Grid>
</Border>
</ViewCell>
</DataTemplate>
</listView:SfListView.ItemTemplate>
</listView:SfListView>
</Border>
</Grid>
</localcore:SampleView.Content>
</localcore:SampleView>

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

@ -0,0 +1,63 @@
#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 SampleBrowser.Maui.Base;
using SampleBrowser.Maui.Buttons.CheckBox;
using SampleBrowser.Maui.Buttons.Samples.CheckBox;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Runtime.CompilerServices;
namespace SampleBrowser.Maui.Buttons.CheckBox;
public partial class GettingStartedDesktop : SampleView
{
public GettingStartedDesktop()
{
InitializeComponent();
}
private void TapGestureRecognizer_Tapped(object sender, EventArgs e)
{
if (brown.IsChecked == true)
brown.IsChecked = false;
else
brown.IsChecked = true;
}
private void TapGestureRecognizer_Tapped_1(object sender, EventArgs e)
{
if (green.IsChecked == true)
green.IsChecked = false;
else
green.IsChecked = true;
}
private void TapGestureRecognizer_Tapped_2(object sender, EventArgs e)
{
if (red.IsChecked == true)
red.IsChecked = false;
else
red.IsChecked = true;
}
private void TapGestureRecognizer_Tapped_3(object sender, EventArgs e)
{
if (sandal.IsChecked == true)
sandal.IsChecked = false;
else
sandal.IsChecked = true;
}
private void TapGestureRecognizer_Tapped_4(object sender, EventArgs e)
{
if (violet.IsChecked == true)
violet.IsChecked = false;
else
violet.IsChecked = true;
}
}

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

@ -0,0 +1,152 @@
<?xml version="1.0" encoding="utf-8" ?>
<localcore:SampleView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="SampleBrowser.Maui.Buttons.CheckBox.GettingStartedMobile"
xmlns:localcore="clr-namespace:SampleBrowser.Maui.Base;assembly=SampleBrowser.Maui.Base"
xmlns:core="clr-namespace:Syncfusion.Maui.Core;assembly=Syncfusion.Maui.Core"
xmlns:listView="clr-namespace:Syncfusion.Maui.ListView;assembly=Syncfusion.Maui.ListView"
xmlns:imageExtension="clr-namespace:SampleBrowser.Maui.Base.Converters;assembly=SampleBrowser.Maui.Base"
xmlns:local="clr-namespace:SampleBrowser.Maui.Buttons.Samples.CheckBox"
xmlns:Syncfusion="clr-namespace:Syncfusion.Maui.Buttons;assembly=Syncfusion.Maui.Buttons">
<localcore:SampleView.Resources>
<ResourceDictionary>
<local:GettingStartedViewModel x:Key="ViewModel"/>
<imageExtension:SfImageSourceConverter x:Key="imageconverter"/>
<Style TargetType="Syncfusion:SfCheckBox">
<Setter Property="CheckedColor" Value="#6200EE"/>
<Setter Property="FontFamily" Value="Roboto-Regular"/>
</Style>
</ResourceDictionary>
</localcore:SampleView.Resources>
<localcore:SampleView.Content>
<Grid RowDefinitions="Auto,Auto,Auto,*">
<Label Margin="15,5" Text="Filters" FontSize="16" FontFamily="Roboto-Medium" HorizontalOptions="Start"/>
<Border
Grid.Column="0"
Grid.Row="1"
Margin="10,5"
Stroke="Gray"
BackgroundColor="White"
StrokeShape="RoundRectangle 10"
StrokeThickness="1">
<HorizontalStackLayout HorizontalOptions="Center" Spacing="20">
<StackLayout WidthRequest="110" Margin="0,0,0,10">
<Label
Margin="10,10,10,5"
FontFamily="Roboto-Medium"
Text="BRAND" />
<Syncfusion:SfCheckBox HorizontalOptions="Start" Text="CAMPUS" BindingContext="{x:StaticResource ViewModel}" IsChecked="{Binding BrandFilterChecked1}"/>
<Syncfusion:SfCheckBox HorizontalOptions="Start" Text="Skechers" MinimumWidthRequest="10" BindingContext="{x:StaticResource ViewModel}" IsChecked="{Binding BrandFilterChecked2}"/>
<Syncfusion:SfCheckBox HorizontalOptions="Start" Text="RED TAPE" MinimumWidthRequest="10" BindingContext="{x:StaticResource ViewModel}" IsChecked="{Binding BrandFilterChecked3}"/>
<Syncfusion:SfCheckBox HorizontalOptions="Start" Text="Roadster" MinimumWidthRequest="10" BindingContext="{x:StaticResource ViewModel}" IsChecked="{Binding BrandFilterChecked4}"/>
</StackLayout>
<StackLayout Margin="0,0,0,10">
<Label
Margin="10,10,10,5"
FontFamily="Roboto-Medium"
Text="SIZE" />
<Syncfusion:SfCheckBox HorizontalOptions="Start" Text="7" BindingContext="{x:StaticResource ViewModel}" IsChecked="{Binding SizeFilterChecked2}"/>
<Syncfusion:SfCheckBox HorizontalOptions="Start" Text="8" BindingContext="{x:StaticResource ViewModel}" IsChecked="{Binding SizeFilterChecked3}"/>
<Syncfusion:SfCheckBox HorizontalOptions="Start" Text="9" BindingContext="{x:StaticResource ViewModel}" IsChecked="{Binding SizeFilterChecked4}"/>
<Syncfusion:SfCheckBox HorizontalOptions="Start" Text="10" BindingContext="{x:StaticResource ViewModel}" IsChecked="{Binding SizeFilterChecked5}"/>
</StackLayout>
<StackLayout Margin="0,0,0,10">
<Label
Margin="10,10,10,5"
FontFamily="Roboto-Medium"
Text="COLORS" />
<HorizontalStackLayout>
<Syncfusion:SfCheckBox x:Name="brown" HorizontalOptions="Start" BindingContext="{x:StaticResource ViewModel}" IsChecked="{Binding ColorFilterChecked1}"/>
<BoxView
CornerRadius="10"
HeightRequest="15"
WidthRequest="15"
Color="SandyBrown" />
<Label Text="Brown" Margin="5" VerticalTextAlignment="Center">
<Label.GestureRecognizers>
<TapGestureRecognizer Tapped="TapGestureRecognizer_Tapped"/>
</Label.GestureRecognizers>
</Label>
</HorizontalStackLayout>
<HorizontalStackLayout>
<Syncfusion:SfCheckBox x:Name="green" HorizontalOptions="Start" BindingContext="{x:StaticResource ViewModel}" IsChecked="{Binding ColorFilterChecked2}"/>
<BoxView
CornerRadius="10"
HeightRequest="15"
WidthRequest="15"
Color="Green" />
<Label Text="Green" Margin="5" VerticalTextAlignment="Center">
<Label.GestureRecognizers>
<TapGestureRecognizer Tapped="TapGestureRecognizer_Tapped_1"/>
</Label.GestureRecognizers>
</Label>
</HorizontalStackLayout>
<HorizontalStackLayout>
<Syncfusion:SfCheckBox x:Name="red" HorizontalOptions="Start" BindingContext="{x:StaticResource ViewModel}" IsChecked="{Binding ColorFilterChecked3}"/>
<BoxView
CornerRadius="10"
HeightRequest="15"
WidthRequest="15"
Color="Red" />
<Label Text="Red" Margin="5" VerticalTextAlignment="Center">
<Label.GestureRecognizers>
<TapGestureRecognizer Tapped="TapGestureRecognizer_Tapped_2"/>
</Label.GestureRecognizers>
</Label>
</HorizontalStackLayout>
<HorizontalStackLayout>
<Syncfusion:SfCheckBox x:Name="sandal" HorizontalOptions="Start" BindingContext="{x:StaticResource ViewModel}" IsChecked="{Binding ColorFilterChecked4}"/>
<BoxView
CornerRadius="10"
HeightRequest="15"
WidthRequest="15"
Color="Tan" />
<Label Text="Sandal" Margin="5" VerticalTextAlignment="Center">
<Label.GestureRecognizers>
<TapGestureRecognizer Tapped="TapGestureRecognizer_Tapped_3"/>
</Label.GestureRecognizers>
</Label>
</HorizontalStackLayout>
</StackLayout>
</HorizontalStackLayout>
</Border>
<Label Text="Results" FontFamily="Roboto-Medium" FontSize="16" Grid.Row="2" HorizontalOptions="Start" Padding="0,10,0,0" Margin="15,5"/>
<listView:SfListView Grid.Row="3" BindingContext="{x:StaticResource ViewModel}" Margin="5,0,5,5" SelectionMode="None" ItemSpacing="5" ItemSize="180" ItemsSource="{Binding Filtered}">
<listView:SfListView.ItemsLayout>
<listView:GridLayout SpanCount="2" />
</listView:SfListView.ItemsLayout>
<listView:SfListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<Border
BackgroundColor="White"
Padding="5"
Stroke="Gray"
StrokeThickness="1"
StrokeShape="RoundRectangle 10">
<Grid Margin="5" RowDefinitions="7*,3*">
<Image Source="{Binding Image,Converter={StaticResource imageconverter}}"/>
<Grid Grid.Row="1" RowDefinitions="*,*">
<Label
Text="{Binding Brand}"
VerticalTextAlignment="Center"
FontFamily="Roboto-Medium"/>
<Label Grid.Row="1" Text="{Binding Description}" LineBreakMode="NoWrap" FontFamily="Roboto-Regular"/>
</Grid>
</Grid>
</Border>
</ViewCell>
</DataTemplate>
</listView:SfListView.ItemTemplate>
</listView:SfListView>
</Grid>
</localcore:SampleView.Content>
</localcore:SampleView>

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

@ -0,0 +1,50 @@
#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 SampleBrowser.Maui.Base;
namespace SampleBrowser.Maui.Buttons.CheckBox;
public partial class GettingStartedMobile : SampleView
{
public GettingStartedMobile()
{
InitializeComponent();
}
private void TapGestureRecognizer_Tapped(object sender, EventArgs e)
{
if (brown.IsChecked == true)
brown.IsChecked = false;
else
brown.IsChecked = true;
}
private void TapGestureRecognizer_Tapped_1(object sender, EventArgs e)
{
if(green.IsChecked == true)
green.IsChecked = false;
else
green.IsChecked = true;
}
private void TapGestureRecognizer_Tapped_2(object sender, EventArgs e)
{
if(red.IsChecked == true)
red.IsChecked = false;
else
red.IsChecked = true;
}
private void TapGestureRecognizer_Tapped_3(object sender, EventArgs e)
{
if(sandal.IsChecked == true)
sandal.IsChecked = false;
else
sandal.IsChecked = true;
}
}

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

@ -0,0 +1,438 @@
#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 Syncfusion.Maui.DataSource.Extensions;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;
namespace SampleBrowser.Maui.Buttons.Samples.CheckBox;
public class GettingStartedViewModel : INotifyPropertyChanged
{
public event PropertyChangedEventHandler? PropertyChanged;
protected virtual void OnPropertyChanged([CallerMemberName] string? propertyName = null)
{
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
}
#region Properties
private bool brandFilterChecked1;
public bool BrandFilterChecked1
{
get { return brandFilterChecked1; }
set
{
if (brandFilterChecked1 != value)
{
brandFilterChecked1 = value;
OnPropertyChanged(nameof(BrandFilterChecked1));
UpdateFilteredProducts();
}
}
}
private bool brandFilterChecked2 = true;
public bool BrandFilterChecked2
{
get { return brandFilterChecked2; }
set
{
if (brandFilterChecked2 != value)
{
brandFilterChecked2 = value;
OnPropertyChanged(nameof(BrandFilterChecked2));
UpdateFilteredProducts();
}
}
}
private bool brandFilterChecked3 = true;
public bool BrandFilterChecked3
{
get { return brandFilterChecked3; }
set
{
if (brandFilterChecked3 != value)
{
brandFilterChecked3 = value;
OnPropertyChanged(nameof(BrandFilterChecked3));
UpdateFilteredProducts();
}
}
}
private bool brandFilterChecked4;
public bool BrandFilterChecked4
{
get { return brandFilterChecked4; }
set
{
if (brandFilterChecked4 != value)
{
brandFilterChecked4 = value;
OnPropertyChanged(nameof(BrandFilterChecked4));
UpdateFilteredProducts();
}
}
}
private bool sizeFilterChecked2 = true;
public bool SizeFilterChecked2
{
get { return sizeFilterChecked2; }
set
{
if (sizeFilterChecked2 != value)
{
sizeFilterChecked2 = value;
OnPropertyChanged(nameof(SizeFilterChecked2));
UpdateFilteredProducts();
}
}
}
private bool sizeFilterChecked3 = true;
public bool SizeFilterChecked3
{
get { return sizeFilterChecked3; }
set
{
if (sizeFilterChecked3 != value)
{
sizeFilterChecked3 = value;
OnPropertyChanged(nameof(SizeFilterChecked3));
UpdateFilteredProducts();
}
}
}
private bool sizeFilterChecked4;
public bool SizeFilterChecked4
{
get { return sizeFilterChecked4; }
set
{
if (sizeFilterChecked4 != value)
{
sizeFilterChecked4 = value;
OnPropertyChanged(nameof(SizeFilterChecked4));
UpdateFilteredProducts();
}
}
}
private bool sizeFilterChecked5;
public bool SizeFilterChecked5
{
get { return sizeFilterChecked5; }
set
{
if (sizeFilterChecked5 != value)
{
sizeFilterChecked5 = value;
OnPropertyChanged(nameof(SizeFilterChecked5));
UpdateFilteredProducts();
}
}
}
private bool colorFilterChecked1;
public bool ColorFilterChecked1
{
get { return colorFilterChecked1; }
set
{
if (colorFilterChecked1 != value)
{
colorFilterChecked1 = value;
OnPropertyChanged(nameof(colorFilterChecked1));
UpdateFilteredProducts();
}
}
}
private bool colorFilterChecked2 = true;
public bool ColorFilterChecked2
{
get { return colorFilterChecked2; }
set
{
if (colorFilterChecked2 != value)
{
colorFilterChecked2 = value;
OnPropertyChanged(nameof(colorFilterChecked2));
UpdateFilteredProducts();
}
}
}
private bool colorFilterChecked3 = true;
public bool ColorFilterChecked3
{
get { return colorFilterChecked3; }
set
{
if (colorFilterChecked3 != value)
{
colorFilterChecked3 = value;
OnPropertyChanged(nameof(colorFilterChecked3));
UpdateFilteredProducts();
}
}
}
private bool colorFilterChecked4;
public bool ColorFilterChecked4
{
get { return colorFilterChecked4; }
set
{
if (colorFilterChecked4 != value)
{
colorFilterChecked4 = value;
OnPropertyChanged(nameof(colorFilterChecked4));
UpdateFilteredProducts();
}
}
}
private bool colorFilterChecked5;
public bool ColorFilterChecked5
{
get { return colorFilterChecked5; }
set
{
if (colorFilterChecked5 != value)
{
colorFilterChecked5 = value;
OnPropertyChanged(nameof(colorFilterChecked5));
UpdateFilteredProducts();
}
}
}
public ObservableCollection<Product> Products1 { get; set; }
public ObservableCollection<Product> Products2 { get; set; }
public ObservableCollection<Product> Products3 { get; set; }
public ObservableCollection<Product> Products4 { get; set; }
private ObservableCollection<Product>? filtered;
public ObservableCollection<Product>? Filtered
{
get { return filtered; }
set
{
if (filtered != value)
{
filtered = value;
OnPropertyChanged(nameof(Filtered));
}
}
}
#endregion
#region Constructor
public GettingStartedViewModel()
{
Products1 = new ObservableCollection<Product>();
Products2 = new ObservableCollection<Product>();
Products3 = new ObservableCollection<Product>();
Products4 = new ObservableCollection<Product>();
#if ANDROID || IOS
string description1 = "Lightweight Sneakers";
string description2 = "Stylish Smart Sneakers";
#else
string description1 = "Lightweight Sneakers for Men";
string description2 = "Stylish Smart Sneakers for Men";
#endif
Products1.Add(new Product("CAMPUS", "brownshoe-01.png", "6 7 8", Colors.Brown, description1));
Products1.Add(new Product("CAMPUS", "greenshoe-02.png", "6 7 8 9 10", Colors.Green, description2));
Products1.Add(new Product("CAMPUS", "redshoe-03.png", "7 8 9 10 ", Colors.Red, description2));
Products1.Add(new Product("CAMPUS", "sandalshoe-04.png", "9 10", Colors.Tan, description2));
Products1.Add(new Product("CAMPUS", "violetshoe-05.png", "6 7", Colors.Violet, description1));
Products1.Add(new Product("CAMPUS", "brownshoe-02.png", "7 8 9", Colors.Brown, description2));
Products1.Add(new Product("CAMPUS", "greenshoe-03.png", "6 7 8 9", Colors.Green, description2));
Products1.Add(new Product("CAMPUS", "redshoe-04.png", "7 8 9 10", Colors.Red, description2));
Products1.Add(new Product("CAMPUS", "sandalshoe-05.png", "6 7 8 9 10", Colors.Tan, description1));
Products1.Add(new Product("CAMPUS", "violetshoe-01.png", "6 9 10", Colors.Violet, description1));
Products2.Add(new Product("Skechers", "brownshoe-03.png", "6 7 8 9 10", Colors.Brown, description2));
Products2.Add(new Product("Skechers", "greenshoe-04.png", "8 9 10", Colors.Green, description2));
Products2.Add(new Product("Skechers", "redshoe-05.png", "6 7 9 10", Colors.Red, description1));
Products2.Add(new Product("Skechers", "sandalshoe-01.png", "6 7 8 9 10", Colors.Tan, description1));
Products2.Add(new Product("Skechers", "violetshoe-02.png", "6 7 10", Colors.Violet, description2));
Products2.Add(new Product("Skechers", "brownshoe-04.png", "6 7 8 9 10", Colors.Brown, description2));
Products2.Add(new Product("Skechers", "greenshoe-05.png", "6 7 8", Colors.Green, description1));
Products2.Add(new Product("Skechers", "redshoe-01.png", "6 7 8 9 10", Colors.Red, description1));
Products2.Add(new Product("Skechers", "sandalshoe-02.png", "8 9 10", Colors.Tan, description2));
Products2.Add(new Product("Skechers", "violetshoe-03.png", "6 7 8 9 10", Colors.Violet, description2));
Products3.Add(new Product("RED TAPE", "brownshoe-05.png", "6 7 8 9 10", Colors.Brown, description1));
Products3.Add(new Product("RED TAPE", "greenshoe-01.png", "8 9 10", Colors.Green, description1));
Products3.Add(new Product("RED TAPE", "redshoe-02.png", "6 7 8 9 10", Colors.Red, description2));
Products3.Add(new Product("RED TAPE", "sandalshoe-03.png", "6 8 9 10", Colors.Tan, description2));
Products3.Add(new Product("RED TAPE", "violetshoe-04.png", "6 7 8 9 10", Colors.Violet, description2));
Products3.Add(new Product("RED TAPE", "brownshoe-01.png", "6 9 10", Colors.Brown, description1));
Products3.Add(new Product("RED TAPE", "greenshoe-02.png", "6 7 8 9 10", Colors.Green, description2));
Products3.Add(new Product("RED TAPE", "redshoe-03.png", "6 7 8", Colors.Red, description2));
Products3.Add(new Product("RED TAPE", "sandalshoe-04.png", "6 7 8 9 10", Colors.Tan, description2));
Products3.Add(new Product("RED TAPE", "violetshoe-05.png", "6 7 8 10", Colors.Violet, description1));
Products4.Add(new Product("Roadster", "brownshoe-02.png", "6 7 8", Colors.Brown, description2));
Products4.Add(new Product("Roadster", "greenshoe-03.png", "6 7 8 9 10", Colors.Green, description2));
Products4.Add(new Product("Roadster", "redshoe-04.png", "6 9 10", Colors.Red, description2));
Products4.Add(new Product("Roadster", "sandalshoe-05.png", "6 7 8 9 10", Colors.Tan, description1));
Products4.Add(new Product("Roadster", "violetshoe-01.png", "6 9 10", Colors.Violet, description1));
Products4.Add(new Product("Roadster", "brownshoe-03.png", "6 7 8 9 10", Colors.Brown, description2));
Products4.Add(new Product("Roadster", "greenshoe-04.png", "8 9 10", Colors.Green, description2));
Products4.Add(new Product("Roadster", "redshoe-05.png", "6 7 8 9 10", Colors.Red, description1));
Products4.Add(new Product("Roadster", "sandalshoe-01.png", "6 7 10", Colors.Tan, description1));
Products4.Add(new Product("Roadster", "violetshoe-02.png", "6 7 9 10", Colors.Violet, description2));
UpdateFilteredProducts();
}
#endregion
#region Methods
private void UpdateFilteredProducts()
{
Filtered = GetFilteredProducts();
OnPropertyChanged(nameof(Filtered));
}
private ObservableCollection<Product> GetFilteredProducts()
{
var filteredList = new ObservableCollection<Product>();
if (brandFilterChecked1)
{
foreach (var product in Products1)
{
if (IsColorChecked(product) || IsColorUnfiltered())
filteredList.Add(product);
}
}
if (brandFilterChecked2)
{
foreach (var product in Products2)
{
if (IsColorChecked(product) || IsColorUnfiltered())
filteredList.Add(product);
}
}
if (brandFilterChecked3)
{
foreach (var product in Products3)
{
if (IsColorChecked(product) || IsColorUnfiltered())
filteredList.Add(product);
}
}
if (brandFilterChecked4)
{
foreach (var product in Products4)
{
if (IsColorChecked(product) || IsColorUnfiltered())
filteredList.Add(product);
}
}
if (!brandFilterChecked1 && !brandFilterChecked2 && !brandFilterChecked3 && !brandFilterChecked4)
{
filteredList = GetProducts();
}
List<Product> products = new List<Product>();
products = filteredList.OrderBy(x => Random.Shared.Next()).ToList<Product>();
filteredList = this.GetCollection(products);
return filteredList;
}
private ObservableCollection<Product> GetCollection(List<Product> list)
{
var filteredList = new ObservableCollection<Product>();
foreach (var product in list)
{
filteredList.Add(product);
}
return filteredList;
}
private ObservableCollection<Product> GetProducts()
{
var filteredList = new ObservableCollection<Product>();
foreach (var product in Products1)
{
if (IsColorChecked(product) || IsColorUnfiltered())
filteredList.Add(product);
}
foreach (var product in Products2)
{
if (IsColorChecked(product) || IsColorUnfiltered())
filteredList.Add(product);
}
foreach (var product in Products3)
{
if (IsColorChecked(product) || IsColorUnfiltered())
filteredList.Add(product);
}
foreach (var product in Products4)
{
if (IsColorChecked(product) || IsColorUnfiltered())
filteredList.Add(product);
}
return filteredList;
}
private bool IsColorChecked(Product product)
{
return ((colorFilterChecked1 && product.Color == Colors.Brown) || (colorFilterChecked2 && product.Color == Colors.Green) || (colorFilterChecked3 && product.Color == Colors.Red) || (colorFilterChecked4 && product.Color == Colors.Tan) || (colorFilterChecked5 && product.Color == Colors.Violet));
}
private bool IsColorUnfiltered()
{
return (!colorFilterChecked1 && !colorFilterChecked2 && !colorFilterChecked3 && !colorFilterChecked4 && !colorFilterChecked5);
}
#endregion
#region Model
public class Product
{
public string Brand { get; set; }
public string Description { get; set; }
public string Size { get; set; }
public Color Color { get; set; }
public string Image { get; set; }
public Product(string brand, string image, string size, Color color, string description)
{
Brand = brand;
Description = description;
Size = size;
Color = color;
Image = image;
}
}
#endregion
}

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

@ -0,0 +1,7 @@
<localCore:SampleView x:Class="SampleBrowser.Maui.Buttons.RadioButton.Customizations"
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:localCore="clr-namespace:SampleBrowser.Maui.Base;assembly=SampleBrowser.Maui.Base"
BackgroundColor="White">
</localCore:SampleView>

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

@ -0,0 +1,23 @@
#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 SampleBrowser.Maui.Base;
namespace SampleBrowser.Maui.Buttons.RadioButton;
public partial class Customizations : SampleView
{
public Customizations()
{
InitializeComponent();
#if ANDROID || IOS
this.Content = new CustomizationsMobile();
#else
this.Content = new CustomizationsDesktop();
#endif
}
}

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

@ -0,0 +1,250 @@
<?xml version="1.0" encoding="utf-8" ?>
<localCore:SampleView x:Class="SampleBrowser.Maui.Buttons.RadioButton.CustomizationsDesktop"
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:localCore="clr-namespace:SampleBrowser.Maui.Base;assembly=SampleBrowser.Maui.Base"
xmlns:tabView="clr-namespace:Syncfusion.Maui.TabView;assembly=Syncfusion.Maui.TabView"
xmlns:Core="clr-namespace:Syncfusion.Maui.Core;assembly=Syncfusion.Maui.Core"
xmlns:button="clr-namespace:Syncfusion.Maui.Buttons;assembly=Syncfusion.Maui.Buttons"
xmlns:sliders="clr-namespace:Syncfusion.Maui.Sliders;assembly=Syncfusion.Maui.Sliders"
xmlns:local="clr-namespace:SampleBrowser.Maui.Buttons.RadioButton"
BackgroundColor="White"
Padding="0"
WidthRequest="400">
<localCore:SampleView.Resources>
<Style x:Key="RadiobuttonNormalStyle" TargetType="button:SfRadioButton">
<Setter Property="TextColor" Value="Black"/>
<Setter Property="CheckedColor" Value="#6200EE"/>
<Setter Property="FontFamily" Value="Roboto-Regular"/>
</Style>
<Style x:Key="EntryNormalStyle" TargetType="Entry">
<Setter Property="TextColor" Value="Black"/>
<Setter Property="FontSize" Value="15"/>
<Setter Property="FontFamily" Value="Roboto-Regular"/>
</Style>
</localCore:SampleView.Resources>
<localCore:SampleView.Content>
<Grid WidthRequest="380" HorizontalOptions="Center">
<Grid.RowDefinitions>
<RowDefinition Height="150"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Border Margin="0,10" Grid.Row="0" BackgroundColor="#f6f6f8" Stroke="Gray" StrokeShape="RoundRectangle 10" StrokeThickness="0.3">
<button:SfRadioButton Grid.Row="0" x:Name="radiobutton"
WidthRequest="150"
HeightRequest="50"
TextColor="{Binding TextColor}"
Text="{Binding Text}"
HorizontalOptions="Center"
HorizontalTextAlignment="Start"
Style="{StaticResource Key=RadiobuttonNormalStyle}"
StrokeThickness="{Binding Radius,Mode=TwoWay}">
</button:SfRadioButton>
</Border>
<Border BackgroundColor="#f6f6f8" Padding="5,10" Margin="0,10" Grid.Row="1" Stroke="Gray" StrokeShape="RoundRectangle 10" StrokeThickness="0.3">
<Grid>
<ScrollView VerticalScrollBarVisibility="Never">
<StackLayout HorizontalOptions="Center" VerticalOptions="Start">
<Core:SfTextInputLayout Margin="5,10,5,0" HeightRequest="76" ContainerType="Outlined" Hint="Text">
<Entry Style="{StaticResource EntryNormalStyle}" MinimumHeightRequest="0" VerticalOptions="Center" Text="{Binding Text,Mode=TwoWay}" Placeholder="Enter the Text"/>
</Core:SfTextInputLayout>
<tabView:SfTabView
IndicatorBackground="#c6c6c6"
Margin="5,0"
TabBarBackground="White"
HorizontalOptions="Start"
VerticalOptions="Center"
HeightRequest="130">
<tabView:SfTabItem Header="Text Color"
FontFamily="Roboto-Regular"
HeightRequest="40">
<tabView:SfTabItem.FontSize>
<OnPlatform x:TypeArguments="x:Double">
<On Platform="WinUI" Value ="12"/>
<On Platform="MacCatalyst" Value="10"/>
</OnPlatform>
</tabView:SfTabItem.FontSize>
<tabView:SfTabItem.Content>
<StackLayout HorizontalOptions="CenterAndExpand" VerticalOptions="CenterAndExpand">
<HorizontalStackLayout Spacing="15">
<Button WidthRequest="40"
HeightRequest="40"
CornerRadius="20"
BackgroundColor="#E5E4E2"
Clicked="TextColorSegment_Clicked"
x:Name="TextColorSegment" >
</Button>
<Button WidthRequest="40"
HeightRequest="40"
CornerRadius="20"
BackgroundColor="#c6c6c6"
Clicked="TextColorSegment_Clicked_1"
x:Name="TextColorSegment1" >
</Button>
<Button WidthRequest="40"
HeightRequest="40"
CornerRadius="20"
BackgroundColor="#538eed"
Clicked="TextColorSegment_Clicked_2"
x:Name="TextColorSegment2" >
</Button>
<Button WidthRequest="40"
HeightRequest="40"
CornerRadius="20"
BackgroundColor="#af2463"
Clicked="TextColorSegment_Clicked_3"
x:Name="TextColorSegment3" >
</Button>
<Button WidthRequest="40"
HeightRequest="40"
CornerRadius="20"
BackgroundColor="#000000"
Clicked="TextColorSegment_Clicked_4"
x:Name="TextColorSegment4" >
</Button>
</HorizontalStackLayout>
</StackLayout>
</tabView:SfTabItem.Content>
</tabView:SfTabItem>
<tabView:SfTabItem Header="Checked Color" FontFamily="Roboto-Regular" HeightRequest="40">
<tabView:SfTabItem.FontSize>
<OnPlatform x:TypeArguments="x:Double">
<On Platform="WinUI" Value ="12"/>
<On Platform="MacCatalyst" Value="10"/>
</OnPlatform>
</tabView:SfTabItem.FontSize>
<tabView:SfTabItem.Content>
<StackLayout HorizontalOptions="CenterAndExpand" VerticalOptions="CenterAndExpand">
<HorizontalStackLayout Spacing="15">
<Button WidthRequest="40"
HeightRequest="40"
CornerRadius="20"
BackgroundColor="#E5E4E2"
Clicked="CheckedColorSegment_Clicked"
x:Name="CheckedColorSegment">
</Button>
<Button WidthRequest="40"
HeightRequest="40"
CornerRadius="20"
BackgroundColor="#c6c6c6"
Clicked="CheckedColorSegment_Clicked_1"
x:Name="CheckedColorSegment1">
</Button>
<Button WidthRequest="40"
HeightRequest="40"
CornerRadius="20"
BackgroundColor="#538eed"
Clicked="CheckedColorSegment_Clicked_2"
x:Name="CheckedColorSegment2">
</Button>
<Button WidthRequest="40"
HeightRequest="40"
CornerRadius="20"
BackgroundColor="#af2463"
Clicked="CheckedColorSegment_Clicked_3"
x:Name="CheckedColorSegment3">
</Button>
<Button WidthRequest="40"
HeightRequest="40"
CornerRadius="20"
BackgroundColor="#000000"
Clicked="CheckedColorSegment_Clicked_4"
x:Name="CheckedColorSegment4">
</Button>
</HorizontalStackLayout>
</StackLayout>
</tabView:SfTabItem.Content>
</tabView:SfTabItem>
<tabView:SfTabItem Header="Unchecked Color" FontFamily="Roboto-Regular" HeightRequest="40">
<tabView:SfTabItem.FontSize>
<OnPlatform x:TypeArguments="x:Double">
<On Platform="WinUI" Value ="12"/>
<On Platform="MacCatalyst" Value="10"/>
</OnPlatform>
</tabView:SfTabItem.FontSize>
<tabView:SfTabItem.Content>
<StackLayout HorizontalOptions="CenterAndExpand" VerticalOptions="CenterAndExpand">
<HorizontalStackLayout Spacing="15">
<Button WidthRequest="40"
HeightRequest="40"
CornerRadius="20"
BackgroundColor="#E5E4E2"
Clicked="UncheckedColorSegment_Clicked"
x:Name="UncheckedColorSegment" >
</Button>
<Button WidthRequest="40"
HeightRequest="40"
CornerRadius="20"
BackgroundColor="#c6c6c6"
Clicked="UncheckedColorSegment_Clicked_1"
x:Name="UncheckedColorSegment1" >
</Button>
<Button WidthRequest="40"
HeightRequest="40"
CornerRadius="20"
BackgroundColor="#538eed"
Clicked="UncheckedColorSegment_Clicked_2"
x:Name="UncheckedColorSegment2" >
</Button>
<Button WidthRequest="40"
HeightRequest="40"
CornerRadius="20"
BackgroundColor="#af2463"
Clicked="UncheckedColorSegment_Clicked_3"
x:Name="UncheckedColorSegment3" >
</Button>
<Button WidthRequest="40"
HeightRequest="40"
CornerRadius="20"
BackgroundColor="#000000"
Clicked="UncheckedColorSegment_Clicked_4"
x:Name="UncheckedColorSegment4" >
</Button>
</HorizontalStackLayout>
</StackLayout>
</tabView:SfTabItem.Content>
</tabView:SfTabItem>
</tabView:SfTabView>
<Label Margin="14,5,33,0" Text="Stroke Thickness" FontFamily="Roboto-Medium"/>
<Grid Margin="14,10" RowDefinitions="20">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="35"/>
</Grid.ColumnDefinitions>
<Slider x:Name="strokeThicknessSlider"
HeightRequest="50"
VerticalOptions="CenterAndExpand"
Minimum="1"
Maximum="5"
MaximumTrackColor="#E0E0E0"
MinimumTrackColor="#6200EE"
Value="{Binding Radius,Mode=TwoWay}"
ThumbColor="#6200EE">
<Slider.Margin>
<OnPlatform x:TypeArguments="Thickness">
<On Platform="WinUI" Value="0,15,0,0"/>
</OnPlatform>
</Slider.Margin>
</Slider>
<Label Text="{Binding Radius}"
Grid.Column="1"
FontFamily="Roboto-Regular"
HorizontalTextAlignment="Center" />
</Grid>
</StackLayout>
</ScrollView>
</Grid>
</Border>
</Grid>
</localCore:SampleView.Content>
</localCore:SampleView>

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

@ -0,0 +1,96 @@
#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 SampleBrowser.Maui.Base;
using SampleBrowser.Maui.Buttons.RadioButton;
namespace SampleBrowser.Maui.Buttons.RadioButton;
public partial class CustomizationsDesktop : SampleView
{
ViewModel viewModel;
public CustomizationsDesktop()
{
InitializeComponent();
viewModel = new ViewModel();
this.BindingContext = viewModel;
}
private void TextColorSegment_Clicked(object sender, EventArgs e)
{
viewModel.TextColor = Color.FromArgb("#E5E4E2");
}
private void TextColorSegment_Clicked_1(object sender, EventArgs e)
{
viewModel.TextColor = Color.FromArgb("#c6c6c6");
}
private void TextColorSegment_Clicked_2(object sender, EventArgs e)
{
viewModel.TextColor = Color.FromArgb("#538eed");
}
private void TextColorSegment_Clicked_3(object sender, EventArgs e)
{
viewModel.TextColor = Color.FromArgb("#af2463");
}
private void TextColorSegment_Clicked_4(object sender, EventArgs e)
{
viewModel.TextColor = Color.FromArgb("#000000");
}
private void CheckedColorSegment_Clicked(object sender, EventArgs e)
{
radiobutton.CheckedColor = Color.FromArgb("#E5E4E2");
}
private void CheckedColorSegment_Clicked_1(object sender, EventArgs e)
{
radiobutton.CheckedColor = Color.FromArgb("#c6c6c6");
}
private void CheckedColorSegment_Clicked_2(object sender, EventArgs e)
{
radiobutton.CheckedColor = Color.FromArgb("#538eed");
}
private void CheckedColorSegment_Clicked_3(object sender, EventArgs e)
{
radiobutton.CheckedColor = Color.FromArgb("#af2463");
}
private void CheckedColorSegment_Clicked_4(object sender, EventArgs e)
{
radiobutton.CheckedColor = Color.FromArgb("#000000");
}
private void UncheckedColorSegment_Clicked(object sender, EventArgs e)
{
radiobutton.UncheckedColor = Color.FromArgb("#E5E4E2");
}
private void UncheckedColorSegment_Clicked_1(object sender, EventArgs e)
{
radiobutton.UncheckedColor = Color.FromArgb("#c6c6c6");
}
private void UncheckedColorSegment_Clicked_2(object sender, EventArgs e)
{
radiobutton.UncheckedColor = Color.FromArgb("#538eed");
}
private void UncheckedColorSegment_Clicked_3(object sender, EventArgs e)
{
radiobutton.UncheckedColor = Color.FromArgb("#af2463");
}
private void UncheckedColorSegment_Clicked_4(object sender, EventArgs e)
{
radiobutton.UncheckedColor = Color.FromArgb("#000000");
}
}

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

@ -0,0 +1,239 @@
<?xml version="1.0" encoding="utf-8" ?>
<localCore:SampleView x:Class="SampleBrowser.Maui.Buttons.RadioButton.CustomizationsMobile"
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:localCore="clr-namespace:SampleBrowser.Maui.Base;assembly=SampleBrowser.Maui.Base"
xmlns:tabView="clr-namespace:Syncfusion.Maui.TabView;assembly=Syncfusion.Maui.TabView"
xmlns:Core="clr-namespace:Syncfusion.Maui.Core;assembly=Syncfusion.Maui.Core"
xmlns:button="clr-namespace:Syncfusion.Maui.Buttons;assembly=Syncfusion.Maui.Buttons"
xmlns:sliders="clr-namespace:Syncfusion.Maui.Sliders;assembly=Syncfusion.Maui.Sliders"
xmlns:local="clr-namespace:SampleBrowser.Maui.Buttons.RadioButton"
BackgroundColor="White">
<localCore:SampleView.Resources>
<Style x:Key="CheckBoxNormalStyle" TargetType="button:SfCheckBox">
<Setter Property="TextColor" Value="Black"/>
<Setter Property="FontSize" Value="14"/>
</Style>
<Style x:Key="EntryNormalStyle" TargetType="Entry">
<Setter Property="TextColor" Value="Black"/>
<Setter Property="FontSize" Value="15"/>
</Style>
</localCore:SampleView.Resources>
<localCore:SampleView.Content>
<Grid Padding="5" Margin="10,5,10,0">
<Grid.RowDefinitions>
<RowDefinition Height="180"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<button:SfRadioButton x:Name="radiobutton"
Grid.Row="0"
WidthRequest="150"
HeightRequest="50"
IsChecked="{Binding IsChecked}"
TextColor="{Binding TextColor}"
Text="{Binding Text}"
HorizontalOptions="Center"
HorizontalTextAlignment="Start"
FontSize="15"
FontFamily="Roboto-Regular"
StrokeThickness="{Binding Radius,Mode=TwoWay}">
</button:SfRadioButton>
<Grid Grid.Row="1" Margin="8,5,5,5">
<ScrollView>
<StackLayout Spacing="3">
<Label Text="Options" FontFamily="Roboto-Medium" FontSize="16"/>
<Core:SfTextInputLayout ContainerType="Outlined" Margin="0,10,5,0" ContainerBackground="Transparent"
Hint="Text">
<Entry TextColor="#212121" MinimumHeightRequest="0" FontFamily="Roboto-Regular"
Style="{StaticResource EntryNormalStyle}"
Placeholder="Enter the Text"
Text="{Binding Text,Mode=TwoWay}" />
</Core:SfTextInputLayout>
<StackLayout Margin="5,0,10,0" Spacing="3">
<tabView:SfTabView WidthRequest="340"
HorizontalOptions="Center"
VerticalOptions="Center"
HeightRequest="130">
<tabView:SfTabItem Header="Text Color" FontFamily="Roboto-Regular" HeightRequest="40" >
<tabView:SfTabItem.FontSize>
<OnPlatform x:TypeArguments="x:Double">
<On Platform="Android" Value ="11"/>
<On Platform="iOS" Value="10"/>
</OnPlatform>
</tabView:SfTabItem.FontSize>
<tabView:SfTabItem.Content>
<StackLayout HorizontalOptions="CenterAndExpand" Margin="0,10,0,0" >
<HorizontalStackLayout Spacing="15">
<Button WidthRequest="40"
HeightRequest="40"
CornerRadius="20"
BackgroundColor="#f2f3f4"
Clicked="TextColorSegment_Clicked"
x:Name="TextColorSegment" >
</Button>
<Button WidthRequest="40"
HeightRequest="40"
CornerRadius="20"
BackgroundColor="#c6c6c6"
Clicked="TextColorSegment_Clicked_1"
x:Name="TextColorSegment1" >
</Button>
<Button WidthRequest="40"
HeightRequest="40"
CornerRadius="20"
BackgroundColor="#538eed"
Clicked="TextColorSegment_Clicked_2"
x:Name="TextColorSegment2" >
</Button>
<Button WidthRequest="40"
HeightRequest="40"
CornerRadius="20"
BackgroundColor="#af2463"
Clicked="TextColorSegment_Clicked_3"
x:Name="TextColorSegment3" >
</Button>
<Button WidthRequest="40"
HeightRequest="40"
CornerRadius="20"
BackgroundColor="#000000"
Clicked="TextColorSegment_Clicked_4"
x:Name="TextColorSegment4" >
</Button>
</HorizontalStackLayout>
</StackLayout>
</tabView:SfTabItem.Content>
</tabView:SfTabItem>
<tabView:SfTabItem Header="Checked Color" FontFamily="Roboto-Regular" HeightRequest="40">
<tabView:SfTabItem.FontSize>
<OnPlatform x:TypeArguments="x:Double">
<On Platform="Android" Value ="11"/>
<On Platform="iOS" Value="10"/>
</OnPlatform>
</tabView:SfTabItem.FontSize>
<tabView:SfTabItem.Content>
<StackLayout HorizontalOptions="CenterAndExpand" Margin="0,10,0,0">
<HorizontalStackLayout Spacing="15">
<Button WidthRequest="40"
HeightRequest="40"
CornerRadius="20"
BackgroundColor="#f2f3f4"
Clicked="CheckedColorSegment_Clicked"
x:Name="CheckedColorSegment">
</Button>
<Button WidthRequest="40"
HeightRequest="40"
CornerRadius="20"
BackgroundColor="#c6c6c6"
Clicked="CheckedColorSegment_Clicked_1"
x:Name="CheckedColorSegment1">
</Button>
<Button WidthRequest="40"
HeightRequest="40"
CornerRadius="20"
BackgroundColor="#538eed"
Clicked="CheckedColorSegment_Clicked_2"
x:Name="CheckedColorSegment2">
</Button>
<Button WidthRequest="40"
HeightRequest="40"
CornerRadius="20"
BackgroundColor="#af2463"
Clicked="CheckedColorSegment_Clicked_3"
x:Name="CheckedColorSegment3">
</Button>
<Button WidthRequest="40"
HeightRequest="40"
CornerRadius="20"
BackgroundColor="#000000"
Clicked="CheckedColorSegment_Clicked_4"
x:Name="CheckedColorSegment4">
</Button>
</HorizontalStackLayout>
</StackLayout>
</tabView:SfTabItem.Content>
</tabView:SfTabItem>
<tabView:SfTabItem Header="UnChecked Color" FontFamily="Roboto-Regular" HeightRequest="40">
<tabView:SfTabItem.FontSize>
<OnPlatform x:TypeArguments="x:Double">
<On Platform="Android" Value ="11"/>
<On Platform="iOS" Value="10"/>
</OnPlatform>
</tabView:SfTabItem.FontSize>
<tabView:SfTabItem.Content>
<StackLayout HorizontalOptions="CenterAndExpand" Margin="0,10,0,0">
<HorizontalStackLayout Spacing="15">
<Button WidthRequest="40"
HeightRequest="40"
CornerRadius="20"
BackgroundColor="#f2f3f4"
Clicked="UnCheckedColorSegment_Clicked"
x:Name="UnCheckedColorSegment" >
</Button>
<Button WidthRequest="40"
HeightRequest="40"
CornerRadius="20"
BackgroundColor="#c6c6c6"
Clicked="UnCheckedColorSegment_Clicked_1"
x:Name="UnCheckedColorSegment1" >
</Button>
<Button WidthRequest="40"
HeightRequest="40"
CornerRadius="20"
BackgroundColor="#538eed"
Clicked="UnCheckedColorSegment_Clicked_2"
x:Name="UnCheckedColorSegment2" >
</Button>
<Button WidthRequest="40"
HeightRequest="40"
CornerRadius="20"
BackgroundColor="#af2463"
Clicked="UnCheckedColorSegment_Clicked_3"
x:Name="UnCheckedColorSegment3" >
</Button>
<Button WidthRequest="40"
HeightRequest="40"
CornerRadius="20"
BackgroundColor="#000000"
Clicked="UnCheckedColorSegment_Clicked_4"
x:Name="UnCheckedColorSegment4" >
</Button>
</HorizontalStackLayout>
</StackLayout>
</tabView:SfTabItem.Content>
</tabView:SfTabItem>
</tabView:SfTabView>
</StackLayout>
<Label Text="Stroke Thickness" FontFamily="Roboto-Medium" Margin="0,0,5,0"/>
<StackLayout>
<Grid RowDefinitions="40" Margin="0,5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="45"/>
</Grid.ColumnDefinitions>
<Slider x:Name="radiusSlider"
HeightRequest="50"
VerticalOptions="CenterAndExpand"
Minimum="1"
Maximum="5"
MaximumTrackColor="#E0E0E0"
MinimumTrackColor="#4285F4"
Value="{Binding Radius,Mode=TwoWay}"
ThumbColor="#4285F4">
</Slider>
<Label Text="{Binding Radius}"
Grid.Column="1"
FontFamily="Roboto-Regular"
HorizontalTextAlignment="Center"
VerticalTextAlignment="Center" />
</Grid>
</StackLayout>
</StackLayout>
</ScrollView>
</Grid>
</Grid>
</localCore:SampleView.Content>
</localCore:SampleView>

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

@ -0,0 +1,98 @@
#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 Microsoft.Maui.Controls;
using SampleBrowser.Maui.Base;
using SampleBrowser.Maui.Buttons.RadioButton;
namespace SampleBrowser.Maui.Buttons.RadioButton;
public partial class CustomizationsMobile : SampleView
{
ViewModel viewModel;
public CustomizationsMobile()
{
InitializeComponent();
viewModel = new ViewModel();
this.BindingContext = viewModel;
}
private void TextColorSegment_Clicked(object sender, EventArgs e)
{
viewModel.TextColor = Color.FromArgb("#E5E4E2");
}
private void TextColorSegment_Clicked_1(object sender, EventArgs e)
{
viewModel.TextColor = Color.FromArgb("#c6c6c6");
}
private void TextColorSegment_Clicked_2(object sender, EventArgs e)
{
viewModel.TextColor = Color.FromArgb("#538eed");
}
private void TextColorSegment_Clicked_3(object sender, EventArgs e)
{
viewModel.TextColor = Color.FromArgb("#af2463");
}
private void TextColorSegment_Clicked_4(object sender, EventArgs e)
{
viewModel.TextColor = Color.FromArgb("#000000");
}
private void CheckedColorSegment_Clicked(object sender, EventArgs e)
{
radiobutton.CheckedColor = Color.FromArgb("#E5E4E2");
}
private void CheckedColorSegment_Clicked_1(object sender, EventArgs e)
{
radiobutton.CheckedColor = Color.FromArgb("#c6c6c6");
}
private void CheckedColorSegment_Clicked_2(object sender, EventArgs e)
{
radiobutton.CheckedColor = Color.FromArgb("#538eed");
}
private void CheckedColorSegment_Clicked_3(object sender, EventArgs e)
{
radiobutton.CheckedColor = Color.FromArgb("#af2463");
}
private void CheckedColorSegment_Clicked_4(object sender, EventArgs e)
{
radiobutton.CheckedColor = Color.FromArgb("#000000");
}
private void UnCheckedColorSegment_Clicked(object sender, EventArgs e)
{
radiobutton.UncheckedColor = Color.FromArgb("#E5E4E2");
}
private void UnCheckedColorSegment_Clicked_1(object sender, EventArgs e)
{
radiobutton.UncheckedColor = Color.FromArgb("#c6c6c6");
}
private void UnCheckedColorSegment_Clicked_2(object sender, EventArgs e)
{
radiobutton.UncheckedColor = Color.FromArgb("#538eed");
}
private void UnCheckedColorSegment_Clicked_3(object sender, EventArgs e)
{
radiobutton.UncheckedColor = Color.FromArgb("#af2463");
}
private void UnCheckedColorSegment_Clicked_4(object sender, EventArgs e)
{
radiobutton.UncheckedColor = Color.FromArgb("#000000");
}
}

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

@ -0,0 +1,132 @@
#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 Syncfusion.Maui.Buttons;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;
using SampleBrowser.Maui.Base.Converters;
using System.Reflection;
namespace SampleBrowser.Maui.Buttons.RadioButton;
public class ViewModel : INotifyPropertyChanged
{
#region Fields
/// <summary>
/// Represents the text color
/// </summary>
private Color textColor = Colors.Black;
/// <summary>
/// Represents the border width
/// </summary>
private int radius = 2;
/// <summary>
/// The text of button.
/// </summary>
private string text = "RadioButton";
/// <summary>
/// The can show background image
/// </summary>
private bool ischecked = false;
#endregion
#region Property
/// <summary>
/// Gets or Sets the text color
/// </summary>
public Color TextColor
{
get
{
return textColor;
}
set
{
textColor = value;
OnPropertyChanged("TextColor");
}
}
/// <summary>
/// Gets or sets the border width.
/// </summary>
public int Radius
{
get
{
return radius;
}
set
{
radius = value;
OnPropertyChanged("Radius");
}
}
/// <summary>
/// Gets or sets the text.
/// </summary>
/// <value>The text.</value>
public string Text
{
get
{
return text;
}
set
{
text = value;
OnPropertyChanged("Text");
}
}
/// <summary>
/// Gets or sets a value indicating whether this <see cref="T:button.buttonViewModel"/> is enable stack.
/// </summary>
/// <value><c>true</c> if is enable stack; otherwise, <c>false</c>.</value>
public bool IsChecked
{
get
{
return ischecked;
}
set
{
ischecked = value;
OnPropertyChanged("IsChecked");
}
}
#endregion
#region Property changed method
/// <summary>
/// Occurs when property changed.
/// </summary>
public event PropertyChangedEventHandler? PropertyChanged;
public void OnPropertyChanged([CallerMemberName] string? name = null) =>
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(name));
#endregion
}

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

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?>
<localcore:SampleView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="SampleBrowser.Maui.Buttons.RadioButton.GettingStarted"
xmlns:localcore="clr-namespace:SampleBrowser.Maui.Base;assembly=SampleBrowser.Maui.Base">
</localcore:SampleView>

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

@ -0,0 +1,33 @@
#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 SampleBrowser.Maui.Base;
namespace SampleBrowser.Maui.Buttons.RadioButton;
public partial class GettingStarted : SampleView
{
#if ANDROID || IOS
GettingStartedMobile gettingStartedMobile;
#else
GettingStartedDesktop gettingStartedDesktop;
#endif
public GettingStarted()
{
InitializeComponent();
#if ANDROID || IOS
gettingStartedMobile = new GettingStartedMobile();
this.Content = gettingStartedMobile.Content;
this.OptionView = gettingStartedMobile.OptionView;
#else
gettingStartedDesktop = new GettingStartedDesktop();
this.Content = gettingStartedDesktop.Content;
this.OptionView = gettingStartedDesktop.OptionView;
this.WidthRequest = gettingStartedDesktop.WidthRequest;
#endif
}
}

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

@ -0,0 +1,146 @@
<?xml version="1.0" encoding="utf-8" ?>
<localcore:SampleView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="SampleBrowser.Maui.Buttons.RadioButton.GettingStartedDesktop"
xmlns:localcore="clr-namespace:SampleBrowser.Maui.Base;assembly=SampleBrowser.Maui.Base"
xmlns:core="clr-namespace:Syncfusion.Maui.Core;assembly=Syncfusion.Maui.Core"
xmlns:syncfusion="clr-namespace:Syncfusion.Maui.Buttons;assembly=Syncfusion.Maui.Buttons"
xmlns:thickness ="clr-namespace:Microsoft.Maui;assembly=Microsoft.Maui"
xmlns:imageExtension="clr-namespace:SampleBrowser.Maui.Base.Converters;assembly=SampleBrowser.Maui.Base">
<localcore:SampleView.Resources>
<syncfusion:SfRadioGroupKey x:Key="payment mode" CheckedChanged="SfRadioGroupKey_CheckedChanged"/>
<syncfusion:SfRadioGroupKey x:Key="plan mode" CheckedChanged="SfRadioGroupKey_CheckedChanged"/>
<ResourceDictionary>
<Style TargetType="Label">
<Setter Property="FontFamily" Value="Roboto-Regular"/>
</Style>
<Style TargetType="syncfusion:SfRadioButton">
<Setter Property="CheckedColor" Value="#6200EE"/>
<Setter Property="FontFamily" Value="Roboto-Regular"/>
</Style>
<Style TargetType="syncfusion:SfButton" x:Key="buttonState">
<Setter Property="FontFamily" Value="Roboto-Regular"/>
<Setter Property="VisualStateManager.VisualStateGroups">
<VisualStateGroupList>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal">
<VisualState.Setters>
<Setter Property="Background" Value="#6200EE"/>
<Setter Property="TextColor" Value="White"/>
</VisualState.Setters>
</VisualState>
<VisualState x:Name="Disabled">
<VisualState.Setters>
<Setter Property="Background" Value="#C8C8C8"/>
</VisualState.Setters>
</VisualState>
</VisualStateGroup>
</VisualStateGroupList>
</Setter>
</Style>
</ResourceDictionary>
</localcore:SampleView.Resources>
<localcore:SampleView.Content>
<Grid ColumnDefinitions="*,*" Background="#F5F5F5" Margin="-7">
<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 Grid.Row="0"/>
<Frame Grid.Row="1" HasShadow="False" CornerRadius="10" Grid.Column="1" Padding="10,0" VerticalOptions="FillAndExpand" HorizontalOptions="Center" Margin="-25">
<ScrollView>
<Grid RowDefinitions="60,60,60,60,60,60,60,60,Auto">
<Grid>
<Button HeightRequest="30" BackgroundColor="#6200EE" CornerRadius="15" Margin="10,0" HorizontalOptions="Start" WidthRequest="30"/>
<Label Text="1" Margin="22,0,0,0" VerticalOptions="Center" TextColor="White"/>
<Label Margin="50,20,0,20" Text="Select Payment Method"/>
</Grid>
<Frame HasShadow="False" Margin="5" Padding="0,5" Grid.Row="1" BorderColor="LightGray" CornerRadius="10">
<Grid ColumnDefinitions="50,*">
<syncfusion:SfRadioButton x:Name="masterCard" StateChanged="MasterCard_StateChanged" GroupKey="{StaticResource payment mode}"/>
<StackLayout Grid.Column="1" VerticalOptions="Center">
<Label HorizontalOptions="Start" Text="MasterCard">
<Label.GestureRecognizers>
<TapGestureRecognizer Tapped="TapGestureRecognizer_Tapped"/>
</Label.GestureRecognizers>
</Label>
<Label HorizontalOptions="Start" FontFamily="Roboto-Regular" VerticalOptions="Center" FontSize="10" TextColor="Black" Text="**** **** **** 4897 | Alexandria">
<Label.GestureRecognizers>
<TapGestureRecognizer Tapped="TapGestureRecognizer_Tapped"/>
</Label.GestureRecognizers>
</Label>
</StackLayout>
</Grid>
</Frame>
<Frame HasShadow="False" Margin="5" Padding="0,5" Grid.Row="2" CornerRadius="10" BorderColor="LightGray">
<Grid ColumnDefinitions="50,*">
<syncfusion:SfRadioButton x:Name="visa" StateChanged="Visa_StateChanged" GroupKey="{StaticResource payment mode}"/>
<StackLayout VerticalOptions="Center" Grid.Column="1">
<Label HorizontalOptions="Start" Text="Visa">
<Label.GestureRecognizers>
<TapGestureRecognizer Tapped="TapGestureRecognizer_Tapped_1"/>
</Label.GestureRecognizers>
</Label>
<Label HorizontalOptions="Start" FontFamily="Roboto-Regular" VerticalOptions="Center" FontSize="10" TextColor="Black" Text="**** **** **** 4897 | Alexandria">
<Label.GestureRecognizers>
<TapGestureRecognizer Tapped="TapGestureRecognizer_Tapped_1"/>
</Label.GestureRecognizers>
</Label>
</StackLayout>
</Grid>
</Frame>
<Frame HasShadow="False" Margin="5" Padding="0,5" Grid.Row="3" CornerRadius="10" BorderColor="LightGray">
<Grid ColumnDefinitions="50,*">
<syncfusion:SfRadioButton x:Name="payDirect" StateChanged="PayDirect_StateChanged" GroupKey="{StaticResource payment mode}"/>
<StackLayout Grid.Column="1" VerticalOptions="Center">
<Label HorizontalOptions="Start" Text="Pay On Delivery">
<Label.GestureRecognizers>
<TapGestureRecognizer Tapped="TapGestureRecognizer_Tapped_2"/>
</Label.GestureRecognizers>
</Label>
</StackLayout>
</Grid>
</Frame>
<Grid Grid.Row="4">
<Button HeightRequest="30" BackgroundColor="#6200EE" CornerRadius="15" Margin="10,0" HorizontalOptions="Start" WidthRequest="30"/>
<Label Text="2" Margin="22,0,0,0" VerticalOptions="Center" TextColor="White"/>
<Label Margin="50,20,0,20" Grid.Row="4" Text="Choose EMI Plan"/>
</Grid>
<Frame HasShadow="False" Margin="5" Padding="0,5" Grid.Row="5" CornerRadius="10" BorderColor="LightGray">
<Grid ColumnDefinitions="*">
<syncfusion:SfRadioButton x:Name="noCost" Text="$6,66 x 3 months | No Cost | Total Cost: $39,99" GroupKey="{StaticResource plan mode}"/>
</Grid>
</Frame>
<Frame HasShadow="False" Margin="5" Padding="0,5" Grid.Row="6" CornerRadius="10" BorderColor="LightGray">
<Grid ColumnDefinitions="*">
<syncfusion:SfRadioButton x:Name="nineMonths" Text="$4,74 x 6 months | 15.99% pa | Total Cost: $42,71" GroupKey="{StaticResource plan mode}"/>
</Grid>
</Frame>
<Frame HasShadow="False" Margin="5" Padding="0,5" Grid.Row="7" CornerRadius="10" BorderColor="LightGray">
<Grid ColumnDefinitions="*">
<syncfusion:SfRadioButton x:Name="twelveMonths" Text="$3,62 x 9 months | 15.99% pa | Total Cost: $43,11" GroupKey="{StaticResource plan mode}"/>
</Grid>
</Frame>
<syncfusion:SfButton x:Name="button" HeightRequest="40" Grid.Row="8" Style="{StaticResource buttonState}" Text="Pay Now" IsEnabled="False" Clicked="Button_Clicked">
<syncfusion:SfButton.Margin>
<OnPlatform x:TypeArguments="thickness:Thickness">
<On Platform="MacCatalyst" Value="5,45,5,0"/>
<On Platform="WinUI" Value="5,5,5,0"/>
</OnPlatform>
</syncfusion:SfButton.Margin>
</syncfusion:SfButton>
</Grid>
</ScrollView>
</Frame>
</Grid>
</Grid>
</localcore:SampleView.Content>
</localcore:SampleView>

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

@ -0,0 +1,83 @@
#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 SampleBrowser.Maui.Base;
using System.Diagnostics;
namespace SampleBrowser.Maui.Buttons.RadioButton;
public partial class GettingStartedDesktop:SampleView
{
public GettingStartedDesktop()
{
InitializeComponent();
}
private void SfRadioGroupKey_CheckedChanged(object sender, Syncfusion.Maui.Buttons.CheckedChangedEventArgs e)
{
button.IsEnabled = true;
}
private void Button_Clicked(object sender, EventArgs e)
{
masterCard.IsChecked = false;
visa.IsChecked = false;
payDirect.IsChecked = false;
noCost.IsChecked = false;
nineMonths.IsChecked = false;
twelveMonths.IsChecked = false;
button.IsEnabled = false;
}
private void PayDirect_StateChanged(object sender, Syncfusion.Maui.Buttons.StateChangedEventArgs e)
{
if (e.IsChecked == true)
{
noCost.IsEnabled = false;
nineMonths.IsEnabled = false;
twelveMonths.IsEnabled = false;
noCost.IsChecked = false;
nineMonths.IsChecked = false;
twelveMonths.IsChecked = false;
}
}
private void Visa_StateChanged(object sender, Syncfusion.Maui.Buttons.StateChangedEventArgs e)
{
if (e.IsChecked == true)
{
noCost.IsEnabled = true;
nineMonths.IsEnabled = true;
twelveMonths.IsEnabled = true;
}
}
private void MasterCard_StateChanged(object sender, Syncfusion.Maui.Buttons.StateChangedEventArgs e)
{
if (e.IsChecked == true)
{
noCost.IsEnabled = true;
nineMonths.IsEnabled = true;
twelveMonths.IsEnabled = true;
}
}
private void TapGestureRecognizer_Tapped(object sender, EventArgs e)
{
masterCard.IsChecked = true;
}
private void TapGestureRecognizer_Tapped_1(object sender, EventArgs e)
{
visa.IsChecked = true;
}
private void TapGestureRecognizer_Tapped_2(object sender, EventArgs e)
{
payDirect.IsChecked = true;
}
}

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

@ -0,0 +1,128 @@
<?xml version="1.0" encoding="utf-8" ?>
<localcore:SampleView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="SampleBrowser.Maui.Buttons.RadioButton.GettingStartedMobile"
xmlns:localcore="clr-namespace:SampleBrowser.Maui.Base;assembly=SampleBrowser.Maui.Base"
xmlns:core="clr-namespace:Syncfusion.Maui.Core;assembly=Syncfusion.Maui.Core"
xmlns:syncfusion="clr-namespace:Syncfusion.Maui.Buttons;assembly=Syncfusion.Maui.Buttons">
<localcore:SampleView.Resources>
<syncfusion:SfRadioGroupKey x:Key="payment mode" CheckedChanged="SfRadioGroupKey_CheckedChanged"/>
<ResourceDictionary>
<Style TargetType="Label">
<Setter Property="FontFamily" Value="Roboto-Regular"/>
</Style>
<Style TargetType="syncfusion:SfRadioButton">
<Setter Property="CheckedColor" Value="#6200EE"/>
<Setter Property="FontFamily" Value="Roboto-Regular"/>
</Style>
<Style TargetType="syncfusion:SfButton" x:Key="buttonState">
<Setter Property="VisualStateManager.VisualStateGroups">
<VisualStateGroupList>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal">
<VisualState.Setters>
<Setter Property="Background" Value="#6200EE"/>
<Setter Property="TextColor" Value="White"/>
</VisualState.Setters>
</VisualState>
<VisualState x:Name="Disabled">
<VisualState.Setters>
<Setter Property="Background" Value="#C8C8C8"/>
</VisualState.Setters>
</VisualState>
</VisualStateGroup>
</VisualStateGroupList>
</Setter>
</Style>
</ResourceDictionary>
</localcore:SampleView.Resources>
<localcore:SampleView.Content>
<Grid RowDefinitions="*,100">
<ScrollView>
<StackLayout Spacing="15">
<Label x:Name="paymentmodelbl" Text="Payment methods" Margin="10,5" FontAttributes="Bold" HorizontalOptions="Start" FontSize="Medium"/>
<Label Text="CREDIT AND DEBIT CARDS" FontSize="14" Margin="10" FontAttributes="Bold" TextColor="#555555" FontFamily="Roboto-Regular"/>
<Frame CornerRadius="10" Padding="5" HasShadow="False" BorderColor="LightGray" Margin="10,0">
<Grid ColumnDefinitions="40,*">
<syncfusion:SfRadioButton VerticalOptions="Start" x:Name="bankDebitCard" GroupKey="{StaticResource payment mode}"/>
<StackLayout Grid.Column="1" VerticalOptions="Center">
<Label HorizontalOptions="Start" Text="XXXX Bank Debit Card">
<Label.GestureRecognizers>
<TapGestureRecognizer Tapped="TapGestureRecognizer_Tapped_3"/>
</Label.GestureRecognizers>
</Label>
<Label HorizontalOptions="Start" FontAttributes="Bold" FontSize="10" TextColor="Black" Text="**5028 | Aaron">
<Label.GestureRecognizers>
<TapGestureRecognizer Tapped="TapGestureRecognizer_Tapped_3"/>
</Label.GestureRecognizers>
</Label>
</StackLayout>
</Grid>
</Frame>
<Frame CornerRadius="10" Padding="5" HasShadow="False" BorderColor="LightGray" Margin="10,0">
<Grid ColumnDefinitions="40,*">
<syncfusion:SfRadioButton VerticalOptions="Start" x:Name="bankCreditCard" GroupKey="{StaticResource payment mode}"/>
<StackLayout Grid.Column="1" VerticalOptions="Center">
<Label HorizontalOptions="Start" Text="XXXX Bank Credit Card">
<Label.GestureRecognizers>
<TapGestureRecognizer Tapped="TapGestureRecognizer_Tapped_1"/>
</Label.GestureRecognizers>
</Label>
<Label HorizontalOptions="Start" FontAttributes="Bold" FontSize="10" TextColor="Black" Text="**5028 | Aaron">
<Label.GestureRecognizers>
<TapGestureRecognizer Tapped="TapGestureRecognizer_Tapped_1"/>
</Label.GestureRecognizers>
</Label>
</StackLayout>
</Grid>
</Frame>
<Frame CornerRadius="10" Padding="5" HasShadow="False" BorderColor="LightGray" Margin="10,0">
<Grid ColumnDefinitions="40,*">
<syncfusion:SfRadioButton VerticalOptions="Start" x:Name="creditCard" GroupKey="{StaticResource payment mode}"/>
<StackLayout Grid.Column="1" VerticalOptions="Center">
<Label HorizontalOptions="Start" Text="XXXX Credit Card">
<Label.GestureRecognizers>
<TapGestureRecognizer Tapped="TapGestureRecognizer_Tapped_2"/>
</Label.GestureRecognizers>
</Label>
<Label HorizontalOptions="Start" FontAttributes="Bold" FontSize="10" TextColor="Black" Text="**0859 | Stephan">
<Label.GestureRecognizers>
<TapGestureRecognizer Tapped="TapGestureRecognizer_Tapped_2"/>
</Label.GestureRecognizers>
</Label>
</StackLayout>
</Grid>
</Frame>
<Label Text="MORE WAYS TO PAY" FontSize="14" Margin="10,25,10,10" FontAttributes="Bold" TextColor="#555555" FontFamily="Roboto-Regular"/>
<Frame CornerRadius="10" Padding="5" HasShadow="False" BorderColor="LightGray" Margin="10,0">
<syncfusion:SfRadioButton x:Name="debitOrCreditCard" Text="Debit or Credit Card" FontAttributes="Bold" FontFamily="Roboto-Regular" GroupKey="{StaticResource payment mode}"/>
</Frame>
<Frame CornerRadius="10" Padding="5" HasShadow="False" BorderColor="LightGray" Margin="10,0">
<syncfusion:SfRadioButton x:Name="netBanking" Text="Net Banking" FontFamily="Roboto-Regular" FontAttributes="Bold" GroupKey="{StaticResource payment mode}"/>
</Frame>
<Frame CornerRadius="10" Padding="5" HasShadow="False" BorderColor="LightGray" Margin="10,0">
<HorizontalStackLayout>
<syncfusion:SfRadioButton x:Name="cashButton" GroupKey="{StaticResource payment mode}"/>
<StackLayout>
<Label Text="Cash on Delivery / Pay on Delivery" FontFamily="Roboto-Regular" FontAttributes="Bold">
<Label.GestureRecognizers>
<TapGestureRecognizer Tapped="TapGestureRecognizer_Tapped"/>
</Label.GestureRecognizers>
</Label>
<Label Text="Cash, UPI and Cards accepted" FontFamily="Roboto-Regular">
<Label.GestureRecognizers>
<TapGestureRecognizer Tapped="TapGestureRecognizer_Tapped"/>
</Label.GestureRecognizers>
</Label>
</StackLayout>
</HorizontalStackLayout>
</Frame>
</StackLayout>
</ScrollView>
<syncfusion:SfButton Grid.Row="1" x:Name="button" HeightRequest="40" Margin="10,0" VerticalOptions="Center" IsEnabled="False" Text="Pay Now" Style="{StaticResource buttonState}" Clicked="Button_Clicked"/>
</Grid>
</localcore:SampleView.Content>
</localcore:SampleView>

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