This commit is contained in:
saiyathalifathimabee.m@syncfusion.com 2024-04-02 20:20:54 +05:30
Родитель 8fcc494874 093fe4f363
Коммит 940ff575cc
1238 изменённых файлов: 31371 добавлений и 8050 удалений

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

@ -2,12 +2,14 @@
<Application xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:SampleBrowser.Maui.Accordion"
x:Class="SampleBrowser.Maui.Accordion.App">
xmlns:base ="clr-namespace:SampleBrowser.Maui.Base;assembly=SampleBrowser.Maui.Base"
x:Class="SampleBrowser.Maui.Accordion.App"
xmlns:theme="clr-namespace:Syncfusion.Maui.Themes;assembly=Syncfusion.Maui.Core">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Resources/Styles/Colors.xaml" />
<ResourceDictionary Source="Resources/Styles/Styles.xaml" />
<base:SampleBrowserStyles/>
<theme:SyncfusionThemeResourceDictionary/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>

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

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

@ -4,7 +4,7 @@
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml">
<Style TargetType="ActivityIndicator">
<!--<Style TargetType="ActivityIndicator">
<Setter Property="Color" Value="{AppThemeBinding Light={StaticResource Primary}, Dark={StaticResource White}}" />
</Style>
@ -400,6 +400,6 @@
<Setter Property="BarTextColor" Value="{AppThemeBinding Light={StaticResource Primary}, Dark={StaticResource White}}" />
<Setter Property="UnselectedTabColor" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource Gray950}}" />
<Setter Property="SelectedTabColor" Value="{AppThemeBinding Light={StaticResource Gray950}, Dark={StaticResource Gray200}}" />
</Style>
</Style>-->
</ResourceDictionary>

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

@ -79,7 +79,6 @@
<ItemGroup>
<None Remove="Resources\Fonts\Roboto-Medium.ttf" />
<None Remove="Resources\Fonts\Roboto-Regular.ttf" />
<None Remove="Resources\Fonts\AccordionFontIcons.ttf" />
</ItemGroup>
<ItemGroup>
@ -89,10 +88,11 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Syncfusion.Maui.Core" version="24.2.3" />
<PackageReference Include="Syncfusion.Maui.Expander" version="24.2.3" />
<PackageReference Include="Syncfusion.Maui.TabView" version="24.2.3" />
<PackageReference Include="SampleBrowser.Maui.Base" version="24.2.3" />
<PackageReference Include="Syncfusion.Maui.Buttons" version="25.1.35" />
<PackageReference Include="Syncfusion.Maui.Core" version="25.1.35" />
<PackageReference Include="Syncfusion.Maui.Expander" version="25.1.35" />
<PackageReference Include="Syncfusion.Maui.TabView" version="25.1.35" />
<PackageReference Include="SampleBrowser.Maui.Base" version="25.1.35" />
</ItemGroup>
</Project>

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

@ -6,8 +6,7 @@
xmlns:imageExtension="clr-namespace:SampleBrowser.Maui.Base.Converters;assembly=SampleBrowser.Maui.Base"
xmlns:localCore="clr-namespace:SampleBrowser.Maui.Base;assembly=SampleBrowser.Maui.Base"
xmlns:syncfusion="clr-namespace:Syncfusion.Maui.Accordion;assembly=Syncfusion.Maui.Expander"
xmlns:thickness ="clr-namespace:Microsoft.Maui;assembly=Microsoft.Maui"
Background="White">
xmlns:thickness ="clr-namespace:Microsoft.Maui;assembly=Microsoft.Maui">
<localCore:SampleView.Resources>
<imageExtension:SfImageSourceConverter x:Key="imageconverter"/>
</localCore:SampleView.Resources>
@ -22,28 +21,6 @@
</localCore:SampleView.Margin>
<localCore:SampleView.Content>
<Grid ColumnDefinitions="0.4*, 0.6*">
<Grid.Resources>
<Style TargetType="syncfusion:AccordionItem">
<Setter Property="VisualStateManager.VisualStateGroups">
<VisualStateGroupList>
<VisualStateGroup>
<VisualState Name="Expanded">
<VisualState.Setters>
<Setter Property="HeaderBackground" Value="#1F1C1B1F"/>
<Setter Property="HeaderIconColor" Value="#49454F"/>
</VisualState.Setters>
</VisualState>
<VisualState Name="Collapsed">
<VisualState.Setters>
<Setter Property="HeaderBackground" Value="Transparent"/>
<Setter Property="HeaderIconColor" Value="#49454F"/>
</VisualState.Setters>
</VisualState>
</VisualStateGroup>
</VisualStateGroupList>
</Setter>
</Style>
</Grid.Resources>
<Grid IsClippedToBounds="True" IsVisible="{OnPlatform MacCatalyst=True, WinUI=True, Default=False}"
RowDefinitions="0.3*,100,50,*">
<Image Source="{imageExtension:SfImageResource registrationform.png}" Aspect="AspectFill" Grid.RowSpan="4"/>
@ -68,13 +45,8 @@
</Grid>
</syncfusion:AccordionItem.Header>
<syncfusion:AccordionItem.Content>
<Grid ColumnSpacing="10" RowSpacing="2" BackgroundColor="#f4f4f4" >
<Grid ColumnSpacing="10" RowSpacing="2" BackgroundColor="{AppThemeBinding Light=#F4F4F4, Dark=#14E6E1E5}">
<Grid Margin="16,6,0,0">
<Grid.Resources>
<Style TargetType="Label">
<Setter Property="FontFamily" Value="Roboto-Regular"/>
</Style>
</Grid.Resources>
<Grid.RowDefinitions >
<RowDefinition Height="25"/>
<RowDefinition Height="25"/>
@ -88,28 +60,28 @@
<ColumnDefinition Width="100"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Frame Grid.RowSpan="4" BorderColor="Transparent" Grid.Row="0" Grid.Column="0" HasShadow="False" Padding="0" Margin="0,0,0,7">
<Frame Grid.RowSpan="4" Grid.Row="0" Grid.Column="0" HasShadow="False" Padding="0" Margin="0,0,0,7" BackgroundColor="{StaticResource White}">
<Image Source="{Binding Image,Converter={StaticResource imageconverter}}"/>
</Frame>
<Label Text="Position" Grid.Column="1" Grid.Row="0" Margin='{OnPlatform Default="6,0,0,0",MacCatalyst="12,0,0,0"}'/>
<Label Text="{Binding Position}" Grid.Row="0" Grid.Column="2" Margin='{OnPlatform MacCatalyst="6,0,0,0"}'/>
<Label Text="Organization " Grid.Row="1" Grid.Column="1" Margin='{OnPlatform Default="6,0,0,0",MacCatalyst="12,0,0,0"}'/>
<Label Text="{Binding OrganizationUnit}" Grid.Row="1" Grid.Column="2" Margin='{OnPlatform MacCatalyst="6,0,0,0"}'/>
<Label Text="Date Of Birth " Grid.Row="2" Grid.Column="1" Margin='{OnPlatform Default="6,0,0,0",MacCatalyst="12,0,0,0"}'/>
<Label Text="{Binding DateOfBirth}" Grid.Row="2" Grid.Column="2" Margin='{OnPlatform MacCatalyst="6,0,0,0"}'/>
<Label Text="Location " Grid.Row="3" Grid.Column="1" Margin='{OnPlatform Default="6,0,0,0",MacCatalyst="12,0,0,0"}'/>
<Label Text="{Binding Location}" Grid.Row="3" Grid.Column="2" Margin='{OnPlatform MacCatalyst="6,0,0,0"}'/>
<Label TextColor="{AppThemeBinding Light={StaticResource TileTextColourAlt1Light}, Dark={StaticResource TileTextColourAlt1}}" FontFamily="Roboto-Regular" Text="Position" Grid.Column="1" Grid.Row="0" Margin='{OnPlatform Default="6,0,0,0",MacCatalyst="12,0,0,0"}'/>
<Label TextColor="{AppThemeBinding Light={StaticResource TileTextColourAlt1Light}, Dark={StaticResource TileTextColourAlt1}}" FontFamily="Roboto-Regular" Text="{Binding Position}" Grid.Row="0" Grid.Column="2" Margin='{OnPlatform MacCatalyst="6,0,0,0"}'/>
<Label TextColor="{AppThemeBinding Light={StaticResource TileTextColourAlt1Light}, Dark={StaticResource TileTextColourAlt1}}" FontFamily="Roboto-Regular" Text="Organization " Grid.Row="1" Grid.Column="1" Margin='{OnPlatform Default="6,0,0,0",MacCatalyst="12,0,0,0"}'/>
<Label TextColor="{AppThemeBinding Light={StaticResource TileTextColourAlt1Light}, Dark={StaticResource TileTextColourAlt1}}" FontFamily="Roboto-Regular" Text="{Binding OrganizationUnit}" Grid.Row="1" Grid.Column="2" Margin='{OnPlatform MacCatalyst="6,0,0,0"}'/>
<Label TextColor="{AppThemeBinding Light={StaticResource TileTextColourAlt1Light}, Dark={StaticResource TileTextColourAlt1}}" FontFamily="Roboto-Regular" Text="Date Of Birth " Grid.Row="2" Grid.Column="1" Margin='{OnPlatform Default="6,0,0,0",MacCatalyst="12,0,0,0"}'/>
<Label TextColor="{AppThemeBinding Light={StaticResource TileTextColourAlt1Light}, Dark={StaticResource TileTextColourAlt1}}" FontFamily="Roboto-Regular" Text="{Binding DateOfBirth}" Grid.Row="2" Grid.Column="2" Margin='{OnPlatform MacCatalyst="6,0,0,0"}'/>
<Label TextColor="{AppThemeBinding Light={StaticResource TileTextColourAlt1Light}, Dark={StaticResource TileTextColourAlt1}}" FontFamily="Roboto-Regular" Text="Location " Grid.Row="3" Grid.Column="1" Margin='{OnPlatform Default="6,0,0,0",MacCatalyst="12,0,0,0"}'/>
<Label TextColor="{AppThemeBinding Light={StaticResource TileTextColourAlt1Light}, Dark={StaticResource TileTextColourAlt1}}" FontFamily="Roboto-Regular" Text="{Binding Location}" Grid.Row="3" Grid.Column="2" Margin='{OnPlatform MacCatalyst="6,0,0,0"}'/>
<Label Padding="0,10,0,10" Grid.Row="4" Grid.ColumnSpan="3" LineBreakMode="WordWrap"
FontSize="14" CharacterSpacing="0.25" VerticalTextAlignment="Center"
FontSize="14" CharacterSpacing="0.25" VerticalTextAlignment="Center" TextColor="{AppThemeBinding Light={StaticResource TileTextColourAlt1Light}, Dark={StaticResource TileTextColourAlt1}}"
Text="{Binding Description}">
</Label>
<StackLayout Grid.Row="5" Orientation="Horizontal" Margin="0,0,0,12">
<Label Text="&#xe700;" FontSize="16" Margin="0,2,2,2"
FontFamily='{OnPlatform Android=AccordionFontIcons.ttf#,WinUI=AccordionFontIcons.ttf#AccordionFontIcons,MacCatalyst=AccordionFontIcons,iOS=AccordionFontIcons}'
<Label Text="&#xe763;" FontSize="16" Margin="0,2,2,2"
FontFamily="MauiSampleFontIcon" TextColor="{AppThemeBinding Light={StaticResource TileTextColourAlt1Light}, Dark={StaticResource TileTextColourAlt1}}"
VerticalOptions="Center" VerticalTextAlignment="Center"/>
<Label Text="{Binding Phone}" Grid.Column="1" VerticalOptions="Center" CharacterSpacing="0.25" FontSize="14"/>
<Label Text="{Binding Phone}" Grid.Column="1" TextColor="{AppThemeBinding Light={StaticResource TileTextColourAlt1Light}, Dark={StaticResource TileTextColourAlt1}}" VerticalOptions="Center" CharacterSpacing="0.25" FontSize="14"/>
</StackLayout>
</Grid>

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

@ -3,11 +3,13 @@
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:SampleBrowser.Maui.AvatarView"
xmlns:base="clr-namespace:SampleBrowser.Maui.Base;assembly=SampleBrowser.Maui.Base"
xmlns:syncTheme="clr-namespace:Syncfusion.Maui.Themes;assembly=Syncfusion.Maui.Core"
x:Class="SampleBrowser.Maui.AvatarView.App">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<base:SampleBrowserStyles/>
<syncTheme:SyncfusionThemeResourceDictionary/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>

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

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?>
<SyncfusionControls>
<ControlCategory Name="Miscellaneous">
<Control Title="Avatar View" ControlName="SfAvatarView" Description="Display the user's initials or images on mobile and desktop layouts. Users can customize the background, text, etc." Image="avatarview.png">
<Control Title="Avatar View" ControlName="SfAvatarView" Description="Displays customizable initials or images on both mobile and desktop." Image="avatarview.png">
<Sample Title="Getting Started" SampleName="AvatarViewGettingStarted" SearchTags="getting started, avatar, avatarview, image, initials" CodeViewerPath="AvatarView/AvatarViewGettingStarted/" VideoLink="https://www.youtube.com/watch?v=XrTvIgeeUm0" />
<Sample Title="Group View" SampleName="GroupView" SearchTags="avatar, avatarview, groupview, group, view" CodeViewerPath="AvatarView/GroupView/" VideoLink="https://www.youtube.com/watch?v=XrTvIgeeUm0" />
<Sample Title="Visual Style" SampleName="VisualStyleSample" SearchTags="avatar, avatar view, visual style" CodeViewerPath="AvatarView/VisualStyleSample/" VideoLink="https://www.youtube.com/watch?v=XrTvIgeeUm0" />

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

@ -83,9 +83,10 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="SampleBrowser.Maui.Base" version="24.2.3" />
<PackageReference Include="Syncfusion.Maui.Core" version="24.2.3" />
<PackageReference Include="Syncfusion.Maui.TabView" version="24.2.3" />
<PackageReference Include="SampleBrowser.Maui.Base" version="25.1.35" />
<PackageReference Include="Syncfusion.Maui.Core" version="25.1.35" />
<PackageReference Include="Syncfusion.Maui.TabView" version="25.1.35" />
<PackageReference Include="Syncfusion.Maui.Buttons" version="25.1.35" />
</ItemGroup>
</Project>

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

@ -4,8 +4,10 @@
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:syncfusion="clr-namespace:Syncfusion.Maui.Core;assembly=Syncfusion.Maui.Core"
xmlns:localCore="clr-namespace:SampleBrowser.Maui.Base;assembly=SampleBrowser.Maui.Base"
xmlns:buttons="clr-namespace:Syncfusion.Maui.Buttons;assembly=Syncfusion.Maui.Buttons"
xmlns:imageExtension="clr-namespace:SampleBrowser.Maui.Base.Converters;assembly=SampleBrowser.Maui.Base"
BackgroundColor="White">
xmlns:local="clr-namespace:SampleBrowser.Maui.AvatarView.SfAvatarView"
BackgroundColor="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}">
<localCore:SampleView.Resources>
<ResourceDictionary>
@ -40,7 +42,8 @@
</Grid.RowDefinitions>
<Label Text="{Binding TitleText}"
VerticalOptions="Start"
HorizontalOptions="Start"/>
HorizontalOptions="Start"
TextColor="{AppThemeBinding Light={StaticResource TextColourLight}, Dark={StaticResource TextColour}}"/>
<syncfusion:SfBadgeView x:Name="StatusBadge" Margin="0,30,0,0"
VerticalOptions="Center"
@ -69,39 +72,58 @@
<Grid.RowDefinitions>
<RowDefinition Height="40"/>
</Grid.RowDefinitions>
<Entry Text="{Binding FirstName}" Margin="2,0,0,0" VerticalOptions="End" VerticalTextAlignment="Center" Placeholder="Enter the First Name" TextColor="Black"/>
<Entry Text="{Binding LastName}" Margin="{OnPlatform Default='2,8,0,0', Android='2,0,0,0'}" Grid.Column="1" VerticalOptions="Center" VerticalTextAlignment="Center" Placeholder="Enter the Last Name" TextColor="Black" />
<local:SfEntry Text="{Binding FirstName}"
TextColor="{AppThemeBinding Light={StaticResource TextColourLight}, Dark={StaticResource TextColour}}"
PlaceholderColor="{AppThemeBinding Light={StaticResource PlaceholderTextColourLight}, Dark={StaticResource PlaceholderTextColour}}"
Margin="2,0,0,0" VerticalOptions="End"
VerticalTextAlignment="Center"
Placeholder="Enter the First Name"
BackgroundColor="{AppThemeBinding Light={StaticResource FilledInputBackgroundLight}, Dark={StaticResource FilledInputBackground}}"/>
<local:SfEntry Text="{Binding LastName}"
TextColor="{AppThemeBinding Light={StaticResource TextColourLight}, Dark={StaticResource TextColour}}"
PlaceholderColor="{AppThemeBinding Light={StaticResource PlaceholderTextColourLight}, Dark={StaticResource PlaceholderTextColour}}"
Margin="{OnPlatform Default='2,8,0,0', Android='2,0,0,0'}" Grid.Column="1" VerticalOptions="Center"
VerticalTextAlignment="Center"
Placeholder="Enter the Last Name"
BackgroundColor="{AppThemeBinding Light={StaticResource FilledInputBackgroundLight}, Dark={StaticResource FilledInputBackground}}" />
</Grid>
<Grid Margin="0,50,0,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="40"/>
</Grid.ColumnDefinitions>
<Label HorizontalOptions="Start" Text="Show status indicator"/>
<CheckBox IsChecked="True" Grid.Column="1" Color="#6200EE" x:Name="StatusIndicatorCheck" HorizontalOptions="End"/>
<Label HorizontalOptions="Start" Text="Show status indicator" TextColor="{AppThemeBinding Light={StaticResource TextColourLight}, Dark={StaticResource TextColour}}"/>
<buttons:SfCheckBox IsChecked="True" Grid.Column="1"
x:Name="StatusIndicatorCheck"
StateChanged="StatusIndicatorCheck_StateChanged"
HorizontalOptions="End"/>
</Grid>
<Grid Margin="0,5,0,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="40"/>
</Grid.ColumnDefinitions>
<Label HorizontalOptions="Start" Text="Use custom picture"/>
<CheckBox HorizontalOptions="End" Grid.Column="1" Color="#6200EE" IsChecked="{Binding UseCustomAvatar}"/>
<Label HorizontalOptions="Start" Text="Use custom picture" TextColor="{AppThemeBinding Light={StaticResource TextColourLight}, Dark={StaticResource TextColour}}"/>
<buttons:SfCheckBox HorizontalOptions="End" Grid.Column="1"
IsChecked="{Binding UseCustomAvatar}"/>
</Grid>
<Grid Margin="0,5,0,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="40"/>
</Grid.ColumnDefinitions>
<Label HorizontalOptions="Start" Text="Show double character" />
<CheckBox HorizontalOptions="End" Grid.Column="1" Color="#6200EE" IsChecked="{Binding UseDoubleCharacter}"/>
<Label HorizontalOptions="Start" Text="Show double character" TextColor="{AppThemeBinding Light={StaticResource TextColourLight}, Dark={StaticResource TextColour}}" />
<buttons:SfCheckBox HorizontalOptions="End" Grid.Column="1"
IsChecked="{Binding UseDoubleCharacter}"/>
</Grid>
<Grid Margin="0,15,0,0" IsEnabled="{Binding UseInitialAvatar}" Opacity="{Binding ColorPickerOpacity}">
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="130"/>
</Grid.RowDefinitions>
<Label HorizontalOptions="Start" Text="Choose gradient background"/>
<Label HorizontalOptions="Start" Text="Choose gradient background" TextColor="{AppThemeBinding Light={StaticResource TextColourLight}, Dark={StaticResource TextColour}}"/>
<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>

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

@ -5,11 +5,16 @@
// licensing@syncfusion.com. Any infringement will be prosecuted under
// applicable laws.
#endregion
using Microsoft.Maui.Platform;
using SampleBrowser.Maui.Base;
using Syncfusion.Maui.Core;
using System.Collections.ObjectModel;
#if ANDROID
using Android.Content.Res;
#endif
namespace SampleBrowser.Maui.AvatarView.SfAvatarView;
public partial class AvatarViewGettingStarted : SampleView
{
@ -305,7 +310,6 @@ public partial class AvatarViewGettingStarted : SampleView
public AvatarViewGettingStarted()
{
InitializeComponent();
this.StatusIndicatorCheck.CheckedChanged += StatusIndicatorSwitch_Toggled;
PopulateColorCollection();
@ -315,19 +319,15 @@ public partial class AvatarViewGettingStarted : SampleView
this.BindingContext = this;
}
private void StatusIndicatorSwitch_Toggled(object? sender, CheckedChangedEventArgs e)
private void StatusIndicatorCheck_StateChanged(object sender, Syncfusion.Maui.Buttons.StateChangedEventArgs e)
{
if (this.StatusIndicatorCheck.IsChecked)
{
if (this.StatusIndicatorCheck.IsChecked == true) {
this.StatusBadge.BadgeSettings!.Icon = BadgeIcon.Available;
}
else
{
this.StatusBadge.BadgeSettings!.Type = BadgeType.None;
this.StatusBadge.BadgeSettings.Icon = BadgeIcon.None;
else {
this.StatusBadge.BadgeSettings!.Icon = BadgeIcon.None;
}
}
private void SetAvatarName()
{
if (tappedAvatar == null)
@ -437,7 +437,6 @@ public partial class AvatarViewGettingStarted : SampleView
{
item.InitialsColor = Colors.Transparent;
item.Stroke = Color.FromArgb("#9E9E9E");
item.StrokeThickness = 1;
}
tappedAvatar.Stroke = Color.FromArgb("#6200EE");
@ -495,5 +494,42 @@ public partial class AvatarViewGettingStarted : SampleView
}
}
}
}
public class SfEntry : Entry {
public SfEntry() {
#if ANDROID
Microsoft.Maui.Handlers.EntryHandler.Mapper.AppendToMapping("NoUnderline", (h, v) =>
{
if (v is SfEntry) {
h.PlatformView.BackgroundTintList = ColorStateList.ValueOf(Colors.Transparent.ToPlatform());
}
});
#endif
#if WINDOWS
Microsoft.Maui.Handlers.EntryHandler.Mapper.AppendToMapping("NoUnderline", (h, v) =>
{
if (v is SfEntry)
{
h.PlatformView.BorderThickness = new Microsoft.UI.Xaml.Thickness(0);
h.PlatformView.Padding = new Microsoft.UI.Xaml.Thickness(8, 0, 0, 0);
h.PlatformView.Resources["TextControlBorderThemeThicknessFocused"] = new Microsoft.UI.Xaml.Thickness(0);
}
});
#endif
#if MACCATALYST
Microsoft.Maui.Handlers.EntryHandler.Mapper.AppendToMapping("NoUnderline", (h, v) =>
{
if (v is SfEntry)
{
h.PlatformView.BorderStyle = UIKit.UITextBorderStyle.None;
}
});
#endif
}
}

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

@ -5,12 +5,12 @@
x:Class="SampleBrowser.Maui.AvatarView.SfAvatarView.GroupView"
xmlns:localCore="clr-namespace:SampleBrowser.Maui.Base;assembly=SampleBrowser.Maui.Base"
xmlns:imageExtension="clr-namespace:SampleBrowser.Maui.Base.Converters;assembly=SampleBrowser.Maui.Base"
BackgroundColor="White">
BackgroundColor="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}">
<localCore:SampleView.Content>
<Grid>
<Grid Margin="10">
<ListView ItemsSource="{Binding GroupCollection}" RowHeight="60"
SelectionMode="None">
SelectionMode="None" BackgroundColor="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}">
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
@ -30,7 +30,7 @@
ImageSourceMemberPath="Image"
BackgroundColorMemberPath="Backgroundcolor"
InitialsMemberPath="Name"/>
<Grid Grid.Column="1" VerticalOptions="Center">
<Grid Grid.Column="1" Margin="12,0,0,0" VerticalOptions="Center">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
@ -39,13 +39,13 @@
VerticalOptions="Center"
VerticalTextAlignment="Center"
FontSize="14"
TextColor="Black"/>
TextColor="{AppThemeBinding Light={StaticResource TileTextColourLight}, Dark={StaticResource TileTextColour}}"/>
<Label Grid.Row="1"
Text="{Binding TotalParticipants}"
VerticalOptions="Center"
VerticalTextAlignment="Center"
FontSize="11"
TextColor="Gray"/>
TextColor="{AppThemeBinding Light={StaticResource TileTextColourAlt1Light}, Dark={StaticResource TileTextColourAlt1}}"/>
</Grid>
</Grid>
</ViewCell>

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

@ -5,7 +5,7 @@
x:Class="SampleBrowser.Maui.AvatarView.SfAvatarView.VisualStyleSample"
xmlns:localCore="clr-namespace:SampleBrowser.Maui.Base;assembly=SampleBrowser.Maui.Base"
xmlns:imageExtension="clr-namespace:SampleBrowser.Maui.Base.Converters;assembly=SampleBrowser.Maui.Base"
BackgroundColor="White">
BackgroundColor="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}">
<localCore:SampleView.Resources>
<ResourceDictionary>
@ -14,8 +14,6 @@
<Setter Property="HorizontalOptions" Value="Start"/>
<Setter Property="ImageSource" Value="{imageExtension:SfImageResource image5.png}"/>
<Setter Property="AvatarName" Value="SF"/>
<Setter Property="BackgroundColor" Value="#FF5490CC"/>
<Setter Property="InitialsColor" Value="White"/>
<Setter Property="ImageSourceMemberPath" Value="Image"/>
<Setter Property="InitialsMemberPath" Value="Name"/>
<Setter Property="ContentType" Value="{Binding AvatarType}"/>
@ -39,7 +37,7 @@
</Grid.RowDefinitions>
<ScrollView Grid.Row="1" Margin="10">
<StackLayout x:Name="mainstack" Orientation="Horizontal">
<StackLayout x:Name="mainstack" Orientation="Horizontal" HorizontalOptions="Center">
<StackLayout Orientation="Vertical">
@ -66,7 +64,7 @@
</StackLayout>
<Grid HeightRequest="10"/>
<Label Text="Default Visual Types" TextColor="Black"
<Label Text="Default Visual Types" TextColor="{AppThemeBinding Light={StaticResource TextColourLight}, Dark={StaticResource TextColour}}"
FontSize="14"/>
<StackLayout Padding="0,10,0,0" Orientation="Horizontal">
<StackLayout Orientation="Vertical">
@ -75,7 +73,7 @@
AvatarShape="Circle"
AvatarSize="ExtraLarge"
Style="{StaticResource AvatarViewStyle}"/>
<Label Text="Extra Large Circle" TextColor="Black"
<Label Text="Extra Large Circle" Padding="0,10,0,0" TextColor="{AppThemeBinding Light={StaticResource TextColourLight}, Dark={StaticResource TextColour}}"
FontSize="12"/>
<Grid HeightRequest="10"/>
@ -83,7 +81,7 @@
AvatarShape="Circle"
AvatarSize="Large"
Style="{StaticResource AvatarViewStyle}"/>
<Label Text="Large Circle" TextColor="Black"
<Label Text="Large Circle" Padding="0,10,0,0" TextColor="{AppThemeBinding Light={StaticResource TextColourLight}, Dark={StaticResource TextColour}}"
FontSize="12"/>
<Grid HeightRequest="10"/>
@ -91,7 +89,7 @@
AvatarShape="Circle"
AvatarSize="Medium"
Style="{StaticResource AvatarViewStyle}"/>
<Label Text="Medium Circle" TextColor="Black"
<Label Text="Medium Circle" Padding="0,10,0,0" TextColor="{AppThemeBinding Light={StaticResource TextColourLight}, Dark={StaticResource TextColour}}"
FontSize="12"/>
<Grid HeightRequest="10"/>
@ -99,7 +97,7 @@
AvatarShape="Circle"
AvatarSize="Small"
Style="{StaticResource AvatarViewStyle}"/>
<Label Text="Small Circle" TextColor="Black"
<Label Text="Small Circle" Padding="0,10,0,0" TextColor="{AppThemeBinding Light={StaticResource TextColourLight}, Dark={StaticResource TextColour}}"
FontSize="12"/>
<Grid HeightRequest="10"/>
@ -107,7 +105,7 @@
AvatarShape="Circle"
AvatarSize="ExtraSmall"
Style="{StaticResource AvatarViewStyle}"/>
<Label Text="Extra Small Circle" TextColor="Black"
<Label Text="Extra Small Circle" Padding="0,10,0,0" TextColor="{AppThemeBinding Light={StaticResource TextColourLight}, Dark={StaticResource TextColour}}"
FontSize="12"/>
</StackLayout>
<StackLayout Orientation="Vertical" Margin="20,0,0,0">
@ -116,7 +114,7 @@
AvatarShape="Square"
AvatarSize="ExtraLarge"
Style="{StaticResource AvatarViewStyle}"/>
<Label Text="Extra Large Square" TextColor="Black"
<Label Text="Extra Large Square" Padding="0,10,0,0" TextColor="{AppThemeBinding Light={StaticResource TextColourLight}, Dark={StaticResource TextColour}}"
FontSize="12"/>
<Grid HeightRequest="10"/>
@ -124,7 +122,7 @@
AvatarShape="Square"
AvatarSize="Large"
Style="{StaticResource AvatarViewStyle}"/>
<Label Text="Large Square" TextColor="Black"
<Label Text="Large Square" Padding="0,10,0,0" TextColor="{AppThemeBinding Light={StaticResource TextColourLight}, Dark={StaticResource TextColour}}"
FontSize="12"/>
<Grid HeightRequest="10"/>
@ -132,7 +130,7 @@
AvatarShape="Square"
AvatarSize="Medium"
Style="{StaticResource AvatarViewStyle}"/>
<Label Text="Medium Square" TextColor="Black"
<Label Text="Medium Square" Padding="0,10,0,0" TextColor="{AppThemeBinding Light={StaticResource TextColourLight}, Dark={StaticResource TextColour}}"
FontSize="12"/>
<Grid HeightRequest="10"/>
@ -140,7 +138,7 @@
AvatarShape="Square"
AvatarSize="Small"
Style="{StaticResource AvatarViewStyle}"/>
<Label Text="Small Square" TextColor="Black"
<Label Text="Small Square" Padding="0,10,0,0" TextColor="{AppThemeBinding Light={StaticResource TextColourLight}, Dark={StaticResource TextColour}}"
FontSize="12"/>
<Grid HeightRequest="10"/>
@ -148,7 +146,7 @@
AvatarShape="Square"
AvatarSize="ExtraSmall"
Style="{StaticResource AvatarViewStyle}"/>
<Label Text="Extra Small Square" TextColor="Black"
<Label Text="Extra Small Square" Padding="0,10,0,0" TextColor="{AppThemeBinding Light={StaticResource TextColourLight}, Dark={StaticResource TextColour}}"
FontSize="12"/>
</StackLayout>
</StackLayout>

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

@ -3,12 +3,14 @@
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:SampleBrowser.Maui.Backdrop"
x:Class="SampleBrowser.Maui.Backdrop.App"
xmlns:base="clr-namespace:SampleBrowser.Maui.Base;assembly=SampleBrowser.Maui.Base">
xmlns:base="clr-namespace:SampleBrowser.Maui.Base;assembly=SampleBrowser.Maui.Base"
xmlns:syncTheme="clr-namespace:Syncfusion.Maui.Themes;assembly=Syncfusion.Maui.Core">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<base:SampleBrowserStyles/>
<syncTheme:SyncfusionThemeResourceDictionary />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>

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

@ -2,7 +2,7 @@
<SyncfusionControls>
<ControlCategory Name="Layouts" >
<Control Title="Backdrop page" ControlName="SfBackdropPage" Image="backdrop.png" Description="A backdrop appears behind all the surfaces in an app, displaying contextual and actionable content.">
<Control Title="Backdrop Page" ControlName="SfBackdropPage" Image="backdrop.png" Description="This control displays contextual and actionable content behind all app surfaces.">
<Sample SampleName="InitialPage" Title="Features" CodeViewerPath="Backdrop/" VideoLink="https://www.youtube.com/watch?v=99VGii8CFmw"/>
</Control>
</ControlCategory>

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

@ -78,10 +78,10 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Syncfusion.Maui.Core" version="24.2.3" />
<PackageReference Include="SampleBrowser.Maui.Base" version="24.2.3" />
<PackageReference Include="Syncfusion.Maui.Sliders" version="24.2.3" />
<PackageReference Include="Syncfusion.Maui.TabView" version="24.2.3" />
<PackageReference Include="Syncfusion.Maui.Backdrop" version="24.2.3" />
<PackageReference Include="Syncfusion.Maui.Core" version="25.1.35" />
<PackageReference Include="SampleBrowser.Maui.Base" version="25.1.35" />
<PackageReference Include="Syncfusion.Maui.TabView" version="25.1.35" />
<PackageReference Include="Syncfusion.Maui.Backdrop" version="25.1.35" />
<PackageReference Include="Syncfusion.Maui.Buttons" version="25.1.35" />
</ItemGroup>
</Project>

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

@ -3,7 +3,6 @@
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="SampleBrowser.Maui.Backdrop.SfBackdropPage.Backdrop"
xmlns:backdrop="clr-namespace:Syncfusion.Maui.Backdrop;assembly=Syncfusion.Maui.Backdrop"
xmlns:sliders="clr-namespace:Syncfusion.Maui.Sliders;assembly=Syncfusion.Maui.Sliders"
xmlns:local="clr-namespace:SampleBrowser.Maui.Backdrop"
xmlns:imageExtension="clr-namespace:SampleBrowser.Maui.Base.Converters;assembly=SampleBrowser.Maui.Base"
x:Name="backdropPage"
@ -19,7 +18,7 @@
<Color x:Key="primaryTextColor">#FFFFFF</Color>
<Style TargetType="Label">
<Setter Property="TextColor" Value="{StaticResource primaryTextColor}"/>
<Setter Property="TextColor" Value="{AppThemeBinding Default={StaticResource PrimaryForeground}}"/>
<Setter Property="FontSize" Value="16"/>
</Style>
<Style TargetType="Button">
@ -29,6 +28,7 @@
<Setter Property="Margin" Value="0,0,0,15"/>
<Setter Property="CornerRadius" Value="4"/>
<Setter Property="Background" Value="#1F000000"/>
<Setter Property="TextColor" Value="{AppThemeBinding Default={StaticResource PrimaryForeground}}"/>
</Style>
</backdrop:SfBackdropPage.Resources>
@ -54,72 +54,65 @@
<backdrop:SfBackdropPage.BackLayer>
<backdrop:BackdropBackLayer >
<StackLayout Padding="20,16,20,16" Spacing="5">
<Label Text="Edge shape" TextColor="White"/>
<Grid ColumnSpacing="7">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="100"/>
<ColumnDefinition Width="100"/>
</Grid.ColumnDefinitions>
<Button x:Name="curveButton" Text="Curve" Clicked="curveButton_Clicked" Background="#3DFFFFFF"/>
<Button x:Name="flatButton" Text="Flat" Clicked="flatButton_Clicked" Grid.Column="1"/>
</Grid>
<Label Text="Apply corner radius" TextColor="White"/>
<Grid ColumnSpacing="7">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="100"/>
<ColumnDefinition Width="100"/>
<ColumnDefinition Width="100"/>
</Grid.ColumnDefinitions>
<Button x:Name="bothButton" Text="Both" Clicked="bothButton_Clicked" Background="#3DFFFFFF"/>
<Button x:Name="leftButton" Text="Left" Clicked="leftButton_Clicked" Grid.Column="1"/>
<Button x:Name="rightButton" Text="Right" Clicked="rightButton_Clicked" Grid.Column="2"/>
</Grid>
<Label Text="Edge shape" TextColor="{AppThemeBinding Default={StaticResource PrimaryForeground}}"/>
<Grid ColumnSpacing="7">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="100"/>
<ColumnDefinition Width="100"/>
</Grid.ColumnDefinitions>
<Button x:Name="curveButton" Text="Curve" Clicked="curveButton_Clicked" Background="#3DFFFFFF"/>
<Button x:Name="flatButton" Text="Flat" Clicked="flatButton_Clicked" Grid.Column="1"/>
</Grid>
<Label Text="Apply corner radius" TextColor="{AppThemeBinding Default={StaticResource PrimaryForeground}}"/>
<Grid ColumnSpacing="7">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="100"/>
<ColumnDefinition Width="100"/>
<ColumnDefinition Width="100"/>
</Grid.ColumnDefinitions>
<Button x:Name="bothButton" Text="Both" Clicked="bothButton_Clicked" Background="#3DFFFFFF"/>
<Button x:Name="leftButton" Text="Left" Clicked="leftButton_Clicked" Grid.Column="1"/>
<Button x:Name="rightButton" Text="Right" Clicked="rightButton_Clicked" Grid.Column="2"/>
</Grid>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<Label Text="{Binding Source={x:Reference cornerRadiusSlider},Path=Value,StringFormat='Corner radius : {0:0}'}" TextColor="White"/>
<Label HorizontalTextAlignment="Start" Grid.Column="1" Text="" TextColor="White"/>
<Label Text="{Binding Source={x:Reference cornerRadiusSlider},Path=Value,StringFormat='Corner radius : {0:0}'}" TextColor="{AppThemeBinding Default={StaticResource PrimaryForeground}}"/>
<Label HorizontalTextAlignment="Start" Grid.Column="1" Text="" TextColor="{AppThemeBinding Default={StaticResource PrimaryForeground}}"/>
</Grid>
<sliders:SfSlider x:Name="cornerRadiusSlider"
Minimum="0"
Maximum="{OnPlatform WinUI=20, MacCatalyst=20, Default=40}"
WidthRequest="{OnPlatform WinUI=300, MacCatalyst=300}"
HorizontalOptions="{OnPlatform WinUI=Start, MacCatalyst=Start}"
Value="{Binding Source={x:Reference frontLayer},Path=LeftCornerRadius,Mode=OneTime}"
ValueChanged="cornerRadiusSlider_ValueChanged"
HeightRequest="40">
<sliders:SfSlider.TrackStyle>
<sliders:SliderTrackStyle ActiveFill="#FFFFFF"
InactiveFill="#3DFFFFFF"/>
</sliders:SfSlider.TrackStyle>
<sliders:SfSlider.ThumbStyle>
<sliders:SliderThumbStyle Fill="#FFFFFF"/>
</sliders:SfSlider.ThumbStyle>
<sliders:SfSlider.ThumbOverlayStyle>
<sliders:SliderThumbOverlayStyle Radius="0"/>
</sliders:SfSlider.ThumbOverlayStyle>
</sliders:SfSlider>
<Label Text="Change back layer reveal option" TextColor="White"
<Slider x:Name="cornerRadiusSlider"
Minimum="0"
Maximum="{OnPlatform WinUI=20, MacCatalyst=20, Default=40}"
WidthRequest="{OnPlatform WinUI=300, MacCatalyst=300}"
HorizontalOptions="{OnPlatform WinUI=Start, MacCatalyst=Start}"
Value="{Binding Source={x:Reference frontLayer},Path=LeftCornerRadius,Mode=OneTime}"
ValueChanged="cornerRadiusSlider_ValueChanged"
HeightRequest="40"
ThumbColor="{AppThemeBinding Light={StaticResource primaryTextColor}, Dark={StaticResource BackgroundDark}}"
MinimumTrackColor="{AppThemeBinding Light={StaticResource primaryTextColor}, Dark={StaticResource BackgroundDark}}"
MaximumTrackColor="{AppThemeBinding Light={StaticResource BorderLight}, Dark={StaticResource Border}}">
</Slider>
<Label Text="Change back layer reveal option" TextColor="{AppThemeBinding Default={StaticResource PrimaryForeground}}"
/>
<Grid ColumnSpacing="7">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="100"/>
<ColumnDefinition Width="100"/>
</Grid.ColumnDefinitions>
<Button x:Name="autoButton" Text="Auto" Clicked="autoButton_Clicked" Background="#3DFFFFFF"/>
<Button x:Name="fillButton" Text="Fill" Grid.Column="1" Clicked="fillButton_Clicked"/>
</Grid>
</StackLayout>
<Grid ColumnSpacing="7">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="100"/>
<ColumnDefinition Width="100"/>
</Grid.ColumnDefinitions>
<Button x:Name="autoButton" Text="Auto" Clicked="autoButton_Clicked" Background="#3DFFFFFF"/>
<Button x:Name="fillButton" Text="Fill" Grid.Column="1" Clicked="fillButton_Clicked"/>
</Grid>
</StackLayout>
</backdrop:BackdropBackLayer>
</backdrop:SfBackdropPage.BackLayer>
<backdrop:SfBackdropPage.FrontLayer>
<backdrop:BackdropFrontLayer x:Name="frontLayer"
<backdrop:BackdropFrontLayer x:Name="frontLayer" BackgroundColor="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}"
RevealedHeight="{Binding Source={x:Reference frontLayerheader},Path=Height}">
<StackLayout VerticalOptions="FillAndExpand">
<Label Padding="10,0,10,10" x:Name="frontLayerheader" Text="Subheader" FontSize="16" TextColor="#828589" VerticalTextAlignment="Center" HeightRequest="48"/>
<Label Padding="10,0,10,10" x:Name="frontLayerheader" Text="Subheader" FontSize="16" TextColor="{AppThemeBinding Light={StaticResource TileTextColourAlt1Light}, Dark={StaticResource TileTextColourAlt1}}" VerticalTextAlignment="Center" HeightRequest="48"/>
<Grid Padding="10,0,10,10" ColumnSpacing="10" RowSpacing="10" VerticalOptions="FillAndExpand">
<Grid.RowDefinitions>
<RowDefinition />

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

@ -7,7 +7,6 @@
#endregion
namespace SampleBrowser.Maui.Backdrop.SfBackdropPage;
using Syncfusion.Maui.Backdrop;
using Syncfusion.Maui.Sliders;
public partial class Backdrop : SfBackdropPage
{
@ -77,7 +76,7 @@ public partial class Backdrop : SfBackdropPage
this.autoButton.Background = normalColor;
}
private void cornerRadiusSlider_ValueChanged(object sender, SliderValueChangedEventArgs e)
private void cornerRadiusSlider_ValueChanged(object sender, ValueChangedEventArgs e)
{
switch (edgeShapeSide)
{

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

@ -11,7 +11,7 @@ namespace SampleBrowser.Maui.Backdrop.SfBackdropPage;
public partial class InitialPage : SampleView
{
public InitialPage()
public InitialPage()
{
InitializeComponent();
}
@ -23,8 +23,8 @@ public partial class InitialPage : SampleView
var page = Application.Current.MainPage as NavigationPage;
if (page != null)
{
page.BarBackgroundColor = Color.FromArgb("#6200EE");
page.BarTextColor = Colors.White;
page.BarBackgroundColor = Application.Current.RequestedTheme == AppTheme.Light ? Color.FromArgb("#6750A4") : Color.FromArgb("#D0BCFF");
page.BarTextColor = Application.Current.RequestedTheme == AppTheme.Light ? Colors.White : Color.FromArgb("#381E72");
}
}

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

@ -3,11 +3,13 @@
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:SampleBrowser.Maui.BadgeView"
xmlns:base="clr-namespace:SampleBrowser.Maui.Base;assembly=SampleBrowser.Maui.Base"
xmlns:syncTheme="clr-namespace:Syncfusion.Maui.Themes;assembly=Syncfusion.Maui.Core"
x:Class="SampleBrowser.Maui.BadgeView.App">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<base:SampleBrowserStyles/>
<syncTheme:SyncfusionThemeResourceDictionary/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>

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

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?>
<SyncfusionControls>
<ControlCategory Name="Notification">
<Control Title="BadgeView" ControlName="SfBadgeView" Description="Badge shows a circle or rectangle which contain a number or message." Image="badgeview.png">
<Control Title="Badge View" ControlName="SfBadgeView" Description="Badge shows a circle or rectangle which contain a number or message." Image="badgeview.png">
<Category Title="Features">
<Sample Title="Offset" SampleName="Offset" Description="Showcases the badge with different offset values." SearchTags="badgeView, badge, offset" CodeViewerPath="BadgeView/Customization/" VideoLink="https://www.youtube.com/watch?v=wlh2eMPYZY0" />
<Sample Title="Type" SampleName="Type" Description="Showcases the different badge types available in the Badge View" SearchTags="badgeView, badge, type, badge type" CodeViewerPath="BadgeView/Customization/" VideoLink="https://www.youtube.com/watch?v=wlh2eMPYZY0" />

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

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

@ -79,9 +79,10 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="SampleBrowser.Maui.Base" version="24.2.3" />
<PackageReference Include="Syncfusion.Maui.Core" version="24.2.3" />
<PackageReference Include="Syncfusion.Maui.TabView" version="24.2.3" />
<PackageReference Include="SampleBrowser.Maui.Base" version="25.1.35" />
<PackageReference Include="Syncfusion.Maui.Core" version="25.1.35" />
<PackageReference Include="Syncfusion.Maui.TabView" version="25.1.35" />
<PackageReference Include="Syncfusion.Maui.Buttons" version="25.1.35" />
</ItemGroup>
<ItemGroup>

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

@ -5,14 +5,6 @@
xmlns:localCore="clr-namespace:SampleBrowser.Maui.Base;assembly=SampleBrowser.Maui.Base"
x:Class="SampleBrowser.Maui.BadgeView.SfBadgeView.Alignment">
<localCore:SampleView.Resources>
<Style x:Key="DemoLabelStyle" TargetType="Label">
<Setter Property="FontSize" Value="18"/>
<Setter Property="VerticalOptions" Value="Center"/>
<Setter Property="HorizontalOptions" Value="Center"/>
<Setter Property="TextColor" Value="Black"/>
</Style>
</localCore:SampleView.Resources>
<localCore:SampleView.Content>
<ScrollView HorizontalOptions="Center" HorizontalScrollBarVisibility="Never" VerticalScrollBarVisibility="Never">
@ -24,22 +16,26 @@
HorizontalOptions="Center"
WidthRequest="150"
HeightRequest="90">
<Grid BackgroundColor="#EEEEEE">
<Label Text="Start"
Style="{StaticResource DemoLabelStyle}" />
</Grid>
<Button BackgroundColor="{AppThemeBinding Light={StaticResource FilledInputBackgroundLight}, Dark={StaticResource FilledInputBackground}}"
Text="Start"
Margin="10"
FontSize="18"
TextColor="{AppThemeBinding Light={StaticResource TileTextColourAlt1Light}, Dark={StaticResource TileTextColourAlt1}}"
CornerRadius="0" />
<badge:SfBadgeView.BadgeSettings>
<badge:BadgeSettings BadgeAlignment="Start" CornerRadius="0" />
<badge:BadgeSettings BadgeAlignment="Start" CornerRadius="0" Offset="-1,2"/>
</badge:SfBadgeView.BadgeSettings>
</badge:SfBadgeView>
<badge:SfBadgeView BadgeText="5"
HorizontalOptions="Center"
WidthRequest="150"
HeightRequest="80">
<Grid BackgroundColor="#EEEEEE" >
<Label Text="Center"
Style="{StaticResource DemoLabelStyle}" />
</Grid>
<Button BackgroundColor="{AppThemeBinding Light={StaticResource FilledInputBackgroundLight}, Dark={StaticResource FilledInputBackground}}"
Text="Center"
Margin="10"
FontSize="18"
TextColor="{AppThemeBinding Light={StaticResource TileTextColourAlt1Light}, Dark={StaticResource TileTextColourAlt1}}"
CornerRadius="0" />
<badge:SfBadgeView.BadgeSettings>
<badge:BadgeSettings BadgeAlignment="Center" CornerRadius="0" />
</badge:SfBadgeView.BadgeSettings>
@ -48,10 +44,12 @@
HorizontalOptions="Center"
WidthRequest="150"
HeightRequest="70">
<Grid BackgroundColor="#EEEEEE">
<Label Text="End"
Style="{StaticResource DemoLabelStyle}" />
</Grid>
<Button BackgroundColor="{AppThemeBinding Light={StaticResource FilledInputBackgroundLight}, Dark={StaticResource FilledInputBackground}}"
Text="End"
Margin="10"
FontSize="18"
TextColor="{AppThemeBinding Light={StaticResource TileTextColourAlt1Light}, Dark={StaticResource TileTextColourAlt1}}"
CornerRadius="0" />
<badge:SfBadgeView.BadgeSettings>
<badge:BadgeSettings BadgeAlignment="End" CornerRadius="0" />
</badge:SfBadgeView.BadgeSettings>

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

@ -6,7 +6,7 @@
x:Class="SampleBrowser.Maui.BadgeView.SfBadgeView.Border">
<localCore:SampleView.Resources>
<Style x:Key="DemoLabelStyle" TargetType="Label">
<Style x:Key="DemoButtonStyle" TargetType="Button">
<Setter Property="FontSize" Value="18"/>
<Setter Property="VerticalOptions" Value="Center"/>
<Setter Property="HorizontalOptions" Value="Center"/>
@ -25,11 +25,11 @@
HorizontalOptions="Center"
WidthRequest="200"
HeightRequest="100">
<Grid BackgroundColor="#EEEEEE"
Margin="10">
<Label Text="Corner Radius"
Style="{StaticResource DemoLabelStyle}"/>
</Grid>
<Button BackgroundColor="{AppThemeBinding Light={StaticResource FilledInputBackgroundLight}, Dark={StaticResource FilledInputBackground}}"
Margin="10" Text="Corner Radius"
Style="{StaticResource DemoButtonStyle}"
TextColor="{AppThemeBinding Light={StaticResource TileTextColourAlt1Light}, Dark={StaticResource TileTextColourAlt1}}"
CornerRadius="0"/>
<badge:SfBadgeView.BadgeSettings>
<badge:BadgeSettings CornerRadius="12"/>
</badge:SfBadgeView.BadgeSettings>
@ -39,11 +39,11 @@
HorizontalOptions="Center"
WidthRequest="200"
HeightRequest="100">
<Grid BackgroundColor="#EEEEEE"
Margin="10">
<Label Text="Stroke Thickness"
Style="{StaticResource DemoLabelStyle}"/>
</Grid>
<Button BackgroundColor="{AppThemeBinding Light={StaticResource FilledInputBackgroundLight}, Dark={StaticResource FilledInputBackground}}"
Margin="10" Text="Stroke Thickness"
Style="{StaticResource DemoButtonStyle}"
TextColor="{AppThemeBinding Light={StaticResource TileTextColourAlt1Light}, Dark={StaticResource TileTextColourAlt1}}"
CornerRadius="0"/>
<badge:SfBadgeView.BadgeSettings>
<badge:BadgeSettings Stroke="DeepPink"
Type="None"
@ -58,11 +58,11 @@
HorizontalOptions="Center"
WidthRequest="200"
HeightRequest="100">
<Grid BackgroundColor="#EEEEEE"
Margin="10">
<Label Text="Stroke"
Style="{StaticResource DemoLabelStyle}"/>
</Grid>
<Button BackgroundColor="{AppThemeBinding Light={StaticResource FilledInputBackgroundLight}, Dark={StaticResource FilledInputBackground}}"
Margin="10" Text="Stroke"
Style="{StaticResource DemoButtonStyle}"
TextColor="{AppThemeBinding Light={StaticResource TileTextColourAlt1Light}, Dark={StaticResource TileTextColourAlt1}}"
CornerRadius="0"/>
<badge:SfBadgeView.BadgeSettings>
<badge:BadgeSettings Stroke="Red"
Type="None"

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

@ -5,15 +5,6 @@
xmlns:localCore="clr-namespace:SampleBrowser.Maui.Base;assembly=SampleBrowser.Maui.Base"
x:Class="SampleBrowser.Maui.BadgeView.SfBadgeView.Font">
<localCore:SampleView.Resources>
<Style x:Key="DemoLabelStyle" TargetType="Label">
<Setter Property="FontSize" Value="18"/>
<Setter Property="VerticalOptions" Value="Center"/>
<Setter Property="HorizontalOptions" Value="Center"/>
<Setter Property="TextColor" Value="Black"/>
</Style>
</localCore:SampleView.Resources>
<localCore:SampleView.Content>
<ScrollView HorizontalOptions="Center" HorizontalScrollBarVisibility="Never" VerticalScrollBarVisibility="Never">
<VerticalStackLayout WidthRequest="350"
@ -23,12 +14,13 @@
ColumnDefinitions="*,*">
<badge:SfBadgeView Grid.Row="0"
Grid.Column="0"
BadgeText="5">
<Grid BackgroundColor="#EEEEEE"
Margin="10">
<Label Text="Size"
Style="{StaticResource DemoLabelStyle}"/>
</Grid>
BadgeText="5" >
<Button BackgroundColor="{AppThemeBinding Light={StaticResource FilledInputBackgroundLight}, Dark={StaticResource FilledInputBackground}}"
Text="Size"
Margin="10"
FontSize="18"
TextColor="{AppThemeBinding Light={StaticResource TileTextColourAlt1Light}, Dark={StaticResource TileTextColourAlt1}}"
CornerRadius="0" />
<badge:SfBadgeView.BadgeSettings>
<badge:BadgeSettings FontSize="20"/>
</badge:SfBadgeView.BadgeSettings>
@ -37,11 +29,12 @@
<badge:SfBadgeView Grid.Row="0"
Grid.Column="1"
BadgeText="5">
<Grid BackgroundColor="#EEEEEE"
Margin="10">
<Label Text="Font Attributes" LineBreakMode="WordWrap" HorizontalTextAlignment="Center"
Style="{StaticResource DemoLabelStyle}"/>
</Grid>
<Button BackgroundColor="{AppThemeBinding Light={StaticResource FilledInputBackgroundLight}, Dark={StaticResource FilledInputBackground}}"
Text="Font Attributes"
Margin="10"
FontSize="18"
TextColor="{AppThemeBinding Light={StaticResource TileTextColourAlt1Light}, Dark={StaticResource TileTextColourAlt1}}"
CornerRadius="0" Padding="0,0,-1,0"/>
<badge:SfBadgeView.BadgeSettings>
<badge:BadgeSettings FontAttributes="Bold"/>
</badge:SfBadgeView.BadgeSettings>
@ -50,11 +43,12 @@
<badge:SfBadgeView Grid.Row="1"
Grid.Column="0"
BadgeText="5">
<Grid BackgroundColor="#EEEEEE"
Margin="10">
<Label Text="Padding"
Style="{StaticResource DemoLabelStyle}"/>
</Grid>
<Button BackgroundColor="{AppThemeBinding Light={StaticResource FilledInputBackgroundLight}, Dark={StaticResource FilledInputBackground}}"
Text="Padding"
Margin="10"
FontSize="18"
TextColor="{AppThemeBinding Light={StaticResource TileTextColourAlt1Light}, Dark={StaticResource TileTextColourAlt1}}"
CornerRadius="0" />
<badge:SfBadgeView.BadgeSettings>
<badge:BadgeSettings TextPadding="10"/>
</badge:SfBadgeView.BadgeSettings>
@ -63,11 +57,12 @@
<badge:SfBadgeView Grid.Row="1"
Grid.Column="1"
BadgeText="5">
<Grid BackgroundColor="#EEEEEE"
Margin="10">
<Label Text="Color"
Style="{StaticResource DemoLabelStyle}"/>
</Grid>
<Button BackgroundColor="{AppThemeBinding Light={StaticResource FilledInputBackgroundLight}, Dark={StaticResource FilledInputBackground}}"
Text="Color"
Margin="10"
FontSize="18"
TextColor="{AppThemeBinding Light={StaticResource TileTextColourAlt1Light}, Dark={StaticResource TileTextColourAlt1}}"
CornerRadius="0" />
<badge:SfBadgeView.BadgeSettings>
<badge:BadgeSettings FontAttributes="Bold"
TextColor="Red"

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

@ -30,7 +30,7 @@
<badge:SfBadgeView WidthRequest="60"
HeightRequest="60"
HorizontalOptions="Center"
BackgroundColor="White">
BackgroundColor="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}">
<Image Source="{imageExtension:SfImageResource people_circle1.png}"
HorizontalOptions="Center"
WidthRequest="60"
@ -44,7 +44,7 @@
</badge:SfBadgeView>
<Label Text="Add"
TextColor="Black"
TextColor="{AppThemeBinding Light={StaticResource TextColourLight}, Dark={StaticResource TextColour}}"
HorizontalOptions="Center" />
</VerticalStackLayout>
@ -53,7 +53,7 @@
<badge:SfBadgeView WidthRequest="60"
HeightRequest="60"
HorizontalOptions="Center"
BackgroundColor="White">
BackgroundColor="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}">
<Image Source="{imageExtension:SfImageResource people_circle1.png}"
HorizontalOptions="Center"
WidthRequest="60"
@ -67,7 +67,7 @@
</badge:SfBadgeView>
<Label Text="Available"
TextColor="Black"
TextColor="{AppThemeBinding Light={StaticResource TextColourLight}, Dark={StaticResource TextColour}}"
HorizontalOptions="Center" />
</VerticalStackLayout>
@ -76,7 +76,7 @@
<badge:SfBadgeView WidthRequest="60"
HeightRequest="60"
HorizontalOptions="Center"
BackgroundColor="White">
BackgroundColor="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}">
<Image Source="{imageExtension:SfImageResource people_circle1.png}"
HorizontalOptions="Center"
WidthRequest="60"
@ -90,7 +90,7 @@
</badge:SfBadgeView>
<Label Text="Away"
TextColor="Black"
TextColor="{AppThemeBinding Light={StaticResource TextColourLight}, Dark={StaticResource TextColour}}"
HorizontalOptions="Center" />
</VerticalStackLayout>
@ -99,7 +99,7 @@
<badge:SfBadgeView WidthRequest="60"
HeightRequest="60"
HorizontalOptions="Center"
BackgroundColor="White">
BackgroundColor="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}">
<Image Source="{imageExtension:SfImageResource people_circle1.png}"
HorizontalOptions="Center"
WidthRequest="60"
@ -113,7 +113,7 @@
</badge:SfBadgeView>
<Label Text="Busy"
TextColor="Black"
TextColor="{AppThemeBinding Light={StaticResource TextColourLight}, Dark={StaticResource TextColour}}"
HorizontalOptions="Center" />
</VerticalStackLayout>
@ -122,7 +122,7 @@
<badge:SfBadgeView WidthRequest="60"
HeightRequest="60"
HorizontalOptions="Center"
BackgroundColor="White">
BackgroundColor="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}">
<Image Source="{imageExtension:SfImageResource people_circle1.png}"
HorizontalOptions="Center"
WidthRequest="60"
@ -136,7 +136,7 @@
</badge:SfBadgeView>
<Label Text="Delete"
TextColor="Black"
TextColor="{AppThemeBinding Light={StaticResource TextColourLight}, Dark={StaticResource TextColour}}"
HorizontalOptions="Center" />
</VerticalStackLayout>
@ -145,7 +145,7 @@
<badge:SfBadgeView WidthRequest="60"
HeightRequest="60"
HorizontalOptions="Center"
BackgroundColor="White">
BackgroundColor="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}">
<Image Source="{imageExtension:SfImageResource people_circle1.png}"
HorizontalOptions="Center"
WidthRequest="60"
@ -159,7 +159,7 @@
</badge:SfBadgeView>
<Label Text="Dot"
TextColor="Black"
TextColor="{AppThemeBinding Light={StaticResource TextColourLight}, Dark={StaticResource TextColour}}"
HorizontalOptions="Center" />
</VerticalStackLayout>
@ -168,7 +168,7 @@
<badge:SfBadgeView WidthRequest="60"
HeightRequest="60"
HorizontalOptions="Center"
BackgroundColor="White">
BackgroundColor="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}">
<Image Source="{imageExtension:SfImageResource people_circle1.png}"
HorizontalOptions="Center"
WidthRequest="60"
@ -182,7 +182,7 @@
</badge:SfBadgeView>
<Label Text="Prohibit1"
TextColor="Black"
TextColor="{AppThemeBinding Light={StaticResource TextColourLight}, Dark={StaticResource TextColour}}"
HorizontalOptions="Center" />
</VerticalStackLayout>
@ -191,7 +191,7 @@
<badge:SfBadgeView WidthRequest="60"
HeightRequest="60"
HorizontalOptions="Center"
BackgroundColor="White">
BackgroundColor="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}">
<Image Source="{imageExtension:SfImageResource people_circle1.png}"
HorizontalOptions="Center"
WidthRequest="60"
@ -205,7 +205,7 @@
</badge:SfBadgeView>
<Label Text="Prohibit2"
TextColor="Black"
TextColor="{AppThemeBinding Light={StaticResource TextColourLight}, Dark={StaticResource TextColour}}"
HorizontalOptions="Center" />
</VerticalStackLayout>
</Grid>

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

@ -6,11 +6,11 @@
x:Class="SampleBrowser.Maui.BadgeView.SfBadgeView.Offset">
<localCore:SampleView.Resources>
<Style x:Key="DemoLabelStyle" TargetType="Label">
<Style x:Key="DemoButtonStyle" TargetType="Button">
<Setter Property="FontSize" Value="18"/>
<Setter Property="VerticalOptions" Value="Center"/>
<Setter Property="HorizontalOptions" Value="Center"/>
<Setter Property="TextColor" Value="Black"/>
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource TileTextColourLight}, Dark={StaticResource TileTextColour}}"/>
</Style>
</localCore:SampleView.Resources>
@ -25,21 +25,22 @@
HorizontalOptions="Center"
WidthRequest="200"
HeightRequest="100">
<Grid BackgroundColor="#EEEEEE" Margin="5">
<Label Text="With Offset"
Style="{StaticResource DemoLabelStyle}"/>
</Grid>
<Button BackgroundColor="{AppThemeBinding Light={StaticResource FilledInputBackgroundLight}, Dark={StaticResource FilledInputBackground}}"
Margin="10" Text="With Offset"
Style="{StaticResource DemoButtonStyle}"
TextColor="{AppThemeBinding Light={StaticResource TileTextColourAlt1Light}, Dark={StaticResource TileTextColourAlt1}}"
CornerRadius="0"/>
<badge:SfBadgeView.BadgeSettings>
<badge:BadgeSettings Offset="-20,30"/>
</badge:SfBadgeView.BadgeSettings>
</badge:SfBadgeView>
<VerticalStackLayout Spacing="0">
<Label HorizontalTextAlignment="Center" Text="Horizontal Offset" Margin="0,20,0,0" />
<Slider Minimum="-30" Maximum="0" Value="-20" ValueChanged="Slider_ValueChanged" />
<Slider Minimum="-30" Maximum="0" Value="-20" ValueChanged="Slider_ValueChanged" MaximumTrackColor="{AppThemeBinding Light={StaticResource BorderLight}, Dark={StaticResource Border}}"/>
</VerticalStackLayout>
<VerticalStackLayout Spacing="0">
<Label HorizontalTextAlignment="Center" Text="Vertical Offset" />
<Slider Minimum="0" Maximum="45" Value="30" ValueChanged="Slider_ValueChanged1" />
<Slider Minimum="0" Maximum="45" Value="30" ValueChanged="Slider_ValueChanged1" MaximumTrackColor="{AppThemeBinding Light={StaticResource BorderLight}, Dark={StaticResource Border}}" />
</VerticalStackLayout>
</VerticalStackLayout>
</ScrollView>

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

@ -5,108 +5,114 @@
xmlns:localCore="clr-namespace:SampleBrowser.Maui.Base;assembly=SampleBrowser.Maui.Base"
x:Class="SampleBrowser.Maui.BadgeView.SfBadgeView.Position">
<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"/>
<Setter Property="TextColor" Value="Black"/>
</Style>
</localCore:SampleView.Resources>
<localCore:SampleView.Content>
<ScrollView HorizontalOptions="Center" HorizontalScrollBarVisibility="Never" VerticalScrollBarVisibility="Never">
<VerticalStackLayout MaximumWidthRequest='{OnPlatform iOS="380", Android="380", MacCatalyst="450", WinUI="450"}'
VerticalOptions="Center" HorizontalOptions="Center" Padding="10">
VerticalOptions="Center" HorizontalOptions="Center" Padding="10" >
<Grid RowDefinitions="80,80,80"
ColumnDefinitions='{OnPlatform WinUI="140,140,140", Default="*,*,*"}'>
<badge:SfBadgeView BadgeText="5">
<Grid BackgroundColor="#EEEEEE" Margin="10">
<Label Text="TopLeft"
Style="{StaticResource DemoLabelStyle}"/>
</Grid>
<badge:SfBadgeView.BadgeSettings>
ColumnDefinitions='{OnPlatform WinUI="140,140,140", Default="*,*,*"}' Margin="-5,0,0,0">
<badge:SfBadgeView BadgeText="5">
<Button BackgroundColor="{AppThemeBinding Light={StaticResource FilledInputBackgroundLight}, Dark={StaticResource FilledInputBackground}}"
Text="TopLeft"
Margin="10"
FontSize="16"
TextColor="{AppThemeBinding Light={StaticResource TileTextColourAlt1Light}, Dark={StaticResource TileTextColourAlt1}}"
CornerRadius="0" />
<badge:SfBadgeView.BadgeSettings>
<badge:BadgeSettings Position="TopLeft"/>
</badge:SfBadgeView.BadgeSettings>
</badge:SfBadgeView>
<badge:SfBadgeView Grid.Column="1"
<badge:SfBadgeView Grid.Column="1"
BadgeText="5">
<Grid BackgroundColor="#EEEEEE" Margin="10">
<Label Text="Top"
Style="{StaticResource DemoLabelStyle}"/>
</Grid>
<badge:SfBadgeView.BadgeSettings>
<Button BackgroundColor="{AppThemeBinding Light={StaticResource FilledInputBackgroundLight}, Dark={StaticResource FilledInputBackground}}"
Text="Top"
Margin="10"
FontSize="16"
TextColor="{AppThemeBinding Light={StaticResource TileTextColourAlt1Light}, Dark={StaticResource TileTextColourAlt1}}"
CornerRadius="0" />
<badge:SfBadgeView.BadgeSettings>
<badge:BadgeSettings Position="Top"/>
</badge:SfBadgeView.BadgeSettings>
</badge:SfBadgeView>
<badge:SfBadgeView Grid.Column="2"
<badge:SfBadgeView Grid.Column="2"
BadgeText="5">
<Grid BackgroundColor="#EEEEEE" Margin="10">
<Label Text="TopRight"
Style="{StaticResource DemoLabelStyle}"/>
</Grid>
<badge:SfBadgeView.BadgeSettings>
<Button BackgroundColor="{AppThemeBinding Light={StaticResource FilledInputBackgroundLight}, Dark={StaticResource FilledInputBackground}}"
Text="TopRight"
Margin="10"
FontSize="16"
TextColor="{AppThemeBinding Light={StaticResource TileTextColourAlt1Light}, Dark={StaticResource TileTextColourAlt1}}"
CornerRadius="0" />
<badge:SfBadgeView.BadgeSettings>
<badge:BadgeSettings Position="TopRight"/>
</badge:SfBadgeView.BadgeSettings>
</badge:SfBadgeView>
<badge:SfBadgeView Grid.Row="1"
<badge:SfBadgeView Grid.Row="1"
BadgeText="5">
<Grid BackgroundColor="#EEEEEE" Margin="10">
<Label Text="Left"
Style="{StaticResource DemoLabelStyle}"/>
</Grid>
<badge:SfBadgeView.BadgeSettings>
<Button BackgroundColor="{AppThemeBinding Light={StaticResource FilledInputBackgroundLight}, Dark={StaticResource FilledInputBackground}}"
Text="Left"
Margin="10"
FontSize="16"
TextColor="{AppThemeBinding Light={StaticResource TileTextColourAlt1Light}, Dark={StaticResource TileTextColourAlt1}}"
CornerRadius="0" />
<badge:SfBadgeView.BadgeSettings>
<badge:BadgeSettings Position="Left"/>
</badge:SfBadgeView.BadgeSettings>
</badge:SfBadgeView>
<badge:SfBadgeView Grid.Row="1"
<badge:SfBadgeView Grid.Row="1"
Grid.Column="2"
BadgeText="5">
<Grid BackgroundColor="#EEEEEE" Margin="10">
<Label Text="Right"
Style="{StaticResource DemoLabelStyle}"/>
</Grid>
<badge:SfBadgeView.BadgeSettings>
<Button BackgroundColor="{AppThemeBinding Light={StaticResource FilledInputBackgroundLight}, Dark={StaticResource FilledInputBackground}}"
Text="Right"
Margin="10"
FontSize="16"
TextColor="{AppThemeBinding Light={StaticResource TileTextColourAlt1Light}, Dark={StaticResource TileTextColourAlt1}}"
CornerRadius="0" />
<badge:SfBadgeView.BadgeSettings>
<badge:BadgeSettings Position="Right"/>
</badge:SfBadgeView.BadgeSettings>
</badge:SfBadgeView>
<badge:SfBadgeView Grid.Row="2"
BadgeText="5">
<Grid BackgroundColor="#EEEEEE" Margin="10">
<Label Text="BottomLeft"
Style="{StaticResource DemoLabelStyle}"/>
</Grid>
<badge:SfBadgeView.BadgeSettings>
<Button BackgroundColor="{AppThemeBinding Light={StaticResource FilledInputBackgroundLight}, Dark={StaticResource FilledInputBackground}}"
Text="BottomLeft"
Margin="10"
FontSize="16"
TextColor="{AppThemeBinding Light={StaticResource TileTextColourAlt1Light}, Dark={StaticResource TileTextColourAlt1}}"
CornerRadius="0" />
<badge:SfBadgeView.BadgeSettings>
<badge:BadgeSettings Position="BottomLeft"/>
</badge:SfBadgeView.BadgeSettings>
</badge:SfBadgeView>
<badge:SfBadgeView Grid.Row="2"
<badge:SfBadgeView Grid.Row="2"
Grid.Column="1"
BadgeText="5">
<Grid BackgroundColor="#EEEEEE" Margin="10">
<Label Text="Bottom"
Style="{StaticResource DemoLabelStyle}"/>
</Grid>
<badge:SfBadgeView.BadgeSettings>
<Button BackgroundColor="{AppThemeBinding Light={StaticResource FilledInputBackgroundLight}, Dark={StaticResource FilledInputBackground}}"
Text="Bottom"
Margin="10"
FontSize="16"
TextColor="{AppThemeBinding Light={StaticResource TileTextColourAlt1Light}, Dark={StaticResource TileTextColourAlt1}}"
CornerRadius="0" />
<badge:SfBadgeView.BadgeSettings>
<badge:BadgeSettings Position="Bottom"/>
</badge:SfBadgeView.BadgeSettings>
</badge:SfBadgeView>
<badge:SfBadgeView Grid.Row="2"
<badge:SfBadgeView Grid.Row="2"
Grid.Column="2"
BadgeText="5">
<Grid BackgroundColor="#EEEEEE" Margin="10">
<Label Text="BottomRight" Margin="{OnPlatform Android=5}"
Style="{StaticResource DemoLabelStyle}"/>
</Grid>
<badge:SfBadgeView.BadgeSettings>
<Button BackgroundColor="{AppThemeBinding Light={StaticResource FilledInputBackgroundLight}, Dark={StaticResource FilledInputBackground}}"
Text="BottomRight"
Margin="10"
FontSize="16"
TextColor="{AppThemeBinding Light={StaticResource TileTextColourAlt1Light}, Dark={StaticResource TileTextColourAlt1}}"
CornerRadius="0"/>
<badge:SfBadgeView.BadgeSettings>
<badge:BadgeSettings Position="BottomRight"/>
</badge:SfBadgeView.BadgeSettings>
</badge:SfBadgeView>

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

@ -18,7 +18,7 @@
WidthRequest='{OnPlatform MacCatalyst="90", iOS="90", Default="80"}'
HeightRequest="80"
BadgeText="99"
BackgroundColor="White">
BackgroundColor="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}">
<Grid RowDefinitions="*,20">
<Image Source="{imageExtension:SfImageResource facebook.png}"
HorizontalOptions="Center"
@ -27,13 +27,13 @@
VerticalOptions="Start" />
<Label Grid.Row="1"
Text="Success"
TextColor="Black"
TextColor="{AppThemeBinding Light={StaticResource TextColourLight}, Dark={StaticResource TextColour}}"
HorizontalOptions="Center"
VerticalOptions="End"/>
</Grid>
<badge:SfBadgeView.BadgeSettings>
<badge:BadgeSettings Type="Success"
Stroke="White"
Stroke="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}"
StrokeThickness="2"
FontSize="15"/>
</badge:SfBadgeView.BadgeSettings>
@ -44,7 +44,7 @@
WidthRequest='{OnPlatform MacCatalyst="90", iOS="90", Default="80"}'
HeightRequest="80"
BadgeText="99"
BackgroundColor="White">
BackgroundColor="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}">
<Grid RowDefinitions="*,20">
<Image Source="{imageExtension:SfImageResource facebook.png}"
HorizontalOptions="Center"
@ -53,13 +53,13 @@
VerticalOptions="Start" />
<Label Grid.Row="1"
Text="Dark"
TextColor="Black"
TextColor="{AppThemeBinding Light={StaticResource TextColourLight}, Dark={StaticResource TextColour}}"
HorizontalOptions="Center"
VerticalOptions="End"/>
</Grid>
<badge:SfBadgeView.BadgeSettings>
<badge:BadgeSettings Type="Dark"
Stroke="White"
Stroke="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}"
StrokeThickness="2"
FontSize="15"/>
</badge:SfBadgeView.BadgeSettings>
@ -70,7 +70,7 @@
WidthRequest='{OnPlatform MacCatalyst="90", iOS="90", Default="80"}'
HeightRequest="80"
BadgeText="99"
BackgroundColor="White">
BackgroundColor="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}">
<Grid RowDefinitions="*,20">
<Image Source="{imageExtension:SfImageResource facebook.png}"
HorizontalOptions="Center"
@ -79,13 +79,13 @@
VerticalOptions="Start" />
<Label Grid.Row="1"
Text="Info"
TextColor="Black"
TextColor="{AppThemeBinding Light={StaticResource TextColourLight}, Dark={StaticResource TextColour}}"
HorizontalOptions="Center"
VerticalOptions="End"/>
</Grid>
<badge:SfBadgeView.BadgeSettings>
<badge:BadgeSettings Type="Info"
Stroke="White"
Stroke="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}"
StrokeThickness="2"
FontSize="15"/>
</badge:SfBadgeView.BadgeSettings>
@ -96,7 +96,7 @@
WidthRequest='{OnPlatform MacCatalyst="90", iOS="90", Default="80"}'
HeightRequest="80"
BadgeText="99"
BackgroundColor="White">
BackgroundColor="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}">
<Grid RowDefinitions="*,20">
<Image Source="{imageExtension:SfImageResource facebook.png}"
HorizontalOptions="Center"
@ -105,16 +105,15 @@
VerticalOptions="Start" />
<Label Grid.Row="1"
Text="Light"
TextColor="Black"
TextColor="{AppThemeBinding Light={StaticResource TextColourLight}, Dark={StaticResource TextColour}}"
HorizontalOptions="Center"
VerticalOptions="End"/>
</Grid>
<badge:SfBadgeView.BadgeSettings>
<badge:BadgeSettings TextColor="Black"
Type="Light"
Stroke="Black"
StrokeThickness="1"
FontSize="15"/>
<badge:BadgeSettings Type="Light"
Stroke="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}"
StrokeThickness="1"
FontSize="15"/>
</badge:SfBadgeView.BadgeSettings>
</badge:SfBadgeView>
@ -123,7 +122,7 @@
WidthRequest='{OnPlatform MacCatalyst="90", iOS="90", Default="80"}'
HeightRequest="80"
BadgeText="99"
BackgroundColor="White">
BackgroundColor="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}">
<Grid RowDefinitions="*,20">
<Image Source="{imageExtension:SfImageResource facebook.png}"
HorizontalOptions="Center"
@ -132,13 +131,13 @@
VerticalOptions="Start" />
<Label Grid.Row="1"
Text="Primary"
TextColor="Black"
TextColor="{AppThemeBinding Light={StaticResource TextColourLight}, Dark={StaticResource TextColour}}"
HorizontalOptions="Center"
VerticalOptions="End"/>
</Grid>
<badge:SfBadgeView.BadgeSettings>
<badge:BadgeSettings Type="Primary"
Stroke="White"
Stroke="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}"
StrokeThickness="2"
FontSize="15"/>
</badge:SfBadgeView.BadgeSettings>
@ -149,7 +148,7 @@
Grid.Column="2" WidthRequest='{OnPlatform MacCatalyst="90", iOS="90", Default="80"}'
HeightRequest="80"
BadgeText="99"
BackgroundColor="White">
BackgroundColor="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}">
<Grid RowDefinitions="*,20" ColumnDefinitions="Auto">
<Image Grid.Row="0" Source="{imageExtension:SfImageResource facebook.png}"
HorizontalOptions="Center"
@ -159,13 +158,13 @@
<Label Grid.Row="1"
Text="Secondary"
FontSize="13"
TextColor="Black"
TextColor="{AppThemeBinding Light={StaticResource TextColourLight}, Dark={StaticResource TextColour}}"
HorizontalOptions="Center"
VerticalOptions="End"/>
</Grid>
<badge:SfBadgeView.BadgeSettings>
<badge:BadgeSettings Type="Secondary"
Stroke="White"
Stroke="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}"
StrokeThickness="2"
FontSize="15"/>
</badge:SfBadgeView.BadgeSettings>
@ -178,7 +177,7 @@
WidthRequest='{OnPlatform MacCatalyst="90", iOS="90", Default="80"}'
HeightRequest="80"
BadgeText="99"
BackgroundColor="White">
BackgroundColor="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}">
<Grid RowDefinitions="*,20">
<Image Source="{imageExtension:SfImageResource facebook.png}"
HorizontalOptions="Center"
@ -187,13 +186,13 @@
VerticalOptions="Start" />
<Label Grid.Row="1"
Text="Warning"
TextColor="Black"
TextColor="{AppThemeBinding Light={StaticResource TextColourLight}, Dark={StaticResource TextColour}}"
HorizontalOptions="Center"
VerticalOptions="End"/>
</Grid>
<badge:SfBadgeView.BadgeSettings>
<badge:BadgeSettings Type="Warning"
Stroke="White"
Stroke="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}"
StrokeThickness="2"
FontSize="15"/>
</badge:SfBadgeView.BadgeSettings>
@ -204,7 +203,7 @@
WidthRequest='{OnPlatform MacCatalyst="90", iOS="90", Default="80"}'
HeightRequest="80"
BadgeText="99"
BackgroundColor="White">
BackgroundColor="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}">
<Grid RowDefinitions="*,20">
<Image Source="{imageExtension:SfImageResource facebook.png}"
HorizontalOptions="Center"
@ -213,13 +212,13 @@
VerticalOptions="Start" />
<Label Grid.Row="1"
Text="Error"
TextColor="Black"
TextColor="{AppThemeBinding Light={StaticResource TextColourLight}, Dark={StaticResource TextColour}}"
HorizontalOptions="Center"
VerticalOptions="End"/>
</Grid>
<badge:SfBadgeView.BadgeSettings>
<badge:BadgeSettings Type="Error"
Stroke="White"
Stroke="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}"
StrokeThickness="2"
FontSize="15"/>
</badge:SfBadgeView.BadgeSettings>
@ -230,7 +229,7 @@
WidthRequest='{OnPlatform MacCatalyst="90", iOS="90", Default="80"}'
HeightRequest="80"
BadgeText="99"
BackgroundColor="White">
BackgroundColor="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}">
<Grid RowDefinitions="*,20">
<Image Source="{imageExtension:SfImageResource facebook.png}"
HorizontalOptions="Center"
@ -239,14 +238,14 @@
VerticalOptions="Start" />
<Label Grid.Row="1"
Text="None"
TextColor="Black"
TextColor="{AppThemeBinding Light={StaticResource TextColourLight}, Dark={StaticResource TextColour}}"
HorizontalOptions="Center"
VerticalOptions="End"/>
</Grid>
<badge:SfBadgeView.BadgeSettings>
<badge:BadgeSettings Type="None"
Background="DeepPink"
Stroke="White"
Stroke="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}"
StrokeThickness="2"
FontSize="15"/>
</badge:SfBadgeView.BadgeSettings>

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

@ -6,7 +6,7 @@
xmlns:localCore="clr-namespace:SampleBrowser.Maui.Base;assembly=SampleBrowser.Maui.Base"
xmlns:imageExtension="clr-namespace:SampleBrowser.Maui.Base.Converters;assembly=SampleBrowser.Maui.Base"
xmlns:local="clr-namespace:SampleBrowser.Maui.BadgeView.SfBadgeView"
BackgroundColor="White">
BackgroundColor="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}">
<localCore:SampleView.Resources>
<imageExtension:SfImageSourceConverter x:Key="imageConverter"/>
</localCore:SampleView.Resources>
@ -15,14 +15,14 @@
</localCore:SampleView.BindingContext>
<localCore:SampleView.Content>
<Grid BackgroundColor="#f7f7f7">
<Grid BackgroundColor="#f7f7f7" WidthRequest="{OnPlatform WinUI=400,MacCatalyst=400}">
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition Height="70"/>
</Grid.RowDefinitions>
<ScrollView HorizontalScrollBarVisibility="Never" VerticalScrollBarVisibility="Never">
<VerticalStackLayout x:Name="listView"
BackgroundColor="White"
BackgroundColor="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}"
BindableLayout.ItemsSource="{Binding Collection}">
<BindableLayout.ItemTemplate>
<DataTemplate>
@ -53,13 +53,13 @@
</Grid.RowDefinitions>
<Label LineBreakMode="NoWrap"
TextColor="Black"
TextColor="{AppThemeBinding Light={StaticResource TileTextColourLight}, Dark={StaticResource TileTextColour}}"
VerticalOptions="End"
FontSize="{OnIdiom Phone='16',Desktop='20',Tablet='18'}"
Text="{Binding Name}" />
<Label Grid.Row="1"
Grid.Column="0"
TextColor="#777777"
TextColor="{AppThemeBinding Light={StaticResource TileTextColourAlt1Light}, Dark={StaticResource TileTextColourAlt1}}"
VerticalOptions="Start"
LineBreakMode="NoWrap"
FontSize="12"
@ -77,7 +77,7 @@
Margin="0,0,10,0"
HorizontalOptions="Center"
VerticalOptions="Center"
TextColor="Black"
TextColor="{AppThemeBinding Light={StaticResource TextColourLight}, Dark={StaticResource TextColour}}"
FontSize="12"
Text="{Binding Time}" />
<badge:SfBadgeView HeightRequest="26" BadgeText="{Binding Count}" Grid.Row="1">
@ -90,7 +90,7 @@
</badge:SfBadgeView>
</Grid>
</Grid>
<StackLayout Grid.Row="1" BackgroundColor="#E4E4E4" HeightRequest="1"/>
<StackLayout Grid.Row="1" BackgroundColor="{AppThemeBinding Light={StaticResource BorderLight}, Dark={StaticResource Border}}" HeightRequest="1"/>
</Grid>
</DataTemplate>
@ -98,7 +98,7 @@
</VerticalStackLayout>
</ScrollView>
<Grid Grid.Row="1" HorizontalOptions="FillAndExpand"
VerticalOptions="FillAndExpand" BackgroundColor="#f7f7f7">
VerticalOptions="FillAndExpand" BackgroundColor="{AppThemeBinding Light={StaticResource FilledInputBackgroundLight}, Dark={StaticResource TileBackground}}">
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
@ -113,25 +113,20 @@
<RowDefinition Height="20" />
</Grid.RowDefinitions>
<Label Text="&#xe703;"
<Label Text="&#xe721;"
HorizontalOptions="FillAndExpand"
HorizontalTextAlignment="Center"
VerticalOptions="End"
FontAttributes="Bold"
TextColor="#777777"
FontSize="28">
<Label.FontFamily>
<OnPlatform x:TypeArguments="x:String" >
<On Platform="iOS,MacCatalyst" Value="FONT Sf Badge view" />
<On Platform="WinUI" Value="BadgeViewFont.ttf#FONT Sf Badge view" />
<On Platform="Android" Value="BadgeViewFont.ttf#FONT Sf Badge view" />
</OnPlatform>
</Label.FontFamily>
TextColor="{AppThemeBinding Light={StaticResource IconColourLight}, Dark={StaticResource IconColour}}"
FontSize="28"
FontFamily="MauiSampleFontIcon">
</Label>
<Label Grid.Row="1" FontSize="12" HorizontalTextAlignment="Center"
VerticalTextAlignment="Center" Margin="0,-5,0,0" Text="Status"
TextColor="#777777"/>
TextColor="{AppThemeBinding Light={StaticResource PlaceholderTextColourLight}, Dark={StaticResource PlaceholderTextColour}}"/>
</Grid>
<Grid x:Name="callsBadgeGrid" Grid.Column="1" HorizontalOptions="Center">
@ -145,19 +140,13 @@
HorizontalOptions="Center"
BadgeText="3">
<Grid WidthRequest="60">
<Label Text="&#xe700;"
<Label Text="&#xe763;"
FontAttributes="Bold"
HorizontalOptions="Center"
VerticalOptions="End"
TextColor="#777777"
FontSize="28">
<Label.FontFamily>
<OnPlatform x:TypeArguments="x:String" >
<On Platform="iOS,MacCatalyst" Value="FONT Sf Badge view" />
<On Platform="WinUI" Value="BadgeViewFont.ttf#FONT Sf Badge view" />
<On Platform="Android" Value="BadgeViewFont.ttf#FONT Sf Badge view" />
</OnPlatform>
</Label.FontFamily>
TextColor="{AppThemeBinding Light={StaticResource IconColourLight}, Dark={StaticResource IconColour}}"
FontSize="28"
FontFamily="MauiSampleFontIcon">
</Label>
</Grid>
<badge:SfBadgeView.BadgeSettings>
@ -170,7 +159,7 @@
<Label Text="Calls" Grid.Row="1" Margin="-8,-5,0,0"
FontSize="12" HorizontalTextAlignment="Center"
VerticalTextAlignment="Center" TextColor="#777777"/>
VerticalTextAlignment="Center" TextColor="{AppThemeBinding Light={StaticResource PlaceholderTextColourLight}, Dark={StaticResource PlaceholderTextColour}}"/>
</Grid>
<Grid x:Name="chatBadgeGrid" Grid.Column="3" HorizontalOptions="Center">
@ -184,84 +173,65 @@
HorizontalOptions="Center"
BadgeText="8">
<Grid WidthRequest="60" >
<Label Text="&#xe701;"
<Label Text="&#xe7b8;"
FontAttributes="Bold"
HorizontalOptions="Center"
HorizontalTextAlignment="Center"
VerticalOptions="End"
TextColor="#777777"
FontSize="28">
<Label.FontFamily>
<OnPlatform x:TypeArguments="x:String" >
<On Platform="iOS,MacCatalyst" Value="FONT Sf Badge view" />
<On Platform="WinUI" Value="BadgeViewFont.ttf#FONT Sf Badge view" />
<On Platform="Android" Value="BadgeViewFont.ttf#FONT Sf Badge view" />
</OnPlatform>
</Label.FontFamily>
TextColor="{AppThemeBinding Light={StaticResource IconColourLight}, Dark={StaticResource IconColour}}"
FontSize="28"
FontFamily="MauiSampleFontIcon">
</Label>
</Grid>
<badge:SfBadgeView.BadgeSettings>
<badge:BadgeSettings FontSize="12"
Offset="-4,10"
Type="Error"
Animation="Scale">
Type="Error">
</badge:BadgeSettings>
</badge:SfBadgeView.BadgeSettings>
</badge:SfBadgeView>
<Label Text="Chats" Grid.Row="1" Margin="0,-5,0,0"
FontSize="12" HorizontalTextAlignment="Center"
VerticalTextAlignment="Center" TextColor="#777777"/>
VerticalTextAlignment="Center" TextColor="{AppThemeBinding Light={StaticResource PlaceholderTextColourLight}, Dark={StaticResource PlaceholderTextColour}}"/>
</Grid>
<Grid Grid.Column="2" BackgroundColor="#f7f7f7" HorizontalOptions="Center">
<Grid Grid.Column="2" HorizontalOptions="Center">
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition Height="20"/>
</Grid.RowDefinitions>
<Label x:Name="fontIconLabel2" Text="&#xe702;"
FontAttributes="Bold" TextColor="#777777"
<Label x:Name="fontIconLabel2" Text="&#xe76d;"
FontAttributes="Bold" TextColor="{AppThemeBinding Light={StaticResource IconColourLight}, Dark={StaticResource IconColour}}"
FontSize="28" HorizontalOptions="FillAndExpand"
HorizontalTextAlignment="Center"
VerticalOptions="End">
<Label.FontFamily>
<OnPlatform x:TypeArguments="x:String" >
<On Platform="iOS,MacCatalyst" Value="FONT Sf Badge view" />
<On Platform="WinUI" Value="BadgeViewFont.ttf#FONT Sf Badge view" />
<On Platform="Android" Value="BadgeViewFont.ttf#FONT Sf Badge view" />
</OnPlatform>
</Label.FontFamily>
VerticalOptions="End"
FontFamily="MauiSampleFontIcon">
</Label>
<Label Text="Camera" Grid.Row="1" FontSize="12" Margin="0,-5,0,0"
HorizontalTextAlignment="Center" VerticalTextAlignment="Center"
TextColor="#777777"/>
TextColor="{AppThemeBinding Light={StaticResource PlaceholderTextColourLight}, Dark={StaticResource PlaceholderTextColour}}"/>
</Grid>
<Grid Grid.Column="4" BackgroundColor="#f7f7f7" HorizontalOptions="Center">
<Grid Grid.Column="4" HorizontalOptions="Center">
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition Height="20"/>
</Grid.RowDefinitions>
<Label x:Name="fontIconLabel4"
Text="&#xe704;" FontAttributes="Bold"
TextColor="#777777" FontSize="28"
Text="&#xe73b;" FontAttributes="Bold"
TextColor="{AppThemeBinding Light={StaticResource IconColourLight}, Dark={StaticResource IconColour}}" FontSize="28"
HorizontalOptions="FillAndExpand"
HorizontalTextAlignment="Center"
VerticalOptions="End">
<Label.FontFamily>
<OnPlatform x:TypeArguments="x:String" >
<On Platform="iOS,MacCatalyst" Value="FONT Sf Badge view" />
<On Platform="WinUI" Value="BadgeViewFont.ttf#FONT Sf Badge view" />
<On Platform="Android" Value="BadgeViewFont.ttf#FONT Sf Badge view" />
</OnPlatform>
</Label.FontFamily>
VerticalOptions="End"
FontFamily="MauiSampleFontIcon">
</Label>
<Label Text="Settings" Grid.Row="1" FontSize="12" Margin="0,-5,0,0"
HorizontalTextAlignment="Center" VerticalTextAlignment="Center"
TextColor="#777777"/>
TextColor="{AppThemeBinding Light={StaticResource PlaceholderTextColourLight}, Dark={StaticResource PlaceholderTextColour}}"/>
</Grid>
</Grid>
</Grid>

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

@ -3,11 +3,13 @@
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:SampleBrowser.Maui.Barcode"
xmlns:base="clr-namespace:SampleBrowser.Maui.Base;assembly=SampleBrowser.Maui.Base"
xmlns:syncTheme="clr-namespace:Syncfusion.Maui.Themes;assembly=Syncfusion.Maui.Core"
x:Class="SampleBrowser.Maui.Barcode.App">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<base:SampleBrowserStyles/>
<syncTheme:SyncfusionThemeResourceDictionary />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>

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

@ -78,10 +78,12 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="SampleBrowser.Maui.Base" version="24.2.3" />
<PackageReference Include="Syncfusion.Maui.Core" version="24.2.3" />
<PackageReference Include="Syncfusion.Maui.TabView" version="24.2.3" />
<PackageReference Include="Syncfusion.Maui.Barcode" version="24.2.3" />
<PackageReference Include="SampleBrowser.Maui.Base" version="25.1.35" />
<PackageReference Include="Syncfusion.Maui.Core" version="25.1.35" />
<PackageReference Include="Syncfusion.Maui.Inputs" version="25.1.35" />
<PackageReference Include="Syncfusion.Maui.TabView" version="25.1.35" />
<PackageReference Include="Syncfusion.Maui.Barcode" version="25.1.35" />
<PackageReference Include="Syncfusion.Maui.Buttons" version="25.1.35" />
</ItemGroup>
<ItemGroup>

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

@ -4,7 +4,7 @@
xmlns:localCore="clr-namespace:SampleBrowser.Maui.Base;assembly=SampleBrowser.Maui.Base"
xmlns:barcode="clr-namespace:Syncfusion.Maui.Barcode;assembly=Syncfusion.Maui.Barcode"
x:Class="SampleBrowser.Maui.Barcode.SfBarcodeGenerator.BoardingPass"
Background="White">
Background="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}">
<localCore:SampleView.Content>
@ -61,7 +61,7 @@
</StackLayout>
<Frame BackgroundColor="White"
<Frame BackgroundColor="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}"
CornerRadius="30"
Margin="0,20">
<StackLayout>
@ -140,7 +140,7 @@
WidthRequest="270"
HorizontalOptions="Center"
VerticalOptions="Center"
BackgroundColor="White">
BackgroundColor="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}">
<barcode:SfBarcodeGenerator.Symbology>
<barcode:Code128 Module="1" />
</barcode:SfBarcodeGenerator.Symbology>

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

@ -4,7 +4,7 @@
xmlns:localCore="clr-namespace:SampleBrowser.Maui.Base;assembly=SampleBrowser.Maui.Base"
xmlns:barcode="clr-namespace:Syncfusion.Maui.Barcode;assembly=Syncfusion.Maui.Barcode"
x:Class="SampleBrowser.Maui.Barcode.SfBarcodeGenerator.DataMatrix"
Background="White">
Background="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}">
<localCore:SampleView.Content>
<Grid HorizontalOptions="Center" VerticalOptions="Center">
<barcode:SfBarcodeGenerator x:Name="barcodeGenerator" Value="http://www.syncfusion.com"
@ -18,7 +18,6 @@
</localCore:SampleView.Content>
<localCore:SampleView.OptionView >
<ContentView>
<StackLayout>
<Grid Margin="20,0,0,0">
<Grid.ColumnDefinitions>
<ColumnDefinition/>
@ -36,6 +35,8 @@
Grid.ColumnSpan="2"
Margin="0,10,0,0"
Text="http://www.syncfusion.com"
TextColor="{AppThemeBinding Dark={StaticResource TextColour}, Light={StaticResource TextColourLight}}"
BackgroundColor="{AppThemeBinding Light={StaticResource SampleBrowserBackgroundLight}, Dark={StaticResource SampleBrowserBackground}}"
TextChanged="inputValueEntry_TextChanged"/>
<Label x:Name="warningLabel"
Grid.Row="2"
@ -46,7 +47,6 @@
VerticalOptions="Start"
LineBreakMode="WordWrap"/>
</Grid>
</StackLayout>
</ContentView>
</localCore:SampleView.OptionView>
</localCore:SampleView>

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

@ -4,7 +4,7 @@
xmlns:localCore="clr-namespace:SampleBrowser.Maui.Base;assembly=SampleBrowser.Maui.Base"
x:Class="SampleBrowser.Maui.Barcode.SfBarcodeGenerator.OneDimensional"
xmlns:barcode="clr-namespace:Syncfusion.Maui.Barcode;assembly=Syncfusion.Maui.Barcode"
Background="White">
Background="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}">
<localCore:SampleView.Content>
<ScrollView HorizontalOptions="Center">
<StackLayout HorizontalOptions="Center">
@ -34,14 +34,14 @@
<Label Text="Codabar"
Margin='{OnPlatform Default="0,5,0,0", Android="0"}'
LineBreakMode="WordWrap"
TextColor="#DE000000"
TextColor="{AppThemeBinding Light={StaticResource TileTextColourLight}, Dark={StaticResource TileTextColour}}"
FontFamily="Roboto-Medium"
FontSize="{OnPlatform Android={OnIdiom Phone=15, Tablet=22}, iOS=16, WinUI=16}" />
<Label Text="Supports 0-9,-,$,:,/,.,+ "
Grid.Row="1"
LineBreakMode="WordWrap"
Margin='{OnPlatform Android="0,5,5,0", Default="0,5,0,0"}'
TextColor="#99000000"
TextColor="{AppThemeBinding Light={StaticResource TileTextColourAlt1Light}, Dark={StaticResource TileTextColourAlt1}}"
LineHeight="1.2"
FontFamily="Roboto-Regular"
FontSize="{OnPlatform Android={OnIdiom Phone=13, Tablet=13}, iOS=14, WinUI=14}" />
@ -77,14 +77,14 @@
<Label Text="Code39"
Margin='{OnPlatform Default="0,5,0,0", Android="0"}'
LineBreakMode="WordWrap"
TextColor="#DE000000"
TextColor="{AppThemeBinding Light={StaticResource TileTextColourLight}, Dark={StaticResource TileTextColour}}"
FontFamily="Roboto-Medium"
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"
Margin='{OnPlatform Android="0,5,5,0", Default="0,5,0,0"}'
TextColor="#99000000"
TextColor="{AppThemeBinding Light={StaticResource TileTextColourAlt1Light}, Dark={StaticResource TileTextColourAlt1}}"
LineHeight="1.2"
FontFamily="Roboto-Regular"
FontSize="{OnPlatform Android={OnIdiom Phone=13, Tablet=13}, iOS=14, WinUI=14}" />
@ -120,14 +120,14 @@
<Label Text="Code39 Extended"
Margin='{OnPlatform Default="0,5,0,0", Android="0"}'
LineBreakMode="WordWrap"
TextColor="#DE000000"
TextColor="{AppThemeBinding Light={StaticResource TileTextColourLight}, Dark={StaticResource TileTextColour}}"
FontFamily="Roboto-Medium"
FontSize="{OnPlatform Android={OnIdiom Phone=15, Tablet=22}, iOS=16, WinUI=16}" />
<Label Text="Supports only ASCII characters"
Grid.Row="1"
LineBreakMode="WordWrap"
Margin='{OnPlatform Android="0,5,5,0", Default="0,5,0,0"}'
TextColor="#99000000"
TextColor="{AppThemeBinding Light={StaticResource TileTextColourAlt1Light}, Dark={StaticResource TileTextColourAlt1}}"
LineHeight="1.2"
FontFamily="Roboto-Regular"
FontSize="{OnPlatform Android={OnIdiom Phone=13, Tablet=13}, iOS=14, WinUI=14}" />
@ -163,14 +163,14 @@
<Label Text="Code93"
Margin='{OnPlatform Default="0,5,0,0", Android="0"}'
LineBreakMode="WordWrap"
TextColor="#DE000000"
TextColor="{AppThemeBinding Light={StaticResource TileTextColourLight}, Dark={StaticResource TileTextColour}}"
FontFamily="Roboto-Medium"
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"
Margin='{OnPlatform Android="0,5,5,0", Default="0,5,0,0"}'
TextColor="#99000000"
TextColor="{AppThemeBinding Light={StaticResource TileTextColourAlt1Light}, Dark={StaticResource TileTextColourAlt1}}"
LineHeight="1.2"
FontFamily="Roboto-Regular"
FontSize="{OnPlatform Android={OnIdiom Phone=13, Tablet=13}, iOS=14, WinUI=14}" />
@ -206,14 +206,14 @@
<Label Text="Code128"
Margin='{OnPlatform Default="0,5,0,0", Android="0"}'
LineBreakMode="WordWrap"
TextColor="#DE000000"
TextColor="{AppThemeBinding Light={StaticResource TileTextColourLight}, Dark={StaticResource TileTextColour}}"
FontFamily="Roboto-Medium"
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"
TextColor="{AppThemeBinding Light={StaticResource TileTextColourAlt1Light}, Dark={StaticResource TileTextColourAlt1}}"
FontFamily="Roboto-Regular"
FontSize="{OnPlatform Android={OnIdiom Phone=13, Tablet=13}, iOS=14, WinUI=14}" />
</Grid>
@ -248,14 +248,14 @@
<Label Text="Code128A"
Margin='{OnPlatform Default="0,5,0,0", Android="0"}'
LineBreakMode="WordWrap"
TextColor="#DE000000"
TextColor="{AppThemeBinding Light={StaticResource TileTextColourLight}, Dark={StaticResource TileTextColour}}"
FontFamily="Roboto-Medium"
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"
Margin='{OnPlatform Android="0,5,5,0", Default="0,5,0,0"}'
TextColor="#99000000"
TextColor="{AppThemeBinding Light={StaticResource TileTextColourAlt1Light}, Dark={StaticResource TileTextColourAlt1}}"
LineHeight="1.2"
FontFamily="Roboto-Regular"
FontSize="{OnPlatform Android={OnIdiom Phone=13, Tablet=13}, iOS=14, WinUI=14}" />
@ -291,14 +291,14 @@
<Label Text="Code128B"
Margin='{OnPlatform Default="0,5,0,0", Android="0"}'
LineBreakMode="WordWrap"
TextColor="#DE000000"
TextColor="{AppThemeBinding Light={StaticResource TileTextColourLight}, Dark={StaticResource TileTextColour}}"
FontFamily="Roboto-Medium"
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"
Margin='{OnPlatform Android="0,5,5,0", Default="0,5,0,0"}'
TextColor="#99000000"
TextColor="{AppThemeBinding Light={StaticResource TileTextColourAlt1Light}, Dark={StaticResource TileTextColourAlt1}}"
LineHeight="1.2"
FontFamily="Roboto-Regular"
FontSize="{OnPlatform Android={OnIdiom Phone=13, Tablet=13}, iOS=14, WinUI=14}" />
@ -334,14 +334,14 @@
<Label Text="Code128C"
Margin='{OnPlatform Default="0,5,0,0", Android="0"}'
LineBreakMode="WordWrap"
TextColor="#DE000000"
TextColor="{AppThemeBinding Light={StaticResource TileTextColourLight}, Dark={StaticResource TileTextColour}}"
FontFamily="Roboto-Medium"
FontSize="{OnPlatform Android={OnIdiom Phone=15, Tablet=22}, iOS=16, WinUI=16}" />
<Label Text="Support even number of digits"
Grid.Row="1"
LineBreakMode="WordWrap"
Margin='{OnPlatform Android="0,5,5,0", Default="0,5,0,0"}'
TextColor="#99000000"
TextColor="{AppThemeBinding Light={StaticResource TileTextColourAlt1Light}, Dark={StaticResource TileTextColourAlt1}}"
LineHeight="1.2"
FontFamily="Roboto-Regular"
FontSize="{OnPlatform Android={OnIdiom Phone=13, Tablet=13}, iOS=14, WinUI=14}" />
@ -377,14 +377,14 @@
<Label Text="UPC-A"
Margin='{OnPlatform Default="0,5,0,0", Android="0"}'
LineBreakMode="WordWrap"
TextColor="#DE000000"
TextColor="{AppThemeBinding Light={StaticResource TileTextColourLight}, Dark={StaticResource TileTextColour}}"
FontFamily="Roboto-Medium"
FontSize="{OnPlatform Android={OnIdiom Phone=15, Tablet=22}, iOS=16, WinUI=16}" />
<Label Text="Supports 11 numbers as input"
Grid.Row="1"
LineBreakMode="WordWrap"
Margin='{OnPlatform Android="0,5,5,0", Default="0,5,0,0"}'
TextColor="#99000000"
TextColor="{AppThemeBinding Light={StaticResource TileTextColourAlt1Light}, Dark={StaticResource TileTextColourAlt1}}"
LineHeight="1.2"
FontFamily="Roboto-Regular"
FontSize="{OnPlatform Android={OnIdiom Phone=13, Tablet=13}, iOS=14, WinUI=14}" />
@ -420,14 +420,14 @@
<Label Text="UPC-E"
Margin='{OnPlatform Default="0,5,0,0", Android="0"}'
LineBreakMode="WordWrap"
TextColor="#DE000000"
TextColor="{AppThemeBinding Light={StaticResource TileTextColourLight}, Dark={StaticResource TileTextColour}}"
FontFamily="Roboto-Medium"
FontSize="{OnPlatform Android={OnIdiom Phone=15, Tablet=22}, iOS=16, WinUI=16}" />
<Label Text="Supports 6 numbers as input"
Grid.Row="1"
LineBreakMode="WordWrap"
Margin='{OnPlatform Android="0,5,5,0", Default="0,5,0,0"}'
TextColor="#99000000"
TextColor="{AppThemeBinding Light={StaticResource TileTextColourAlt1Light}, Dark={StaticResource TileTextColourAlt1}}"
LineHeight="1.2"
FontFamily="Roboto-Regular"
FontSize="{OnPlatform Android={OnIdiom Phone=13, Tablet=13}, iOS=14, WinUI=14}" />
@ -463,14 +463,14 @@
<Label Text="EAN-8"
Margin='{OnPlatform Default="0,5,0,0", Android="0"}'
LineBreakMode="WordWrap"
TextColor="#DE000000"
TextColor="{AppThemeBinding Light={StaticResource TileTextColourLight}, Dark={StaticResource TileTextColour}}"
FontFamily="Roboto-Medium"
FontSize="{OnPlatform Android={OnIdiom Phone=15, Tablet=22}, iOS=16, WinUI=16}" />
<Label Text="Supports 8 numbers as input"
Grid.Row="1"
LineBreakMode="WordWrap"
Margin='{OnPlatform Android="0,5,5,0", Default="0,5,0,0"}'
TextColor="#99000000"
TextColor="{AppThemeBinding Light={StaticResource TileTextColourAlt1Light}, Dark={StaticResource TileTextColourAlt1}}"
LineHeight="1.2"
FontFamily="Roboto-Regular"
FontSize="{OnPlatform Android={OnIdiom Phone=13, Tablet=13}, iOS=14, WinUI=14}" />
@ -506,14 +506,14 @@
<Label Text="EAN-13"
Margin='{OnPlatform Default="0,5,0,0", Android="0"}'
LineBreakMode="WordWrap"
TextColor="#DE000000"
TextColor="{AppThemeBinding Light={StaticResource TileTextColourLight}, Dark={StaticResource TileTextColour}}"
FontFamily="Roboto-Medium"
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"
TextColor="{AppThemeBinding Light={StaticResource TileTextColourAlt1Light}, Dark={StaticResource TileTextColourAlt1}}"
FontSize="{OnPlatform Android={OnIdiom Phone=13, Tablet=13}, iOS=14, WinUI=14}" />
</Grid>
</Grid>

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

@ -5,14 +5,14 @@
x:Class="SampleBrowser.Maui.Barcode.SfBarcodeGenerator.QRCode"
xmlns:barcode="clr-namespace:Syncfusion.Maui.Barcode;assembly=Syncfusion.Maui.Barcode"
xmlns:local="clr-namespace:SampleBrowser.Maui.Barcode.SfBarcodeGenerator"
Background="White">
xmlns:editors="clr-namespace:Syncfusion.Maui.Inputs;assembly=Syncfusion.Maui.Inputs"
Background="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}">
<localCore:SampleView.Resources>
<local:ViewModel x:Key="ViewModel" />
</localCore:SampleView.Resources>
<localCore:SampleView.OptionView>
<ContentView>
<StackLayout x:Name="QRcode">
<Grid Margin="20,0,0,0">
<Grid.ColumnDefinitions>
<ColumnDefinition />
@ -32,6 +32,8 @@
Grid.ColumnSpan="2"
Margin="0,10,0,0"
Text="http://www.syncfusion.com"
TextColor="{AppThemeBinding Dark={StaticResource TextColour}, Light={StaticResource TextColourLight}}"
BackgroundColor="{AppThemeBinding Light={StaticResource SampleBrowserBackgroundLight}, Dark={StaticResource SampleBrowserBackground}}"
TextChanged="inputValueEntry_TextChanged" />
<Label x:Name="warningLabel"
Grid.Row="2"
@ -46,16 +48,16 @@
FontAttributes="Bold"
Margin="0,10,0,0"
VerticalTextAlignment="Center" />
<Picker x:Name="errorCorrectionLevelPicker"
<editors:SfComboBox x:Name="errorCorrectionLevelPicker"
Grid.Row="3"
Grid.Column="1"
WidthRequest="100"
WidthRequest="120"
Margin="0,10,0,0"
HorizontalOptions="Center"
IsClearButtonVisible="False"
ItemsSource="{Binding Source={StaticResource ViewModel}, Path=ErrorCorrectionLevelArray}"
SelectedItem="{Binding Source={x:Reference qRCode}, Path=ErrorCorrectionLevel, Mode=TwoWay}" />
</Grid>
</StackLayout>
</ContentView>
</localCore:SampleView.OptionView>
<localCore:SampleView.Content>

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

@ -4,7 +4,7 @@
xmlns:localCore="clr-namespace:SampleBrowser.Maui.Base;assembly=SampleBrowser.Maui.Base"
xmlns:barcode="clr-namespace:Syncfusion.Maui.Barcode;assembly=Syncfusion.Maui.Barcode"
x:Class="SampleBrowser.Maui.Barcode.SfBarcodeGenerator.Wifi"
Background="White">
Background="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}">
<localCore:SampleView.Content>
<ScrollView HorizontalOptions="Center"
@ -19,7 +19,7 @@
TextColor="White"
FontFamily="Roboto-Medium"
FontSize="{OnPlatform Android={OnIdiom Phone=15, Tablet=22}, iOS=16, WinUI=16}" />
<Grid BackgroundColor="White"
<Grid BackgroundColor="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}"
HeightRequest="{OnPlatform Android=170, Default= 170}"
WidthRequest="{OnPlatform Android=170, Default= 170}"
HorizontalOptions="Center"
@ -49,7 +49,7 @@
</StackLayout>
<BoxView HeightRequest="3"
BackgroundColor="White" />
BackgroundColor="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource TileHeaderBorder}}" />
<StackLayout Margin='20,10'>
<Label Text="Status"
@ -68,7 +68,7 @@
</StackLayout>
<BoxView HeightRequest="3"
BackgroundColor="White" />
BackgroundColor="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource TileHeaderBorder}}" />
<StackLayout Margin='20,10'>
<Label Text="Signal strength"
@ -87,7 +87,7 @@
</StackLayout>
<BoxView HeightRequest="3"
BackgroundColor="White" />
BackgroundColor="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource TileHeaderBorder}}" />
<StackLayout Margin='20,10'>
<Label Text="Connection speed"
@ -106,7 +106,7 @@
</StackLayout>
<BoxView HeightRequest="3"
BackgroundColor="White" />
BackgroundColor="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource TileHeaderBorder}}" />
<StackLayout Margin='20,10'>
<Label Text="Security"

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

@ -3,11 +3,13 @@
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:SampleBrowser.Maui.BulletChart"
xmlns:base="clr-namespace:SampleBrowser.Maui.Base;assembly=SampleBrowser.Maui.Base"
xmlns:syncTheme="clr-namespace:Syncfusion.Maui.Themes;assembly=Syncfusion.Maui.Core"
x:Class="SampleBrowser.Maui.BulletChart.App">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<base:SampleBrowserStyles />
<syncTheme:SyncfusionThemeResourceDictionary/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>

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

@ -78,10 +78,11 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="SampleBrowser.Maui.Base" version="24.2.3" />
<PackageReference Include="Syncfusion.Maui.Core" version="24.2.3" />
<PackageReference Include="Syncfusion.Maui.TabView" version="24.2.3" />
<PackageReference Include="Syncfusion.Maui.Gauges" version="24.2.3" />
<PackageReference Include="SampleBrowser.Maui.Base" version="25.1.35" />
<PackageReference Include="Syncfusion.Maui.Core" version="25.1.35" />
<PackageReference Include="Syncfusion.Maui.TabView" version="25.1.35" />
<PackageReference Include="Syncfusion.Maui.Gauges" version="25.1.35" />
<PackageReference Include="Syncfusion.Maui.Buttons" version="25.1.35" />
</ItemGroup>
<ItemGroup>

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

@ -23,6 +23,7 @@
<Label HorizontalOptions="Center"
Text="2005 YTD"
FontAttributes="Bold"
TextColor="{AppThemeBinding Light={StaticResource TextColourLight}, Dark={StaticResource TextColour}}"
FontSize="20"
Margin="0,0,0,10"/>
@ -76,7 +77,7 @@
<gauge:LinearContentPointer.Content>
<StackLayout Orientation="Vertical">
<Label Text="Revenue"
TextColor="#333333"
TextColor="{AppThemeBinding Light={StaticResource TextColourLight}, Dark={StaticResource TextColour}}"
FontAttributes="Bold"
HorizontalTextAlignment="End" />
<Label Text=" U.S. $"
@ -138,7 +139,7 @@
<gauge:LinearContentPointer.Content>
<StackLayout Orientation="Vertical">
<Label Text="Profit"
TextColor="#333333"
TextColor="{AppThemeBinding Light={StaticResource TextColourLight}, Dark={StaticResource TextColour}}"
FontAttributes="Bold"
HorizontalTextAlignment="End" />
</StackLayout>
@ -197,7 +198,7 @@
<gauge:LinearContentPointer.Content>
<StackLayout Orientation="Vertical">
<Label Text="Avg Order Size"
TextColor="#333333"
TextColor="{AppThemeBinding Light={StaticResource TextColourLight}, Dark={StaticResource TextColour}}"
FontAttributes="Bold"
HorizontalTextAlignment="End" />
<Label Text="U.S. $"
@ -261,7 +262,7 @@
<StackLayout Orientation="Vertical">
<Label Text="New Customers"
FontAttributes="Bold"
TextColor="#333333"
TextColor="{AppThemeBinding Light={StaticResource TextColourLight}, Dark={StaticResource TextColour}}"
HorizontalTextAlignment="End" />
<Label Text="Count"
FontSize="12"
@ -322,7 +323,7 @@
<gauge:LinearContentPointer.Content>
<StackLayout Orientation="Vertical">
<Label Text="Cust Satisfaction"
TextColor="#333333"
TextColor="{AppThemeBinding Light={StaticResource TextColourLight}, Dark={StaticResource TextColour}}"
FontAttributes="Bold"
HorizontalTextAlignment="End" />
<Label Text="Top Rating of 5"

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

@ -52,12 +52,13 @@
HorizontalOptions="Center"
Text="2005 YTD"
FontAttributes="Bold"
TextColor="{AppThemeBinding Light={StaticResource TextColourLight}, Dark={StaticResource TextColour}}"
FontSize="20"
Margin="0,10,0,10" />
<VerticalStackLayout Grid.Row="1">
<Label Text="Revenue"
TextColor="#333333"
TextColor="{AppThemeBinding Light={StaticResource TextColourLight}, Dark={StaticResource TextColour}}"
FontAttributes="Bold" />
<Label Text="U.S. $"
TextColor="#808080"
@ -113,7 +114,7 @@
<VerticalStackLayout Grid.Row="1"
Grid.Column="1">
<Label Text="Profit "
TextColor="#333333"
TextColor="{AppThemeBinding Light={StaticResource TextColourLight}, Dark={StaticResource TextColour}}"
FontAttributes="Bold" />
<gauge:SfLinearGauge VerticalOptions="Center"
@ -168,7 +169,7 @@
<VerticalStackLayout Grid.Row="1"
Grid.Column="2">
<Label Text="Avg Order Size"
TextColor="#333333"
TextColor="{AppThemeBinding Light={StaticResource TextColourLight}, Dark={StaticResource TextColour}}"
FontAttributes="Bold" />
<Label Text="U.S. $"
TextColor="#808080"
@ -226,7 +227,7 @@
Grid.Row="2"
Grid.ColumnSpan="2">
<Label Text="New Customers"
TextColor="#333333"
TextColor="{AppThemeBinding Light={StaticResource TextColourLight}, Dark={StaticResource TextColour}}"
FontAttributes="Bold" />
<Label Text="Count"
FontSize="12"
@ -283,7 +284,7 @@
Grid.Column="1"
Grid.ColumnSpan="2">
<Label Text="Cust Satisfaction"
TextColor="#333333"
TextColor="{AppThemeBinding Light={StaticResource TextColourLight}, Dark={StaticResource TextColour}}"
FontAttributes="Bold" />
<Label Text="Top Rating of 5"
FontSize="12"

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

@ -3,11 +3,13 @@
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:SampleBrowser.Maui.BusyIndicator"
xmlns:base="clr-namespace:SampleBrowser.Maui.Base;assembly=SampleBrowser.Maui.Base"
xmlns:syncTheme="clr-namespace:Syncfusion.Maui.Themes;assembly=Syncfusion.Maui.Core"
x:Class="SampleBrowser.Maui.BusyIndicator.App">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<base:SampleBrowserStyles/>
<syncTheme:SyncfusionThemeResourceDictionary/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>

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

@ -84,10 +84,11 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="SampleBrowser.Maui.Base" version="24.2.3" />
<PackageReference Include="Syncfusion.Maui.Core" version="24.2.3" />
<PackageReference Include="Syncfusion.Maui.Charts" version="24.2.3" />
<PackageReference Include="Syncfusion.Maui.TabView" version="24.2.3" />
<PackageReference Include="SampleBrowser.Maui.Base" version="25.1.35" />
<PackageReference Include="Syncfusion.Maui.Core" version="25.1.35" />
<PackageReference Include="Syncfusion.Maui.Charts" version="25.1.35" />
<PackageReference Include="Syncfusion.Maui.TabView" version="25.1.35" />
<PackageReference Include="Syncfusion.Maui.Buttons" version="25.1.35" />
</ItemGroup>
</Project>

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

@ -6,12 +6,12 @@
xmlns:localCore="clr-namespace:SampleBrowser.Maui.Base;assembly=SampleBrowser.Maui.Base"
xmlns:imageExtension="clr-namespace:SampleBrowser.Maui.Base.Converters;assembly=SampleBrowser.Maui.Base"
xmlns:local="clr-namespace:SampleBrowser.Maui.BusyIndicator.SfBusyIndicator"
BackgroundColor="White">
BackgroundColor="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}">
<localCore:SampleView.Content>
<Grid HeightRequest="300" WidthRequest="300" RowDefinitions="*,*" ColumnDefinitions="*,*">
<core:SfBusyIndicator IsRunning="True" IndicatorColor="Red" Title="Loading..."/>
<core:SfBusyIndicator IsRunning="True" IndicatorColor="Green" TextColor="Orange" Title="Loading..." Grid.Column="1"/>
<core:SfBusyIndicator IsRunning="True" IndicatorColor="Green" TextColor="{AppThemeBinding Light={StaticResource WarningForgroundLight}, Dark={StaticResource WarningForground}}" Title="Loading..." Grid.Column="1"/>
<core:SfBusyIndicator IsRunning="True" IndicatorColor="#e64c93" Title="Loading..." Grid.Row="1">
<core:SfBusyIndicator.OverlayFill>
<RadialGradientBrush>

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

@ -6,12 +6,12 @@
xmlns:localCore="clr-namespace:SampleBrowser.Maui.Base;assembly=SampleBrowser.Maui.Base"
xmlns:imageExtension="clr-namespace:SampleBrowser.Maui.Base.Converters;assembly=SampleBrowser.Maui.Base"
xmlns:local="clr-namespace:SampleBrowser.Maui.BusyIndicator.SfBusyIndicator"
BackgroundColor="White">
BackgroundColor="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}">
<localCore:SampleView.Content>
<Grid HeightRequest="300" WidthRequest="300" RowDefinitions="*,50,20">
<core:SfBusyIndicator x:Name="busyIndicator" IsRunning="True" />
<Slider Minimum="0.1" Margin="1.0" Value="0.5" ValueChanged="Slider_ValueChanged" Grid.Row="1"/>
<Slider Minimum="0.1" Margin="1.0" Value="0.5" ValueChanged="Slider_ValueChanged" Grid.Row="1" MaximumTrackColor="{AppThemeBinding Light= #E0E0E0, Dark= #404040}" MinimumTrackColor="{AppThemeBinding Light={StaticResource PrimaryBorderLight}, Dark={StaticResource PrimaryBorder}}" ThumbColor="{AppThemeBinding Light={StaticResource PrimaryBorderLight}, Dark={StaticResource PrimaryBorder}}"/>
<Label Text="Size" VerticalOptions="Center" HorizontalOptions="Center" Grid.Row="2" />
</Grid>
</localCore:SampleView.Content>

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

@ -6,12 +6,12 @@
xmlns:localCore="clr-namespace:SampleBrowser.Maui.Base;assembly=SampleBrowser.Maui.Base"
xmlns:imageExtension="clr-namespace:SampleBrowser.Maui.Base.Converters;assembly=SampleBrowser.Maui.Base"
xmlns:local="clr-namespace:SampleBrowser.Maui.BusyIndicator.SfBusyIndicator"
BackgroundColor="White">
BackgroundColor="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}">
<localCore:SampleView.Content>
<Grid HeightRequest="300" WidthRequest="300" RowDefinitions="*,50,20">
<core:SfBusyIndicator x:Name="busyIndicator" IsRunning="True" />
<Slider Minimum="0.1" Margin="1.0" Value="0.5" ValueChanged="Slider_ValueChanged" Grid.Row="1"/>
<Slider Minimum="0.1" Margin="1.0" Value="0.5" ValueChanged="Slider_ValueChanged" Grid.Row="1" MaximumTrackColor="{AppThemeBinding Light= #E0E0E0, Dark= #404040}" MinimumTrackColor="{AppThemeBinding Light={StaticResource PrimaryBorderLight}, Dark={StaticResource PrimaryBorder}}" ThumbColor="{AppThemeBinding Light={StaticResource PrimaryBorderLight}, Dark={StaticResource PrimaryBorder}}"/>
<Label Text="Speed" VerticalOptions="Center" HorizontalOptions="Center" Grid.Row="2"/>
</Grid>
</localCore:SampleView.Content>

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

@ -4,30 +4,33 @@
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:core="clr-namespace:Syncfusion.Maui.Core;assembly=Syncfusion.Maui.Core"
xmlns:localCore="clr-namespace:SampleBrowser.Maui.Base;assembly=SampleBrowser.Maui.Base"
xmlns:buttons="clr-namespace:Syncfusion.Maui.Buttons;assembly=Syncfusion.Maui.Buttons"
xmlns:local="clr-namespace:SampleBrowser.Maui.BusyIndicator.SfBusyIndicator"
BackgroundColor="White">
BackgroundColor="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}">
<localCore:SampleView.Content>
<Grid HeightRequest="400" WidthRequest="320" RowDefinitions="*,220" >
<core:SfBusyIndicator x:Name="busyIndicator" IsRunning="True" Title="Searching..."/>
<Grid Grid.Row="1" RowDefinitions="50,50,50,50" Padding="15,10,15,15" Background="#EAEAEA" >
<core:SfBusyIndicator x:Name="busyIndicator" IsRunning="True" Title="Searching..." IndicatorColor="{AppThemeBinding Light={StaticResource PrimaryBackgroundLight}, Dark={StaticResource PrimaryBackground}}"/>
<Grid Grid.Row="1" RowDefinitions="50,50,50,50" Padding="15,10,15,15" BackgroundColor="Transparent" >
<Grid ColumnDefinitions="Auto,*" >
<Label Text="Font Size" VerticalOptions="Center" VerticalTextAlignment="Center"/>
<Slider Grid.Column="1" Minimum="0.8" Maximum="2.0" Value="1.2" ValueChanged="Slider_ValueChanged" VerticalOptions="Center" Margin="5"/>
<Slider Grid.Column="1" Minimum="0.8" Maximum="2.0" Value="1.2" ValueChanged="Slider_ValueChanged" VerticalOptions="Center" Margin="5" MaximumTrackColor="{AppThemeBinding Light= #E0E0E0, Dark= #404040}" MinimumTrackColor="{AppThemeBinding Light={StaticResource PrimaryBorderLight}, Dark={StaticResource PrimaryBorder}}" ThumbColor="{AppThemeBinding Light={StaticResource PrimaryBorderLight}, Dark={StaticResource PrimaryBorder}}" />
</Grid>
<Grid ColumnDefinitions="*,*,*" Grid.Row="1" >
<RadioButton GroupName="FontAttribute" BackgroundColor="#EAEAEA" Content=" None" VerticalOptions="Center" IsChecked="True" CheckedChanged="RadioButton_CheckedChanged"/>
<RadioButton Grid.Column="1" BackgroundColor="#EAEAEA" GroupName="FontAttribute" Content=" Bold" VerticalOptions="Center" CheckedChanged="RadioButton_CheckedChanged_1"/>
<RadioButton Grid.Column="2" BackgroundColor="#EAEAEA" GroupName="FontAttribute" Content=" Italic" VerticalOptions="Center" CheckedChanged="RadioButton_CheckedChanged_2"/>
</Grid>
<Grid ColumnDefinitions="Auto,*,*" Grid.Row="2" >
<buttons:SfRadioGroup x:Name="fontAttribute" Orientation="Horizontal" CheckedChanged="RadioButton_CheckedChanged" Spacing="15" Grid.Row="1">
<buttons:SfRadioButton Text="None" IsChecked="True"/>
<buttons:SfRadioButton Text="Bold"/>
<buttons:SfRadioButton Text="Italic"/>
</buttons:SfRadioGroup>
<Grid ColumnDefinitions="Auto,*" Grid.Row="2" >
<Label Text="Title Placement" VerticalOptions="Center" VerticalTextAlignment="Center"/>
<RadioButton Grid.Column="1" BackgroundColor="#EAEAEA" VerticalOptions="Center" GroupName="TitlePosition" Content=" Top" CheckedChanged="RadioButton_CheckedChanged_3"/>
<RadioButton Grid.Column="2" BackgroundColor="#EAEAEA" VerticalOptions="Center" GroupName="TitlePosition" Content=" Bottom" IsChecked="True" CheckedChanged="RadioButton_CheckedChanged_4"/>
<buttons:SfRadioGroup x:Name="titlePosition" Orientation="Horizontal" CheckedChanged="RadioButton_CheckedChanged_1" Spacing="15" Grid.Column="1">
<buttons:SfRadioButton Text="Top"/>
<buttons:SfRadioButton Text="Bottom" IsChecked="True"/>
</buttons:SfRadioGroup>
</Grid>
<Grid Grid.Row="3" ColumnDefinitions="Auto,*" >
<Label Text="Title Spacing" VerticalOptions="Center" VerticalTextAlignment="Center"/>
<Slider Grid.Column="1" Minimum="0.8" Maximum="2.0" Value="1.2" ValueChanged="Slider_ValueChanged_1" VerticalOptions="Center" Margin="5"/>
<Slider Grid.Column="1" Minimum="0.8" Maximum="2.0" Value="1.2" ValueChanged="Slider_ValueChanged_1" VerticalOptions="Center" Margin="5" MaximumTrackColor="{AppThemeBinding Light= #E0E0E0, Dark= #404040}" MinimumTrackColor="{AppThemeBinding Light={StaticResource PrimaryBorderLight}, Dark={StaticResource PrimaryBorder}}" ThumbColor="{AppThemeBinding Light={StaticResource PrimaryBorderLight}, Dark={StaticResource PrimaryBorder}}"/>
</Grid>
</Grid>
</Grid>

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

@ -29,35 +29,46 @@ namespace SampleBrowser.Maui.BusyIndicator.SfBusyIndicator
this.busyIndicator.FontSize = e.NewValue * 10;
}
private void RadioButton_CheckedChanged(object sender, CheckedChangedEventArgs e)
{
this.busyIndicator.FontAttributes = FontAttributes.None;
}
private void RadioButton_CheckedChanged_1(object sender, CheckedChangedEventArgs e)
{
this.busyIndicator.FontAttributes = FontAttributes.Bold;
}
private void RadioButton_CheckedChanged_2(object sender, CheckedChangedEventArgs e)
{
this.busyIndicator.FontAttributes = FontAttributes.Italic;
}
private void RadioButton_CheckedChanged_3(object sender, CheckedChangedEventArgs e)
{
this.busyIndicator.TitlePlacement = Syncfusion.Maui.Core.BusyIndicatorTitlePlacement.Top;
}
private void RadioButton_CheckedChanged_4(object sender, CheckedChangedEventArgs e)
{
this.busyIndicator.TitlePlacement = Syncfusion.Maui.Core.BusyIndicatorTitlePlacement.Bottom;
}
private void Slider_ValueChanged_1(object sender, ValueChangedEventArgs e)
{
this.busyIndicator.TitleSpacing = e.NewValue * 10;
}
private void RadioButton_CheckedChanged(object sender, Syncfusion.Maui.Buttons.CheckedChangedEventArgs e)
{
if (e.CurrentItem != null && this.busyIndicator != null)
{
if (e.CurrentItem.Text == "None")
{
this.busyIndicator.FontAttributes = FontAttributes.None;
}
else if (e.CurrentItem.Text == "Bold")
{
this.busyIndicator.FontAttributes = FontAttributes.Bold;
}
else if (e.CurrentItem.Text == "Italic")
{
this.busyIndicator.FontAttributes = FontAttributes.Italic;
}
}
}
private void RadioButton_CheckedChanged_1(object sender, Syncfusion.Maui.Buttons.CheckedChangedEventArgs e)
{
if (e.CurrentItem != null && this.busyIndicator != null)
{
if (e.CurrentItem.Text == "Top")
{
this.busyIndicator.TitlePlacement = Syncfusion.Maui.Core.BusyIndicatorTitlePlacement.Top;
}
else if (e.CurrentItem.Text == "Bottom")
{
this.busyIndicator.TitlePlacement = Syncfusion.Maui.Core.BusyIndicatorTitlePlacement.Bottom;
}
}
}
}
}

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

@ -1,4 +1,3 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.0.31611.283

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

@ -4,12 +4,14 @@
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:base="clr-namespace:SampleBrowser.Maui.Base;assembly=SampleBrowser.Maui.Base"
xmlns:syncTheme="clr-namespace:Syncfusion.Maui.Themes;assembly=Syncfusion.Maui.Core"
xmlns:local="clr-namespace:SampleBrowser.Maui.Buttons">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<base:SampleBrowserStyles />
<syncTheme:SyncfusionThemeResourceDictionary/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>

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

@ -35,19 +35,15 @@
<Control ControlName="Switch"
Title="Switch"
Image="switch.png"
StatusTag="New"
IsPreview="True"
Description="The switch is a UI element that allows users to turn an item on and off, and provides an optional indeterminate state." >
Description=" The switch allows toggling items with an optional indeterminate state." >
<Sample SampleName="GettingStarted"
Title="Getting Started"
SearchTags="switch, threestate, button"
StatusTag="New"
CodeViewerPath="Switch/GettingStarted/"
VideoLink=""/>
<Sample SampleName="Features"
Title="Features"
SearchTags="switch, threestate, button, switchfeatures"
StatusTag="New"
CodeViewerPath="Switch/Features/"
VideoLink=""/>
</Control>
@ -55,7 +51,7 @@
<Control ControlName="CheckBox"
Title="CheckBox"
Image="checkbox.png"
Description="A checkbox is a UI element for toggling between two states, often used for binary choices or multi-selection options." >
Description="A checkbox toggles between two states for binary or multi-selection." >
<Sample SampleName="GettingStarted"
Title="Getting Started"
SearchTags="checkbox, selection, threestates"
@ -71,7 +67,7 @@
<Control ControlName="RadioButton"
Title="Radio Button"
Image="radiobutton.png"
Description="A radio button is a UI element that allows users to select a single option from a list of mutually exclusive choices." >
Description="A radio button selects a single option from a list of choices. " >
<Sample SampleName="GettingStarted"
Title="Getting Started"
SearchTags="radiobutton, twostate, button"

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

@ -88,11 +88,11 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="SampleBrowser.Maui.Base" version="24.2.3" />
<PackageReference Include="Syncfusion.Maui.Buttons" version="24.2.3" />
<PackageReference Include="Syncfusion.Maui.ListView" version="24.2.3" />
<PackageReference Include="Syncfusion.Maui.TabView" version="24.2.3" />
<PackageReference Include="Syncfusion.Maui.Core" version="24.2.3" />
<PackageReference Include="Syncfusion.Maui.Sliders" version="24.2.3" />
<PackageReference Include="SampleBrowser.Maui.Base" version="25.1.35" />
<PackageReference Include="Syncfusion.Maui.Buttons" version="25.1.35" />
<PackageReference Include="Syncfusion.Maui.ListView" version="25.1.35" />
<PackageReference Include="Syncfusion.Maui.TabView" version="25.1.35" />
<PackageReference Include="Syncfusion.Maui.Core" version="25.1.35" />
<PackageReference Include="Syncfusion.Maui.Sliders" version="25.1.35" />
</ItemGroup>
</Project>

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

@ -8,30 +8,32 @@
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">
BackgroundColor="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}"
WidthRequest="400">
<localCore:SampleView.Resources>
<Style x:Key="CheckBoxNormalStyle" TargetType="button:SfCheckBox">
<Setter Property="TextColor" Value="Black"/>
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource TextColourLight}, Dark={StaticResource TextColour}}"/>
<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="TextColor" Value="{AppThemeBinding Light={StaticResource TextColourLight}, Dark={StaticResource TextColour}}"/>
<Setter Property="FontFamily" Value="Roboto-Regular"/>
</Style>
</localCore:SampleView.Resources>
<localCore:SampleView.Content>
<Grid WidthRequest="380" HorizontalOptions="Center">
<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">
<Border Margin="5,10" Grid.Row="0" Background="{AppThemeBinding Light={StaticResource TileBackgroundLight}, Dark={StaticResource TileBackground}}" Stroke="Gray" StrokeShape="RoundRectangle 10" StrokeThickness="0.3">
<Grid>
<button:SfButton x:Name="cartButton"
<button:SfButton x:Name="cartButton"
Background="#6200EE"
StrokeThickness="{Binding BorderWidth}"
WidthRequest="150"
@ -41,12 +43,12 @@
CornerRadius="{Binding CornerRadius,Mode=TwoWay}">
<button:SfButton.Content>
<DataTemplate>
<Grid HorizontalOptions="Center" VerticalOptions="Center">
<Grid HorizontalOptions="Center" VerticalOptions="Center" >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid Padding="5,0,5,0">
<Grid Padding="5,0,5,0" >
<Label Text="&#xE7BF;"
HorizontalTextAlignment="Center"
VerticalOptions="Center"
@ -74,8 +76,8 @@
</button:SfButton>
</Grid>
</Border>
<Border Grid.Row="1" Margin="5,0,5,10" BackgroundColor="#f6f6f8" Stroke="Gray" StrokeShape="RoundRectangle 10" StrokeThickness="0.3">
<Grid>
<Border Grid.Row="1" Margin="5,0,5,10" Background="{AppThemeBinding Light={StaticResource TileBackgroundLight}, Dark={StaticResource TileBackground}}" 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">
@ -85,14 +87,11 @@
</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">
FontFamily="Roboto-Regular" >
<tabView:SfTabItem.FontSize>
<OnPlatform x:TypeArguments="x:Double">
<On Platform="WinUI" Value ="12"/>
@ -141,7 +140,7 @@
</StackLayout>
</tabView:SfTabItem.Content>
</tabView:SfTabItem>
<tabView:SfTabItem Header="Background" FontFamily="Roboto-Regular" HeightRequest="40">
<tabView:SfTabItem Header="Background" FontFamily="Roboto-Regular">
<tabView:SfTabItem.FontSize>
<OnPlatform x:TypeArguments="x:Double">
<On Platform="WinUI" Value ="12"/>
@ -190,7 +189,7 @@
</StackLayout>
</tabView:SfTabItem.Content>
</tabView:SfTabItem>
<tabView:SfTabItem Header="Border Color" FontFamily="Roboto-Regular" HeightRequest="40">
<tabView:SfTabItem Header="Border Color" FontFamily="Roboto-Regular">
<tabView:SfTabItem.FontSize>
<OnPlatform x:TypeArguments="x:Double">
<On Platform="WinUI" Value ="12"/>

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

@ -8,15 +8,15 @@
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">
BackgroundColor="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}">
<localCore:SampleView.Resources>
<Style x:Key="CheckBoxNormalStyle" TargetType="button:SfCheckBox">
<Setter Property="TextColor" Value="#007DE4"/>
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource TextColourLight}, Dark={StaticResource TextColour}}"/>
<Setter Property="FontSize" Value="14"/>
</Style>
<Style x:Key="EntryNormalStyle" TargetType="Entry">
<Setter Property="TextColor" Value="#007DE4"/>
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource TextColourLight}, Dark={StaticResource TextColour}}"/>
<Setter Property="FontSize" Value="15"/>
</Style>
</localCore:SampleView.Resources>
@ -72,12 +72,12 @@
</button:SfButton>
<Grid Grid.Row="1" Margin="18,0,11,5">
<ScrollView>
<ScrollView HorizontalScrollBarVisibility="Never" VerticalScrollBarVisibility="Never">
<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"
<Core:SfTextInputLayout ContainerType="Outlined" Margin="2,10,10,0" InputViewPadding="20" ContainerBackground="Transparent"
Hint="Text">
<Entry TextColor="#212121" FontFamily="Roboto-Regular"
<Entry TextColor="{AppThemeBinding Light={StaticResource TextColourLight}, Dark={StaticResource TextColour}}"
Style="{StaticResource EntryNormalStyle}"
Text="{Binding Text,Mode=TwoWay}" />
</Core:SfTextInputLayout>
@ -86,7 +86,7 @@
HorizontalOptions="Center"
VerticalOptions="Center"
HeightRequest="130">
<tabView:SfTabItem Header="Text Color" FontFamily="Roboto-Regular" HeightRequest="40" >
<tabView:SfTabItem Header="Text Color" FontFamily="Roboto-Regular" >
<tabView:SfTabItem.FontSize>
<OnPlatform x:TypeArguments="x:Double">
<On Platform="Android" Value ="12"/>
@ -135,7 +135,7 @@
</StackLayout>
</tabView:SfTabItem.Content>
</tabView:SfTabItem>
<tabView:SfTabItem Header="Background" FontFamily="Roboto-Regular" HeightRequest="40">
<tabView:SfTabItem Header="Background" FontFamily="Roboto-Regular" >
<tabView:SfTabItem.FontSize>
<OnPlatform x:TypeArguments="x:Double">
<On Platform="Android" Value ="12"/>
@ -184,7 +184,7 @@
</StackLayout>
</tabView:SfTabItem.Content>
</tabView:SfTabItem>
<tabView:SfTabItem Header="Border Color" FontFamily="Roboto-Regular" HeightRequest="40">
<tabView:SfTabItem Header="Border Color" FontFamily="Roboto-Regular">
<tabView:SfTabItem.FontSize>
<OnPlatform x:TypeArguments="x:Double">
<On Platform="Android" Value ="12"/>

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

@ -103,10 +103,10 @@
</localcore:SampleView.Resources>
<localcore:SampleView.Content>
<ScrollView>
<ScrollView BackgroundColor="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}" >
<StackLayout HorizontalOptions="Center" VerticalOptions="Center">
<Grid Padding="5">
<Grid Padding="5" >
<Grid.RowDefinitions>
<RowDefinition Height="130"/>
<RowDefinition Height="130"/>
@ -119,7 +119,7 @@
<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="0" Grid.Column="0" Text="Primary Button" HeightRequest="50" WidthRequest="150" CornerRadius="25"/>
<button:SfButton Grid.Row="1" Grid.Column="0" Style="{StaticResource sfButtonStyle}">
<button:SfButton.Content>
<DataTemplate>
@ -129,13 +129,13 @@
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid Padding="0,0,5,0">
<Label Text="&#xEB52;"
<Label Text="&#xe78a;"
HorizontalTextAlignment="Center"
VerticalOptions="Center"
VerticalTextAlignment="Center"
HorizontalOptions="Start"
FontSize="24"
FontFamily="SegmentIcon"
FontFamily="MauiSampleFontIcon"
TextColor="White">
</Label>
</Grid>
@ -160,8 +160,8 @@
<DataTemplate>
<Grid HorizontalOptions="Center" VerticalOptions="Center">
<Grid Padding="5,0,5,0" Grid.Column="1" >
<Label Text="&#xEB52;"
FontFamily="SegmentIcon"
<Label Text="&#xe78a;"
FontFamily="MauiSampleFontIcon"
HorizontalTextAlignment="Center"
VerticalOptions="Center"
VerticalTextAlignment="Center"
@ -176,8 +176,8 @@
</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" TextColor="Black" 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="0" Grid.Column="1" Text="Normal Button" HeightRequest="50" WidthRequest="150" CornerRadius="0"/>
<button:SfButton Grid.Row="0" Grid.Column="2" Text="Outline Button" TextColor="Blue" CornerRadius="0" HeightRequest="50" WidthRequest="150" Background="White" Stroke="Blue" StrokeThickness="2"/>
<button:SfButton Grid.Row="1" Grid.Column="2" Style="{StaticResource sfButtonStyle}">
<button:SfButton.Content>
<DataTemplate>
@ -200,8 +200,8 @@
</Label>
</Grid>
<Grid Padding="5,0,5,0" Grid.Column="1" >
<Label Text="&#xEB52;"
FontFamily="SegmentIcon"
<Label Text="&#xe78a;"
FontFamily="MauiSampleFontIcon"
HorizontalTextAlignment="Center"
VerticalOptions="Center"
VerticalTextAlignment="Center"
@ -221,8 +221,8 @@
<DataTemplate>
<Grid HorizontalOptions="Center" VerticalOptions="Center">
<Grid Padding="5,0,5,0" Grid.Column="1" >
<Label Text="&#xEB52;"
FontFamily="SegmentIcon"
<Label Text="&#xe78a;"
FontFamily="MauiSampleFontIcon"
HorizontalTextAlignment="Center"
VerticalOptions="Center"
VerticalTextAlignment="Center"

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

@ -103,7 +103,7 @@
</localcore:SampleView.Resources>
<localcore:SampleView.Content>
<Grid Padding="5" >
<Grid Padding="5" BackgroundColor="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}" >
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="*"/>
@ -117,7 +117,7 @@
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<button:SfButton Grid.Row="0" Grid.Column="0" Text="Primary Button" TextColor="White" Style="{StaticResource sfButtonStyle}"/>
<button:SfButton Grid.Row="0" Grid.Column="0" Text="Primary Button" HeightRequest="50" WidthRequest="150" CornerRadius="25"/>
<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>
@ -128,13 +128,13 @@
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid Padding="0,0,5,0">
<Label Text="&#xEB52;"
<Label Text="&#xe78a;"
HorizontalTextAlignment="Center"
VerticalOptions="Center"
VerticalTextAlignment="Center"
HorizontalOptions="Start"
FontSize="24"
FontFamily="SegmentIcon"
FontFamily="MauiSampleFontIcon"
TextColor="White">
</Label>
</Grid>
@ -159,8 +159,8 @@
<DataTemplate>
<Grid HorizontalOptions="Center" VerticalOptions="Center">
<Grid Padding="5,0,5,0" Grid.Column="1" >
<Label Text="&#xEB52;"
FontFamily="SegmentIcon"
<Label Text="&#xe78a;"
FontFamily="MauiSampleFontIcon"
HorizontalTextAlignment="Center"
VerticalOptions="Center"
VerticalTextAlignment="Center"
@ -175,8 +175,8 @@
</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" TextColor="Black" 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="0" Grid.Column="1" Text="Normal Button" HeightRequest="50" WidthRequest="150" CornerRadius="0"/>
<button:SfButton Grid.Row="1" Grid.Column="1" Text="Outline Button" TextColor="Blue" HeightRequest="50" WidthRequest="150" CornerRadius="0" Background="White" Stroke="Blue" StrokeThickness="2"/>
<button:SfButton Grid.Row="2" Grid.Column="1" Style="{StaticResource sfButtonStyle}">
<button:SfButton.Content>
<DataTemplate>
@ -199,8 +199,8 @@
</Label>
</Grid>
<Grid Padding="5,0,5,0" Grid.Column="1" >
<Label Text="&#xEB52;"
FontFamily="SegmentIcon"
<Label Text="&#xe78a;"
FontFamily="MauiSampleFontIcon"
HorizontalTextAlignment="Center"
VerticalOptions="Center"
VerticalTextAlignment="Center"
@ -220,8 +220,8 @@
<DataTemplate>
<Grid HorizontalOptions="Center" VerticalOptions="Center">
<Grid Padding="5,0,5,0" Grid.Column="1" >
<Label Text="&#xEB52;"
FontFamily="SegmentIcon"
<Label Text="&#xe78a;"
FontFamily="MauiSampleFontIcon"
HorizontalTextAlignment="Center"
VerticalOptions="Center"
VerticalTextAlignment="Center"

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

@ -8,7 +8,7 @@
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"
BackgroundColor="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}"
Padding="0"
WidthRequest="400">
@ -16,12 +16,23 @@
<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"/>
<Setter Property="VisualStateManager.VisualStateGroups">
<VisualStateGroupList>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal">
<VisualState.Setters>
</VisualState.Setters>
</VisualState>
</VisualStateGroup>
</VisualStateGroupList>
</Setter>
</Style>
<Style x:Key="EntryNormalStyle" TargetType="Entry">
<Setter Property="TextColor" Value="Black"/>
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource TextColourLight}, Dark=White}"/>
<Setter Property="FontSize" Value="15"/>
<Setter Property="FontFamily" Value="Roboto-Regular"/>
</Style>
@ -34,7 +45,7 @@
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Border Margin="0,10" BackgroundColor="#f6f6f8" Grid.Row="0" Stroke="Gray" StrokeShape="RoundRectangle 10" StrokeThickness="0.3">
<Border Margin="0,10" Background="{AppThemeBinding Light={StaticResource TileBackgroundLight}, Dark={StaticResource TileBackground}}" Grid.Row="0" Stroke="Gray" StrokeShape="RoundRectangle 10" StrokeThickness="0.3">
<button:SfCheckBox x:Name="checkBox"
WidthRequest="150"
HeightRequest="50"
@ -44,11 +55,10 @@
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">
<Border BackgroundColor="{AppThemeBinding Light={StaticResource TileBackgroundLight}, Dark={StaticResource TileBackground}}" 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">
@ -60,15 +70,12 @@
<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">
FontFamily="Roboto-Regular">
<tabView:SfTabItem.FontSize>
<OnPlatform x:TypeArguments="x:Double">
<On Platform="WinUI" Value ="12"/>
@ -117,7 +124,7 @@
</StackLayout>
</tabView:SfTabItem.Content>
</tabView:SfTabItem>
<tabView:SfTabItem Header="Checked Color" FontFamily="Roboto-Regular" HeightRequest="40">
<tabView:SfTabItem Header="Checked Color" FontFamily="Roboto-Regular">
<tabView:SfTabItem.FontSize>
<OnPlatform x:TypeArguments="x:Double">
<On Platform="WinUI" Value ="12"/>
@ -166,7 +173,7 @@
</StackLayout>
</tabView:SfTabItem.Content>
</tabView:SfTabItem>
<tabView:SfTabItem Header="Unchecked Color" FontFamily="Roboto-Regular" HeightRequest="40">
<tabView:SfTabItem Header="Unchecked Color" FontFamily="Roboto-Regular">
<tabView:SfTabItem.FontSize>
<OnPlatform x:TypeArguments="x:Double">
<On Platform="WinUI" Value ="12"/>
@ -228,10 +235,10 @@
VerticalOptions="CenterAndExpand"
Minimum="0"
Maximum="10"
MaximumTrackColor="#E0E0E0"
MinimumTrackColor="#6200EE"
Value="{Binding Radius,Mode=TwoWay}"
ThumbColor="#6200EE">
MaximumTrackColor="{AppThemeBinding Light=#E0E0E0, Dark=#404040}"
MinimumTrackColor="{AppThemeBinding Light=#4285F4, Dark=White}"
ThumbColor="{AppThemeBinding Light=#4285F4, Dark=White}"
Value="{Binding Radius,Mode=TwoWay}" >
<Slider.Margin>
<OnPlatform x:TypeArguments="Thickness">
<On Platform="WinUI" Value="0,15,0,0"/>

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

@ -7,6 +7,7 @@
#endregion
using SampleBrowser.Maui.Base;
using SampleBrowser.Maui.Buttons.CheckBox;
using Syncfusion.Maui.Buttons;
namespace SampleBrowser.Maui.Buttons.CheckBox;
@ -16,6 +17,7 @@ public partial class CustomizationsDesktop : SampleView
public CustomizationsDesktop()
{
InitializeComponent();
viewModel = new ViewModel();
this.BindingContext = viewModel;
}

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

@ -8,15 +8,25 @@
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">
BackgroundColor="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}">
<localCore:SampleView.Resources>
<Style x:Key="CheckBoxNormalStyle" TargetType="button:SfCheckBox">
<Setter Property="TextColor" Value="Black"/>
<Setter Property="FontSize" Value="14"/>
<Setter Property="VisualStateManager.VisualStateGroups">
<VisualStateGroupList>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal">
<VisualState.Setters>
</VisualState.Setters>
</VisualState>
</VisualStateGroup>
</VisualStateGroupList>
</Setter>
</Style>
<Style x:Key="EntryNormalStyle" TargetType="Entry">
<Setter Property="TextColor" Value="Black"/>
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource TextColourLight}, Dark={StaticResource TextColour}}"/>
<Setter Property="FontSize" Value="15"/>
</Style>
</localCore:SampleView.Resources>
@ -38,16 +48,19 @@
HorizontalTextAlignment="Start"
FontSize="15"
FontFamily="Roboto-Regular"
Style="{StaticResource CheckBoxNormalStyle}"
CornerRadius="{Binding CornerRadius,Mode=TwoWay}">
</button:SfCheckBox>
<Grid Grid.Row="1" Margin="8,5,5,5">
<ScrollView>
<Grid Grid.Row="1" Margin="8,5,5,5" Background="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}">
<ScrollView HorizontalScrollBarVisibility="Never" VerticalScrollBarVisibility="Never" Background="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}">
<StackLayout>
<Label Text="Options" FontFamily="Roboto-Medium" FontSize="16"/>
<Core:SfTextInputLayout ContainerType="Outlined" Margin="0,10,5,0" ContainerBackground="Transparent"
<Core:SfTextInputLayout ContainerType="Outlined" Margin="0,10,5,0"
InputViewPadding="20"
ContainerBackground="Transparent"
Hint="Text">
<Entry TextColor="#212121" MinimumHeightRequest="0" FontFamily="Roboto-Regular"
<Entry TextColor="{AppThemeBinding Light={StaticResource TextColourLight}, Dark={StaticResource TextColour}}" MinimumHeightRequest="0" FontFamily="Roboto-Regular"
Style="{StaticResource EntryNormalStyle}"
Text="{Binding Text,Mode=TwoWay}" />
</Core:SfTextInputLayout>
@ -56,7 +69,7 @@
HorizontalOptions="Center"
VerticalOptions="Center"
HeightRequest="130">
<tabView:SfTabItem Header="Text Color" FontFamily="Roboto-Regular" HeightRequest="40">
<tabView:SfTabItem Header="Text Color" FontFamily="Roboto-Regular">
<tabView:SfTabItem.FontSize>
<OnPlatform x:TypeArguments="x:Double">
<On Platform="Android" Value ="11"/>
@ -105,7 +118,7 @@
</StackLayout>
</tabView:SfTabItem.Content>
</tabView:SfTabItem>
<tabView:SfTabItem Header="Checked Color" FontFamily="Roboto-Regular" HeightRequest="40">
<tabView:SfTabItem Header="Checked Color" FontFamily="Roboto-Regular">
<tabView:SfTabItem.FontSize>
<OnPlatform x:TypeArguments="x:Double">
<On Platform="Android" Value ="11"/>
@ -154,7 +167,7 @@
</StackLayout>
</tabView:SfTabItem.Content>
</tabView:SfTabItem>
<tabView:SfTabItem Header="UnChecked Color" FontFamily="Roboto-Regular" HeightRequest="40">
<tabView:SfTabItem Header="UnChecked Color" FontFamily="Roboto-Regular">
<tabView:SfTabItem.FontSize>
<OnPlatform x:TypeArguments="x:Double">
<On Platform="Android" Value ="11"/>
@ -217,10 +230,10 @@
VerticalOptions="CenterAndExpand"
Minimum="0"
Maximum="10"
MaximumTrackColor="#E0E0E0"
MinimumTrackColor="#4285F4"
Value="{Binding Radius,Mode=TwoWay}"
ThumbColor="#4285F4">
MaximumTrackColor="{AppThemeBinding Light=#E0E0E0, Dark=#404040}"
MinimumTrackColor="{AppThemeBinding Light=#4285F4, Dark=White}"
ThumbColor="{AppThemeBinding Light=#4285F4, Dark=White}"
Value="{Binding Radius,Mode=TwoWay}" >
</Slider>
<Label Text="{Binding Radius}"
Grid.Column="1"

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

@ -27,7 +27,7 @@ public class ViewModel : INotifyPropertyChanged
/// <summary>
/// Represents the text color
/// </summary>
private Color textColor = Colors.Black;
private Color textColor = Color.FromRgba("#808080");
/// <summary>
/// The corner radius of button.

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

@ -9,7 +9,7 @@
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">
BackgroundColor="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}">
<localcore:SampleView.Resources>
<ResourceDictionary>
@ -31,7 +31,7 @@
<localcore:SampleView.Content>
<Grid ColumnDefinitions="2.5*,7.5*">
<Grid ColumnDefinitions="2.5*,7.5*" BackgroundColor="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}">
<Border
Grid.Column="0"
Margin="5"
@ -78,7 +78,7 @@
FontSize="14"
Text="COLORS" />
<StackLayout>
<HorizontalStackLayout>
<HorizontalStackLayout >
<Syncfusion:SfCheckBox x:Name="brown" HorizontalOptions="Start" BindingContext="{x:StaticResource ViewModel}" IsChecked="{Binding ColorFilterChecked1}"/>
<Border Style="{x:StaticResource ColorBorder}">
<BoxView Color="SandyBrown" />
@ -145,7 +145,7 @@
StrokeThickness="0.3"
StrokeShape="RoundRectangle 10">
<listView:SfListView BindingContext="{x:StaticResource ViewModel}" SelectionMode="None" ItemSpacing="5" ItemSize="260" ItemsSource="{Binding Filtered}">
<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>
@ -153,7 +153,7 @@
<DataTemplate>
<ViewCell>
<Border
BackgroundColor="White"
BackgroundColor="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}"
Stroke="Gray"
StrokeThickness="0.3"
StrokeShape="RoundRectangle 0">
@ -163,7 +163,7 @@
<On Platform="WinUI" Value="0,0,7,0"/>
</OnPlatform>
</Border.Margin>
<Grid Margin="5" RowDefinitions="7*,3*">
<Grid Margin="5" RowDefinitions="7*,3*" BackgroundColor="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}">
<Image Source="{Binding Image,Converter={StaticResource imageconverter}}"/>
<Grid
RowDefinitions="1*,3*"

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

@ -29,7 +29,7 @@
Grid.Row="1"
Margin="10,5"
Stroke="Gray"
BackgroundColor="White"
BackgroundColor="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}"
StrokeShape="RoundRectangle 10"
StrokeThickness="1">
<HorizontalStackLayout HorizontalOptions="Center" Spacing="20">
@ -126,7 +126,7 @@
<DataTemplate>
<ViewCell>
<Border
BackgroundColor="White"
BackgroundColor="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}"
Padding="5"
Stroke="Gray"
StrokeThickness="1"

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

@ -8,7 +8,7 @@
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"
BackgroundColor="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}"
Padding="0"
WidthRequest="400">
@ -16,12 +16,23 @@
<localCore:SampleView.Resources>
<Style x:Key="RadiobuttonNormalStyle" TargetType="button:SfRadioButton">
<Setter Property="TextColor" Value="Black"/>
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource TextColourLight}, Dark={StaticResource TextColour}}"/>
<Setter Property="CheckedColor" Value="#6200EE"/>
<Setter Property="FontFamily" Value="Roboto-Regular"/>
<Setter Property="VisualStateManager.VisualStateGroups">
<VisualStateGroupList>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal">
<VisualState.Setters>
</VisualState.Setters>
</VisualState>
</VisualStateGroup>
</VisualStateGroupList>
</Setter>
</Style>
<Style x:Key="EntryNormalStyle" TargetType="Entry">
<Setter Property="TextColor" Value="Black"/>
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource TextColourLight}, Dark={StaticResource TextColour}}"/>
<Setter Property="FontSize" Value="15"/>
<Setter Property="FontFamily" Value="Roboto-Regular"/>
</Style>
@ -34,7 +45,7 @@
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Border Margin="0,10" Grid.Row="0" BackgroundColor="#f6f6f8" Stroke="Gray" StrokeShape="RoundRectangle 10" StrokeThickness="0.3">
<Border Margin="0,10" Grid.Row="0" BackgroundColor="{AppThemeBinding Light={StaticResource TileBackgroundLight}, Dark={StaticResource TileBackground}}" Stroke="Gray" StrokeShape="RoundRectangle 10" StrokeThickness="0.3">
<button:SfRadioButton Grid.Row="0" x:Name="radiobutton"
WidthRequest="150"
HeightRequest="50"
@ -47,7 +58,7 @@
</button:SfRadioButton>
</Border>
<Border BackgroundColor="#f6f6f8" Padding="5,10" Margin="0,10" Grid.Row="1" Stroke="Gray" StrokeShape="RoundRectangle 10" StrokeThickness="0.3">
<Border BackgroundColor="{AppThemeBinding Light={StaticResource TileBackgroundLight}, Dark={StaticResource TileBackground}}" Padding="5,10" Margin="0,10" Grid.Row="1" Stroke="Gray" StrokeShape="RoundRectangle 10" StrokeThickness="0.3">
<Grid>
<ScrollView VerticalScrollBarVisibility="Never">
@ -58,15 +69,12 @@
<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">
FontFamily="Roboto-Regular" >
<tabView:SfTabItem.FontSize>
<OnPlatform x:TypeArguments="x:Double">
<On Platform="WinUI" Value ="12"/>
@ -115,7 +123,7 @@
</StackLayout>
</tabView:SfTabItem.Content>
</tabView:SfTabItem>
<tabView:SfTabItem Header="Checked Color" FontFamily="Roboto-Regular" HeightRequest="40">
<tabView:SfTabItem Header="Checked Color" FontFamily="Roboto-Regular">
<tabView:SfTabItem.FontSize>
<OnPlatform x:TypeArguments="x:Double">
<On Platform="WinUI" Value ="12"/>
@ -164,7 +172,7 @@
</StackLayout>
</tabView:SfTabItem.Content>
</tabView:SfTabItem>
<tabView:SfTabItem Header="Unchecked Color" FontFamily="Roboto-Regular" HeightRequest="40">
<tabView:SfTabItem Header="Unchecked Color" FontFamily="Roboto-Regular">
<tabView:SfTabItem.FontSize>
<OnPlatform x:TypeArguments="x:Double">
<On Platform="WinUI" Value ="12"/>
@ -226,10 +234,10 @@
VerticalOptions="CenterAndExpand"
Minimum="1"
Maximum="5"
MaximumTrackColor="#E0E0E0"
MinimumTrackColor="#6200EE"
Value="{Binding Radius,Mode=TwoWay}"
ThumbColor="#6200EE">
MaximumTrackColor="{AppThemeBinding Light=#E0E0E0, Dark=#404040}"
MinimumTrackColor="{AppThemeBinding Light=#4285F4, Dark=White}"
ThumbColor="{AppThemeBinding Light=#4285F4, Dark=White}"
Value="{Binding Radius,Mode=TwoWay}" >
<Slider.Margin>
<OnPlatform x:TypeArguments="Thickness">
<On Platform="WinUI" Value="0,15,0,0"/>

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

@ -8,15 +8,26 @@
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">
BackgroundColor="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}">
<localCore:SampleView.Resources>
<Style x:Key="CheckBoxNormalStyle" TargetType="button:SfCheckBox">
<Setter Property="TextColor" Value="Black"/>
<Style x:Key="CheckBoxNormalStyle" TargetType="button:SfRadioButton">
<Setter Property="FontSize" Value="14"/>
<Setter Property="VisualStateManager.VisualStateGroups">
<VisualStateGroupList>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal">
<VisualState.Setters>
</VisualState.Setters>
</VisualState>
</VisualStateGroup>
</VisualStateGroupList>
</Setter>
</Style>
<Style x:Key="EntryNormalStyle" TargetType="Entry">
<Setter Property="TextColor" Value="Black"/>
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource TextColourLight}, Dark={StaticResource TextColour}}"/>
<Setter Property="FontSize" Value="15"/>
</Style>
</localCore:SampleView.Resources>
@ -39,16 +50,20 @@
HorizontalTextAlignment="Start"
FontSize="15"
FontFamily="Roboto-Regular"
Style="{StaticResource CheckBoxNormalStyle}"
StrokeThickness="{Binding Radius,Mode=TwoWay}">
</button:SfRadioButton>
<Grid Grid.Row="1" Margin="8,5,5,5">
<ScrollView>
<ScrollView HorizontalScrollBarVisibility="Never" VerticalScrollBarVisibility="Never">
<StackLayout Spacing="3">
<Label Text="Options" FontFamily="Roboto-Medium" FontSize="16"/>
<Core:SfTextInputLayout ContainerType="Outlined" Margin="0,10,5,0" ContainerBackground="Transparent"
<Core:SfTextInputLayout ContainerType="Outlined"
InputViewPadding="20"
Margin="0,10,5,0" ContainerBackground="Transparent"
Hint="Text">
<Entry TextColor="#212121" MinimumHeightRequest="0" FontFamily="Roboto-Regular"
<Entry TextColor="{AppThemeBinding Light={StaticResource TextColourLight}, Dark={StaticResource TextColour}}"
MinimumHeightRequest="0" FontFamily="Roboto-Regular"
Style="{StaticResource EntryNormalStyle}"
Placeholder="Enter the Text"
Text="{Binding Text,Mode=TwoWay}" />
@ -58,7 +73,7 @@
HorizontalOptions="Center"
VerticalOptions="Center"
HeightRequest="130">
<tabView:SfTabItem Header="Text Color" FontFamily="Roboto-Regular" HeightRequest="40" >
<tabView:SfTabItem Header="Text Color" FontFamily="Roboto-Regular">
<tabView:SfTabItem.FontSize>
<OnPlatform x:TypeArguments="x:Double">
<On Platform="Android" Value ="11"/>
@ -107,7 +122,7 @@
</StackLayout>
</tabView:SfTabItem.Content>
</tabView:SfTabItem>
<tabView:SfTabItem Header="Checked Color" FontFamily="Roboto-Regular" HeightRequest="40">
<tabView:SfTabItem Header="Checked Color" FontFamily="Roboto-Regular">
<tabView:SfTabItem.FontSize>
<OnPlatform x:TypeArguments="x:Double">
<On Platform="Android" Value ="11"/>
@ -156,7 +171,7 @@
</StackLayout>
</tabView:SfTabItem.Content>
</tabView:SfTabItem>
<tabView:SfTabItem Header="UnChecked Color" FontFamily="Roboto-Regular" HeightRequest="40">
<tabView:SfTabItem Header="UnChecked Color" FontFamily="Roboto-Regular">
<tabView:SfTabItem.FontSize>
<OnPlatform x:TypeArguments="x:Double">
<On Platform="Android" Value ="11"/>
@ -219,10 +234,10 @@
VerticalOptions="CenterAndExpand"
Minimum="1"
Maximum="5"
MaximumTrackColor="#E0E0E0"
MinimumTrackColor="#4285F4"
Value="{Binding Radius,Mode=TwoWay}"
ThumbColor="#4285F4">
MaximumTrackColor="{AppThemeBinding Light=#E0E0E0, Dark=#404040}"
MinimumTrackColor="{AppThemeBinding Light=#4285F4, Dark=White}"
ThumbColor="{AppThemeBinding Light=#4285F4, Dark=White}"
Value="{Binding Radius,Mode=TwoWay}" >
</Slider>
<Label Text="{Binding Radius}"
Grid.Column="1"

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

@ -27,7 +27,7 @@ public class ViewModel : INotifyPropertyChanged
/// <summary>
/// Represents the text color
/// </summary>
private Color textColor = Colors.Black;
private Color textColor = Color.FromRgba("#808080");
/// <summary>
/// Represents the border width

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

@ -26,13 +26,14 @@
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal">
<VisualState.Setters>
<Setter Property="Background" Value="#6200EE"/>
<Setter Property="TextColor" Value="White"/>
<Setter Property="Background" Value="{AppThemeBinding Light={StaticResource PrimaryBackgroundLight}, Dark={StaticResource PrimaryBackground}}"/>
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource PrimaryForegroundLight}, Dark={StaticResource PrimaryForeground}}"/>
</VisualState.Setters>
</VisualState>
<VisualState x:Name="Disabled">
<VisualState.Setters>
<Setter Property="Background" Value="#C8C8C8"/>
<Setter Property="Background" Value="{AppThemeBinding Light={StaticResource PrimaryBackgroundDisabledLight}, Dark={StaticResource PrimaryBackgroundDisabled}}"/>
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource PrimaryForegroundDisabledLight}, Dark={StaticResource PrimaryForegroundDisabled}}"/>
</VisualState.Setters>
</VisualState>
</VisualStateGroup>
@ -44,30 +45,30 @@
<localcore:SampleView.Content>
<Grid ColumnDefinitions="*,*" Background="#F5F5F5" Margin="-7">
<Grid ColumnDefinitions="*,*" Background="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}" 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 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">
<Frame Grid.Row="1" HasShadow="False" CornerRadius="10" Grid.Column="1" Padding="10,0" VerticalOptions="FillAndExpand" HorizontalOptions="Center" Margin="-25" Background="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}">
<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"/>
<Button HeightRequest="30" BackgroundColor="{AppThemeBinding Light={StaticResource PrimaryBackgroundLight}, Dark={StaticResource PrimaryBackground}}" CornerRadius="15" Margin="10,0" HorizontalOptions="Start" WidthRequest="30"/>
<Label Text="1" Margin="22,0,0,0" VerticalOptions="Center" TextColor="{AppThemeBinding Light={StaticResource PrimaryForegroundLight}, Dark={StaticResource PrimaryForeground}}"/>
<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">
<Frame HasShadow="False" Margin="5" Padding="0,5" Grid.Row="1" BorderColor="LightGray" CornerRadius="10" Background="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}">
<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 HorizontalOptions="Start" Text="MasterCard" TextColor="{AppThemeBinding Light={StaticResource TextColourLight}, Dark={StaticResource TextColour}}">
<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 HorizontalOptions="Start" FontFamily="Roboto-Regular" VerticalOptions="Center" FontSize="10" TextColor="{AppThemeBinding Light={StaticResource TextColourLight}, Dark={StaticResource TextColour}}" Text="**** **** **** 4897 | Alexandria">
<Label.GestureRecognizers>
<TapGestureRecognizer Tapped="TapGestureRecognizer_Tapped"/>
</Label.GestureRecognizers>
@ -75,7 +76,7 @@
</StackLayout>
</Grid>
</Frame>
<Frame HasShadow="False" Margin="5" Padding="0,5" Grid.Row="2" CornerRadius="10" BorderColor="LightGray">
<Frame HasShadow="False" Margin="5" Padding="0,5" Grid.Row="2" CornerRadius="10" BorderColor="LightGray" Background="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}">
<Grid ColumnDefinitions="50,*">
<syncfusion:SfRadioButton x:Name="visa" StateChanged="Visa_StateChanged" GroupKey="{StaticResource payment mode}"/>
<StackLayout VerticalOptions="Center" Grid.Column="1">
@ -84,7 +85,7 @@
<TapGestureRecognizer Tapped="TapGestureRecognizer_Tapped_1"/>
</Label.GestureRecognizers>
</Label>
<Label HorizontalOptions="Start" FontFamily="Roboto-Regular" VerticalOptions="Center" FontSize="10" TextColor="Black" Text="**** **** **** 4897 | Alexandria">
<Label HorizontalOptions="Start" FontFamily="Roboto-Regular" VerticalOptions="Center" FontSize="10" TextColor="{AppThemeBinding Light={StaticResource TextColourLight}, Dark={StaticResource TextColour}}" Text="**** **** **** 4897 | Alexandria">
<Label.GestureRecognizers>
<TapGestureRecognizer Tapped="TapGestureRecognizer_Tapped_1"/>
</Label.GestureRecognizers>
@ -92,11 +93,11 @@
</StackLayout>
</Grid>
</Frame>
<Frame HasShadow="False" Margin="5" Padding="0,5" Grid.Row="3" CornerRadius="10" BorderColor="LightGray">
<Frame HasShadow="False" Margin="5" Padding="0,5" Grid.Row="3" CornerRadius="10" BorderColor="LightGray" Background="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}">
<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 HorizontalOptions="Start" Text="Pay On Delivery" TextColor="{AppThemeBinding Light={StaticResource TextColourLight}, Dark={StaticResource TextColour}}">
<Label.GestureRecognizers>
<TapGestureRecognizer Tapped="TapGestureRecognizer_Tapped_2"/>
</Label.GestureRecognizers>
@ -105,21 +106,21 @@
</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"/>
<Button HeightRequest="30" BackgroundColor="{AppThemeBinding Light={StaticResource PrimaryBackgroundLight}, Dark={StaticResource PrimaryBackground}}" CornerRadius="15" Margin="10,0" HorizontalOptions="Start" WidthRequest="30"/>
<Label Text="2" Margin="22,0,0,0" VerticalOptions="Center" TextColor="{AppThemeBinding Light={StaticResource PrimaryForegroundLight}, Dark={StaticResource PrimaryForeground}}"/>
<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">
<Frame HasShadow="False" Margin="5" Padding="0,5" Grid.Row="5" CornerRadius="10" BorderColor="LightGray" BackgroundColor="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}" >
<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">
<Frame HasShadow="False" Margin="5" Padding="0,5" Grid.Row="6" CornerRadius="10" BorderColor="LightGray" BackgroundColor="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}" >
<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">
<Frame HasShadow="False" Margin="5" Padding="0,5" Grid.Row="7" CornerRadius="10" BorderColor="LightGray" BackgroundColor="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}" >
<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>

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

@ -22,13 +22,14 @@
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal">
<VisualState.Setters>
<Setter Property="Background" Value="#6200EE"/>
<Setter Property="TextColor" Value="White"/>
<Setter Property="Background" Value="{AppThemeBinding Light={StaticResource PrimaryBackgroundLight}, Dark={StaticResource PrimaryBackground}}"/>
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource PrimaryForegroundLight}, Dark={StaticResource PrimaryForeground}}"/>
</VisualState.Setters>
</VisualState>
<VisualState x:Name="Disabled">
<VisualState.Setters>
<Setter Property="Background" Value="#C8C8C8"/>
<Setter Property="Background" Value="{AppThemeBinding Light={StaticResource PrimaryBackgroundDisabledLight}, Dark={StaticResource PrimaryBackgroundDisabled}}"/>
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource PrimaryForegroundDisabledLight}, Dark={StaticResource PrimaryForegroundDisabled}}"/>
</VisualState.Setters>
</VisualState>
</VisualStateGroup>
@ -43,8 +44,8 @@
<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">
<Label Text="CREDIT AND DEBIT CARDS" FontSize="14" Margin="10" FontAttributes="Bold" TextColor="{AppThemeBinding Light={StaticResource TextColourLight}, Dark={StaticResource TextColour}}" FontFamily="Roboto-Regular"/>
<Frame CornerRadius="10" Padding="5" HasShadow="False" BorderColor="LightGray" Margin="10,0" Background="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}">
<Grid ColumnDefinitions="40,*">
<syncfusion:SfRadioButton VerticalOptions="Start" x:Name="bankDebitCard" GroupKey="{StaticResource payment mode}"/>
<StackLayout Grid.Column="1" VerticalOptions="Center">
@ -53,7 +54,7 @@
<TapGestureRecognizer Tapped="TapGestureRecognizer_Tapped_3"/>
</Label.GestureRecognizers>
</Label>
<Label HorizontalOptions="Start" FontAttributes="Bold" FontSize="10" TextColor="Black" Text="**5028 | Aaron">
<Label HorizontalOptions="Start" FontAttributes="Bold" FontSize="10" TextColor="{AppThemeBinding Light={StaticResource TextColourLight}, Dark={StaticResource TextColour}}" Text="**5028 | Aaron">
<Label.GestureRecognizers>
<TapGestureRecognizer Tapped="TapGestureRecognizer_Tapped_3"/>
</Label.GestureRecognizers>
@ -61,7 +62,7 @@
</StackLayout>
</Grid>
</Frame>
<Frame CornerRadius="10" Padding="5" HasShadow="False" BorderColor="LightGray" Margin="10,0">
<Frame CornerRadius="10" Padding="5" HasShadow="False" BorderColor="LightGray" Margin="10,0" Background="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}">
<Grid ColumnDefinitions="40,*">
<syncfusion:SfRadioButton VerticalOptions="Start" x:Name="bankCreditCard" GroupKey="{StaticResource payment mode}"/>
<StackLayout Grid.Column="1" VerticalOptions="Center">
@ -70,7 +71,7 @@
<TapGestureRecognizer Tapped="TapGestureRecognizer_Tapped_1"/>
</Label.GestureRecognizers>
</Label>
<Label HorizontalOptions="Start" FontAttributes="Bold" FontSize="10" TextColor="Black" Text="**5028 | Aaron">
<Label HorizontalOptions="Start" FontAttributes="Bold" FontSize="10" TextColor="{AppThemeBinding Light={StaticResource TextColourLight}, Dark={StaticResource TextColour}}" Text="**5028 | Aaron">
<Label.GestureRecognizers>
<TapGestureRecognizer Tapped="TapGestureRecognizer_Tapped_1"/>
</Label.GestureRecognizers>
@ -78,7 +79,7 @@
</StackLayout>
</Grid>
</Frame>
<Frame CornerRadius="10" Padding="5" HasShadow="False" BorderColor="LightGray" Margin="10,0">
<Frame CornerRadius="10" Padding="5" HasShadow="False" BorderColor="LightGray" Margin="10,0" Background="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}">
<Grid ColumnDefinitions="40,*">
<syncfusion:SfRadioButton VerticalOptions="Start" x:Name="creditCard" GroupKey="{StaticResource payment mode}"/>
<StackLayout Grid.Column="1" VerticalOptions="Center">
@ -87,7 +88,7 @@
<TapGestureRecognizer Tapped="TapGestureRecognizer_Tapped_2"/>
</Label.GestureRecognizers>
</Label>
<Label HorizontalOptions="Start" FontAttributes="Bold" FontSize="10" TextColor="Black" Text="**0859 | Stephan">
<Label HorizontalOptions="Start" FontAttributes="Bold" FontSize="10" TextColor="{AppThemeBinding Light={StaticResource TextColourLight}, Dark={StaticResource TextColour}}" Text="**0859 | Stephan">
<Label.GestureRecognizers>
<TapGestureRecognizer Tapped="TapGestureRecognizer_Tapped_2"/>
</Label.GestureRecognizers>
@ -95,14 +96,14 @@
</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">
<Label Text="MORE WAYS TO PAY" FontSize="14" Margin="10,25,10,10" FontAttributes="Bold" TextColor="{AppThemeBinding Light={StaticResource TextColourLight}, Dark={StaticResource TextColour}}" FontFamily="Roboto-Regular"/>
<Frame CornerRadius="10" Padding="5" HasShadow="False" BorderColor="LightGray" Margin="10,0" Background="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}">
<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">
<Frame CornerRadius="10" Padding="5" HasShadow="False" BorderColor="LightGray" Margin="10,0" Background="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}">
<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">
<Frame CornerRadius="10" Padding="5" HasShadow="False" BorderColor="LightGray" Margin="10,0" Background="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}">
<HorizontalStackLayout>
<syncfusion:SfRadioButton x:Name="cashButton" GroupKey="{StaticResource payment mode}"/>
<StackLayout>

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

@ -10,6 +10,8 @@
<localCore:SampleView.Resources>
<imageExtension:SfImageSourceConverter x:Key="imageconverter"/>
<Color x:Key="lightThemeColor">#E7E0EC</Color>
<Color x:Key="darkThemeColor">#49454F</Color>
</localCore:SampleView.Resources>
<localCore:SampleView.BindingContext>
@ -26,7 +28,6 @@
<localCore:SampleView.Content>
<Grid ColumnDefinitions=".45*,420">
<Grid Grid.Column="0"
Background="#F7F7F7"
RowDefinitions="0.2*,0.8*">
<VerticalStackLayout Margin="22,20,15,12"
Spacing="5"
@ -70,7 +71,6 @@
<Label Text="{Binding TotalPrice}"
Margin="0,12,0,0"
TextColor="#6200EE"
FontSize="20"
FontFamily="RobotoMedium"
FontAttributes="Bold"/>
@ -91,12 +91,10 @@
SegmentHeight="36"
CornerRadius="36"
SegmentCornerRadius="36"
Background="Transparent"
SelectedIndex="{Binding SelectedColoredIndex, Mode=TwoWay}"
ItemsSource="{Binding SpeakerColorOptionsInfo}">
<buttons:SfSegmentedControl.SelectionIndicatorSettings>
<buttons:SelectionIndicatorSettings SelectionIndicatorPlacement="Border"
Background="#6200EE" />
<buttons:SelectionIndicatorSettings SelectionIndicatorPlacement="Border" />
</buttons:SfSegmentedControl.SelectionIndicatorSettings>
</buttons:SfSegmentedControl>
</StackLayout>
@ -122,8 +120,7 @@
FontFamily="Roboto-Regular" />
</buttons:SfSegmentedControl.TextStyle>
<buttons:SfSegmentedControl.SelectionIndicatorSettings>
<buttons:SelectionIndicatorSettings Background="#6200EE"
TextColor="White"/>
<buttons:SelectionIndicatorSettings SelectionIndicatorPlacement="Fill" />
</buttons:SfSegmentedControl.SelectionIndicatorSettings>
</buttons:SfSegmentedControl>
</StackLayout>
@ -148,17 +145,15 @@
WidthRequest="330"
VerticalOptions="Fill"
Stroke="Transparent"
SegmentBackground="{AppThemeBinding Light={StaticResource lightThemeColor}, Dark={StaticResource darkThemeColor}}"
HorizontalOptions="Start"
SegmentBackground="#DCDCDD"
ItemsSource="{Binding SpeakerDeliveryOptionsInfo}"
SelectedIndex="{Binding SelectedDeliveryOption, Mode=TwoWay}">
<buttons:SfSegmentedControl.TextStyle>
<buttons:SegmentTextStyle FontSize="14" FontFamily="Roboto" />
<buttons:SegmentTextStyle FontSize="14"
FontFamily="Roboto" />
</buttons:SfSegmentedControl.TextStyle>
<buttons:SfSegmentedControl.SelectionIndicatorSettings>
<buttons:SelectionIndicatorSettings Background="#6200EE" />
</buttons:SfSegmentedControl.SelectionIndicatorSettings>
</buttons:SfSegmentedControl>
</buttons:SfSegmentedControl>
</HorizontalStackLayout>
</StackLayout>
</StackLayout>
@ -182,11 +177,9 @@
SelectedIndex="0"
ItemsSource="{Binding SpeakerResultsOptionInfo}">
<buttons:SfSegmentedControl.TextStyle>
<buttons:SegmentTextStyle FontSize="14" FontFamily="Roboto" />
<buttons:SegmentTextStyle FontSize="14"
FontFamily="Roboto" />
</buttons:SfSegmentedControl.TextStyle>
<buttons:SfSegmentedControl.SelectionIndicatorSettings>
<buttons:SelectionIndicatorSettings Background="#6200EE" />
</buttons:SfSegmentedControl.SelectionIndicatorSettings>
<buttons:SfSegmentedControl.Margin>
<OnPlatform x:TypeArguments="thickness:Thickness">
<On Platform="MacCatalyst" Value="3,20,3,0"/>

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

@ -41,7 +41,6 @@
</StackLayout>
<Label Text="{Binding TotalPrice}"
TextColor="#6200EE"
FontFamily="RobotoMedium"
FontSize="22"/>
<StackLayout Margin="0,12,0,0"
@ -58,12 +57,10 @@
SegmentHeight="36"
CornerRadius="36"
SegmentCornerRadius="36"
Background="Transparent"
SelectedIndex="{Binding SelectedColoredIndex, Mode=TwoWay}"
ItemsSource="{Binding SpeakerColorOptionsInfo}">
<buttons:SfSegmentedControl.SelectionIndicatorSettings>
<buttons:SelectionIndicatorSettings SelectionIndicatorPlacement="Border"
Background="#6200EE" />
<buttons:SelectionIndicatorSettings SelectionIndicatorPlacement="Border" />
</buttons:SfSegmentedControl.SelectionIndicatorSettings>
<buttons:SfSegmentedControl.Margin>
<OnPlatform x:TypeArguments="thickness:Thickness">
@ -92,10 +89,6 @@
<buttons:SegmentTextStyle FontSize="14"
FontFamily="Roboto-Regular" />
</buttons:SfSegmentedControl.TextStyle>
<buttons:SfSegmentedControl.SelectionIndicatorSettings>
<buttons:SelectionIndicatorSettings Background="#6200EE"
TextColor="White"/>
</buttons:SfSegmentedControl.SelectionIndicatorSettings>
</buttons:SfSegmentedControl>
</StackLayout>
@ -118,15 +111,12 @@
HorizontalOptions="Start"
Stroke="Transparent"
WidthRequest="330"
SegmentBackground="#DCDCDD"
ItemsSource="{Binding SpeakerDeliveryOptionsInfo}"
SelectedIndex="{Binding SelectedDeliveryOption, Mode=TwoWay}">
<buttons:SfSegmentedControl.TextStyle>
<buttons:SegmentTextStyle FontSize="14" FontFamily="Roboto" />
<buttons:SegmentTextStyle FontSize="14"
FontFamily="Roboto" />
</buttons:SfSegmentedControl.TextStyle>
<buttons:SfSegmentedControl.SelectionIndicatorSettings>
<buttons:SelectionIndicatorSettings Background="#6200EE" />
</buttons:SfSegmentedControl.SelectionIndicatorSettings>
</buttons:SfSegmentedControl>
</StackLayout>
<StackLayout Grid.Row="1"
@ -138,16 +128,13 @@
<buttons:SfSegmentedControl x:Name="segmentedControlResultsOption"
ItemsSource="{Binding SpeakerResultsOptionInfo}"
VisibleSegmentsCount="1"
WidthRequest="{OnPlatform iOS=390,Android=360}"
Margin="0,12,0,0"
HorizontalOptions="Start"
HorizontalOptions="Fill"
SelectedIndex="0" >
<buttons:SfSegmentedControl.TextStyle>
<buttons:SegmentTextStyle FontSize="14" FontFamily="Roboto" />
<buttons:SegmentTextStyle FontSize="14"
FontFamily="Roboto" />
</buttons:SfSegmentedControl.TextStyle>
<buttons:SfSegmentedControl.SelectionIndicatorSettings>
<buttons:SelectionIndicatorSettings Background="#6200EE" />
</buttons:SfSegmentedControl.SelectionIndicatorSettings>
</buttons:SfSegmentedControl>
</StackLayout>
</StackLayout>

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

@ -6,7 +6,8 @@
xmlns:ev="clr-namespace:Syncfusion.Maui.Core;assembly=Syncfusion.Maui.Core"
xmlns:local="clr-namespace:SampleBrowser.Maui.Buttons.Switch"
xmlns:localcore="clr-namespace:SampleBrowser.Maui.Base;assembly=SampleBrowser.Maui.Base"
xmlns:syncfusion="clr-namespace:Syncfusion.Maui.Buttons;assembly=Syncfusion.Maui.Buttons">
xmlns:syncfusion="clr-namespace:Syncfusion.Maui.Buttons;assembly=Syncfusion.Maui.Buttons"
BackgroundColor="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}">
<localcore:SampleView.Resources>
@ -303,6 +304,61 @@
</Setter.Value>
</Setter>
</Style>
<Style TargetType="syncfusion:SfSwitch" ApplyToDerivedTypes="True" x:Key="DisabledSwitch">
<Setter Property="VisualStateManager.VisualStateGroups">
<VisualStateGroupList>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="OnDisabled">
<VisualState.Setters>
<Setter Property="SwitchSettings">
<Setter.Value>
<syncfusion:SwitchSettings TrackBackground="{AppThemeBinding Light={StaticResource SwitchActiveThumbColourPressed}, Dark={StaticResource PreviewAreaBorder}}"
ThumbBackground="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource SidebarBackground}}"
IconColor="{AppThemeBinding Light={StaticResource PreviewAreaBorderLight}, Dark={StaticResource PreviewAreaBorder}}"
TrackStroke="{AppThemeBinding Light={StaticResource PreviewAreaBorderLight}, Dark={StaticResource PreviewAreaBorder}}"
ThumbStroke="{AppThemeBinding Light={StaticResource PreviewAreaBorderLight}, Dark={StaticResource SidebarBackground}}"
ThumbWidthRequest="{DynamicResource SfSwitchOnThumbWidthRequest}"
ThumbHeightRequest="{DynamicResource SfSwitchOnThumbHeightRequest}"
CustomPath="M14.2051 0.744141L15.207 1.74609L5.69727 11.2559L0.792969 6.35156L1.79492 5.34961L5.69727 9.25195L14.2051 0.744141Z"/>
</Setter.Value>
</Setter>
</VisualState.Setters>
</VisualState>
<VisualState x:Name="OffDisabled">
<VisualState.Setters>
<Setter Property="SwitchSettings">
<Setter.Value>
<syncfusion:SwitchSettings TrackBackground="{AppThemeBinding Light={StaticResource TileBorderLight}, Dark={StaticResource SampleBrowserBackground}}"
ThumbBackground="{AppThemeBinding Light={StaticResource SwitchActiveThumbColourPressed}, Dark={StaticResource TileHeaderBorder}}"
TrackStroke="{AppThemeBinding Light={StaticResource TextColour1}, Dark={StaticResource SwitchInactiveBackground}}"
ThumbStroke="{AppThemeBinding Light={StaticResource SwitchActiveThumbColourPressed}, Dark={StaticResource TileHeaderBorder}}"
ThumbWidthRequest="{DynamicResource SfSwitchOffThumbWidthRequest}"
ThumbHeightRequest="{DynamicResource SfSwitchOffThumbHeightRequest}"
TrackStrokeThickness="{DynamicResource SfSwitchTrackStrokeThickness}"/>
</Setter.Value>
</Setter>
</VisualState.Setters>
</VisualState>
<VisualState x:Name="IndeterminateDisabled">
<VisualState.Setters>
<Setter Property="SwitchSettings">
<Setter.Value>
<syncfusion:SwitchSettings TrackBackground="{AppThemeBinding Light={StaticResource SwitchActiveThumbColourPressed}, Dark={StaticResource PreviewAreaBorder}}"
ThumbBackground="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource SidebarBackground}}"
IconColor="{AppThemeBinding Light={StaticResource PreviewAreaBorderLight}, Dark={StaticResource PreviewAreaBorder}}"
TrackStroke="{AppThemeBinding Light={StaticResource PreviewAreaBorderLight}, Dark={StaticResource PreviewAreaBorder}}"
ThumbStroke="{AppThemeBinding Light={StaticResource PreviewAreaBorderLight}, Dark={StaticResource SidebarBackground}}"
ThumbWidthRequest="{DynamicResource SfSwitchOnThumbWidthRequest}"
ThumbHeightRequest="{DynamicResource SfSwitchOnThumbHeightRequest}"
CustomPath="M0.617188 0.910156H15.3828V3.08984H0.617188V0.910156Z"/>
</Setter.Value>
</Setter>
</VisualState.Setters>
</VisualState>
</VisualStateGroup>
</VisualStateGroupList>
</Setter>
</Style>
</localcore:SampleView.Resources>
@ -315,7 +371,7 @@
<Style TargetType="Label">
<Setter Property="Margin" Value="15,0" />
<Setter Property="FontFamily" Value="Roboto" />
<Setter Property="TextColor" Value="#1C1B1F" />
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource SidebaritemTextColourLight}, Dark={StaticResource SidebaritemTextColour}}" />
<Setter Property="VerticalOptions" Value="Center" />
<Setter Property="HorizontalOptions" Value="Center" />
</Style>
@ -364,7 +420,7 @@
Grid.Row="1"
Grid.Column="0"
FontSize="12"
Text="Material 3"/>
Text="Material"/>
<Label
Grid.Row="1"
Grid.Column="1"
@ -386,7 +442,7 @@
<Grid
Margin="0,10,10,10"
BackgroundColor="White"
BackgroundColor="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}"
HeightRequest="75">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
@ -447,7 +503,7 @@
<Grid
Margin="0,10,10,10"
BackgroundColor="White"
BackgroundColor="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}"
HeightRequest="70">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
@ -463,17 +519,20 @@
Grid.Column="0"
AllowIndeterminateState="True"
IsEnabled="False"
Style="{StaticResource DisabledSwitch}"
IsOn="False" />
<syncfusion:SfSwitch
Grid.Row="0"
Grid.Column="1"
AllowIndeterminateState="True"
Style="{StaticResource DisabledSwitch}"
IsEnabled="False"
IsOn="{x:Null}" />
<syncfusion:SfSwitch
Grid.Row="0"
Grid.Column="2"
AllowIndeterminateState="True"
Style="{StaticResource DisabledSwitch}"
IsEnabled="False"
IsOn="True" />
<Label
@ -504,7 +563,7 @@
<Grid
Margin="0,10,10,10"
BackgroundColor="White"
BackgroundColor="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}"
HeightRequest="70">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />

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

@ -6,7 +6,8 @@
xmlns:button="clr-namespace:Syncfusion.Maui.Buttons;assembly=Syncfusion.Maui.Buttons"
xmlns:ev="clr-namespace:Syncfusion.Maui.Core;assembly=Syncfusion.Maui.Core"
xmlns:local="clr-namespace:SampleBrowser.Maui.Buttons.Switch"
xmlns:localcore="clr-namespace:SampleBrowser.Maui.Base;assembly=SampleBrowser.Maui.Base">
xmlns:localcore="clr-namespace:SampleBrowser.Maui.Base;assembly=SampleBrowser.Maui.Base"
BackgroundColor="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}">
<localcore:SampleView.Content>
<Grid>

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

@ -7,12 +7,13 @@
xmlns:ev="clr-namespace:Syncfusion.Maui.Core;assembly=Syncfusion.Maui.Core"
xmlns:imageExtension="clr-namespace:SampleBrowser.Maui.Base.Converters;assembly=SampleBrowser.Maui.Base"
xmlns:local="clr-namespace:SampleBrowser.Maui.Buttons.Switch"
xmlns:localcore="clr-namespace:SampleBrowser.Maui.Base;assembly=SampleBrowser.Maui.Base">
xmlns:localcore="clr-namespace:SampleBrowser.Maui.Base;assembly=SampleBrowser.Maui.Base"
BackgroundColor="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}">
<localcore:SampleView.Resources>
<imageExtension:SfImageSourceConverter x:Key="imageconverter" />
<Style TargetType="Label">
<Setter Property="TextColor" Value="#1C1B1F" />
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource TextColourLight}, Dark={StaticResource TextColour}}" />
<Setter Property="FontFamily" Value="Roboto" />
<Setter Property="VerticalOptions" Value="Center" />
</Style>

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

@ -6,7 +6,8 @@
xmlns:button="clr-namespace:Syncfusion.Maui.Buttons;assembly=Syncfusion.Maui.Buttons"
xmlns:ev="clr-namespace:Syncfusion.Maui.Core;assembly=Syncfusion.Maui.Core"
xmlns:local="clr-namespace:SampleBrowser.Maui.Buttons.Switch"
xmlns:localcore="clr-namespace:SampleBrowser.Maui.Base;assembly=SampleBrowser.Maui.Base">
xmlns:localcore="clr-namespace:SampleBrowser.Maui.Base;assembly=SampleBrowser.Maui.Base"
BackgroundColor="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}">
<localcore:SampleView.Content>
<Grid>

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

@ -3,11 +3,13 @@
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:SampleBrowser.Maui.Calendar"
xmlns:base="clr-namespace:SampleBrowser.Maui.Base;assembly=SampleBrowser.Maui.Base"
xmlns:syncTheme="clr-namespace:Syncfusion.Maui.Themes;assembly=Syncfusion.Maui.Core"
x:Class="SampleBrowser.Maui.Calendar.App">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<base:SampleBrowserStyles/>
<syncTheme:SyncfusionThemeResourceDictionary />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>

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

@ -82,13 +82,15 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="SampleBrowser.Maui.Base" version="24.2.3" />
<PackageReference Include="Syncfusion.Maui.Core" version="24.2.3" />
<PackageReference Include="Syncfusion.Maui.Inputs" version="24.2.3" />
<PackageReference Include="Syncfusion.Maui.TabView" version="24.2.3" />
<PackageReference Include="Syncfusion.Maui.DataSource" version="24.2.3" />
<PackageReference Include="Syncfusion.Maui.GridCommon" version="24.2.3" />
<PackageReference Include="Syncfusion.Maui.ListView" version="24.2.3" />
<PackageReference Include="Syncfusion.Maui.Calendar" version="24.2.3" />
<PackageReference Include="SampleBrowser.Maui.Base" version="25.1.35" />
<PackageReference Include="Syncfusion.Maui.Core" version="25.1.35" />
<PackageReference Include="Syncfusion.Maui.Inputs" version="25.1.35" />
<PackageReference Include="Syncfusion.Maui.Popup" version="25.1.35" />
<PackageReference Include="Syncfusion.Maui.TabView" version="25.1.35" />
<PackageReference Include="Syncfusion.Maui.DataSource" version="25.1.35" />
<PackageReference Include="Syncfusion.Maui.GridCommon" version="25.1.35" />
<PackageReference Include="Syncfusion.Maui.ListView" version="25.1.35" />
<PackageReference Include="Syncfusion.Maui.Calendar" version="25.1.35" />
<PackageReference Include="Syncfusion.Maui.Buttons" version="25.1.35" />
</ItemGroup>
</Project>

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

@ -26,6 +26,11 @@ namespace SampleBrowser.Maui.Calendar.SfCalendar
/// </summary>
private SfComboBox? comboBox;
/// <summary>
/// Check the application theme is light or dark.
/// </summary>
private bool isLightTheme = Application.Current?.RequestedTheme == AppTheme.Light;
/// <summary>
/// Begins when the behavior attached to the view
/// </summary>
@ -36,7 +41,7 @@ namespace SampleBrowser.Maui.Calendar.SfCalendar
Border border = bindable.Content.FindByName<Border>("border");
border.IsVisible = true;
#if MACCATALYST
border.Stroke = Color.FromArgb("#E6E6E6");
border.Stroke = isLightTheme ? Colors.White : Color.FromRgba("#1C1B1F");
#else
border.Stroke = Colors.Transparent;
#endif
@ -51,7 +56,8 @@ namespace SampleBrowser.Maui.Calendar.SfCalendar
#endif
this.calendar = bindable.Content.FindByName<SfCalendar>("circleCalendar");
#endif
this.calendar.SelectionBackground = Color.FromRgba("#0A3A74").WithAlpha(0.5f);
this.calendar.SelectionBackground = isLightTheme ? Color.FromRgba("#0A3A74").WithAlpha(0.5f) : Color.FromRgba("#3494EC").WithAlpha(0.5f);
this.calendar.TodayHighlightBrush = isLightTheme ? Color.FromRgba("#0A3A74") : Color.FromRgba("#3494EC");
this.calendar.SelectionShape = CalendarSelectionShape.Circle;
this.comboBox = bindable.Content.FindByName<SfComboBox>("comboBox");
this.comboBox.ItemsSource = new List<string>() { "Circle", "Rectangle" };

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

@ -4,20 +4,19 @@
xmlns:local="clr-namespace:SampleBrowser.Maui.Calendar.SfCalendar"
xmlns:calendar="clr-namespace:Syncfusion.Maui.Calendar;assembly=Syncfusion.Maui.Calendar"
xmlns:localCore="clr-namespace:SampleBrowser.Maui.Base;assembly=SampleBrowser.Maui.Base"
xmlns:editors="clr-namespace:Syncfusion.Maui.Inputs;assembly=Syncfusion.Maui.Inputs" Background="WhiteSmoke" Margin="-4, -4, -6, -6">
xmlns:editors="clr-namespace:Syncfusion.Maui.Inputs;assembly=Syncfusion.Maui.Inputs" Background="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}" Margin="-4, -4, -6, -6">
<localCore:SampleView.Content>
<Grid WidthRequest="346" HeightRequest="363">
<Frame IsVisible="False" x:Name="frame" Background="White" HasShadow="False" CornerRadius="10" HorizontalOptions="Center" VerticalOptions="Center" Margin="0" Padding="5">
<Frame IsVisible="False" x:Name="frame" Background="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}" HasShadow="False" CornerRadius="10" HorizontalOptions="Center" VerticalOptions="Center" Margin="0" Padding="5">
<calendar:SfCalendar x:Name="circleCalendar"
ShowTrailingAndLeadingDates="False"
NavigationDirection="Horizontal"
TodayHighlightBrush="#0A3A74"
AllowViewNavigation="False">
<calendar:SfCalendar.MonthView>
<calendar:CalendarMonthView CellTemplate="{Binding Template}">
<calendar:CalendarMonthView.HeaderView>
<calendar:CalendarMonthHeaderView Background="#F1F7FF"/>
<calendar:CalendarMonthHeaderView Background="{AppThemeBinding Light={StaticResource PreviewAreaBackgroundLight}, Dark={StaticResource PreviewAreaBackground}}"/>
</calendar:CalendarMonthView.HeaderView>
</calendar:CalendarMonthView>
</calendar:SfCalendar.MonthView>
@ -27,16 +26,15 @@
</calendar:SfCalendar>
</Frame>
<Border IsVisible="False" x:Name="border" Background="White" StrokeThickness="2" StrokeShape="RoundRectangle 10,10,10,10" HorizontalOptions="Center" VerticalOptions="Center" Margin="0" Padding="5">
<Border IsVisible="False" x:Name="border" Background="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}" StrokeThickness="2" StrokeShape="RoundRectangle 10,10,10,10" HorizontalOptions="Center" VerticalOptions="Center" Margin="0" Padding="5">
<calendar:SfCalendar x:Name="iOSCircleCalendar"
ShowTrailingAndLeadingDates="False"
NavigationDirection="Horizontal"
TodayHighlightBrush="#0A3A74"
AllowViewNavigation="False">
<calendar:SfCalendar.MonthView>
<calendar:CalendarMonthView CellTemplate="{Binding Template}">
<calendar:CalendarMonthView.HeaderView>
<calendar:CalendarMonthHeaderView Background="#F1F7FF"/>
<calendar:CalendarMonthHeaderView Background="{AppThemeBinding Light={StaticResource PreviewAreaBackgroundLight}, Dark={StaticResource PreviewAreaBackground}}"/>
</calendar:CalendarMonthView.HeaderView>
</calendar:CalendarMonthView>
</calendar:SfCalendar.MonthView>
@ -63,10 +61,11 @@
FontSize="14"
VerticalOptions="Center"
HorizontalOptions="Start"
TextColor="Gray"/>
TextColor="{AppThemeBinding Light={StaticResource TileTextColourAlt1Light}, Dark={StaticResource TileTextColourAlt1}}"/>
<editors:SfComboBox x:Name="comboBox" Grid.Column="1"
<editors:SfComboBox x:Name="comboBox" Grid.Column="1" IsClearButtonVisible="False"
Margin="0,15,0,0" VerticalOptions="Center"
TextColor="{AppThemeBinding Light={StaticResource PlaceholderTextColourLight}, Dark={StaticResource PlaceholderTextColour}}"
HorizontalOptions="Start"/>
</Grid>
</StackLayout>

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

@ -14,6 +14,11 @@ namespace SampleBrowser.Maui.Calendar.SfCalendar;
public class AppearanceViewModel : INotifyPropertyChanged
{
/// <summary>
/// Check the application theme is light or dark.
/// </summary>
private bool isLightTheme = Application.Current?.RequestedTheme == AppTheme.Light;
private DataTemplate circleTemplate;
private DataTemplate rectTemplate;
@ -42,14 +47,14 @@ public class AppearanceViewModel : INotifyPropertyChanged
Grid grid = new Grid();
Border border = new Border();
border.BackgroundColor = Color.FromRgba("#F5F5F5");
border.BackgroundColor = isLightTheme ? Color.FromRgba("#F5F5F5") : Color.FromRgba("#E6E1E51F");
border.StrokeShape = new RoundRectangle()
{
CornerRadius = new CornerRadius(25)
};
border.SetBinding(Border.StrokeThicknessProperty, "Date", converter: new DateToStrokeConverter());
border.Stroke = Color.FromArgb("#0A3A74");
border.Stroke = isLightTheme ? Color.FromArgb("#0A3A74") : Color.FromArgb("#3494EC");
Label label = new Label();
label.SetBinding(Label.TextProperty, "Date.Day");
@ -69,14 +74,14 @@ public class AppearanceViewModel : INotifyPropertyChanged
Grid grid = new Grid();
Border border = new Border();
border.BackgroundColor = Color.FromRgba("#F5F5F5");
border.BackgroundColor = isLightTheme ? Color.FromRgba("#F5F5F5") : Color.FromRgba("#E6E1E51F");
border.StrokeShape = new RoundRectangle()
{
CornerRadius = new CornerRadius(2)
};
border.SetBinding(Border.StrokeThicknessProperty, "Date", converter: new DateToStrokeConverter());
border.Stroke = Color.FromArgb("#0A3A74");
border.Stroke = isLightTheme ? Color.FromArgb("#0A3A74") : Color.FromArgb("#3494EC");
Label label = new Label();
label.SetBinding(Label.TextProperty, "Date.Day");

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

@ -1,12 +1,13 @@
<localCore:SampleView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="SampleBrowser.Maui.Calendar.SfCalendar.AppointmentBooking"
xmlns:popUp="clr-namespace:Syncfusion.Maui.Popup;assembly=Syncfusion.Maui.Popup"
xmlns:calendar="clr-namespace:Syncfusion.Maui.Calendar;assembly=Syncfusion.Maui.Calendar"
xmlns:localCore="clr-namespace:SampleBrowser.Maui.Base;assembly=SampleBrowser.Maui.Base" BackgroundColor="WhiteSmoke" Margin="-4,-4,-6,-6">
xmlns:localCore="clr-namespace:SampleBrowser.Maui.Base;assembly=SampleBrowser.Maui.Base" BackgroundColor="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}" Margin="-4,-4,-6,-6">
<Grid>
<Grid IsVisible="False" x:Name="deskTop" HorizontalOptions="Center" VerticalOptions="Center" HeightRequest="500" WidthRequest="350">
<Frame IsVisible="False" x:Name="frame" BorderColor="WhiteSmoke" HasShadow="False" CornerRadius="10" BackgroundColor="White" HorizontalOptions="Center" Margin="0" Padding="0">
<Grid Background="#f5eeff">
<Frame IsVisible="False" x:Name="frame" BorderColor="{AppThemeBinding Light={StaticResource BorderLight}, Dark={StaticResource Border}}" HasShadow="False" CornerRadius="10" BackgroundColor="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}" HorizontalOptions="Center" Margin="0" Padding="0">
<Grid Background="{AppThemeBinding Light={StaticResource BlackOverlaySelectedLight}, Dark={StaticResource BlackOverlaySelected}}">
<Grid.RowDefinitions>
<RowDefinition Height="0.1*"/>
<RowDefinition Height="0.35*"/>
@ -14,27 +15,27 @@
<RowDefinition Height="0.35*"/>
<RowDefinition Height="0.1*"/>
</Grid.RowDefinitions>
<Label Grid.Row="0" HorizontalTextAlignment="Center" VerticalTextAlignment="Center" FontSize="20" BackgroundColor="White" TextColor="Black" Text="Book an Appointment"/>
<calendar:SfCalendar Grid.Row="1" x:Name="appointmentBooking" EnablePastDates="False" AllowViewNavigation="False" SelectionChanged="AppointmentBooking_SelectionChanged" BackgroundColor="White" NavigationDirection="Horizontal">
<Label Grid.Row="0" HorizontalTextAlignment="Center" VerticalTextAlignment="Center" FontSize="20" BackgroundColor="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}" TextColor="{AppThemeBinding Light={StaticResource TextColourLight}, Dark={StaticResource TextColour}}" Text="Book an Appointment"/>
<calendar:SfCalendar Grid.Row="1" x:Name="appointmentBooking" EnablePastDates="False" AllowViewNavigation="False" SelectionChanged="AppointmentBooking_SelectionChanged" BackgroundColor="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}" NavigationDirection="Horizontal">
<calendar:SfCalendar.HeaderView>
<calendar:CalendarHeaderView Background="#f5eeff"/>
<calendar:CalendarHeaderView Background="{AppThemeBinding Light={StaticResource BlackOverlaySelectedLight}, Dark={StaticResource BlackOverlaySelected}}"/>
</calendar:SfCalendar.HeaderView>
<calendar:SfCalendar.MonthView>
<calendar:CalendarMonthView NumberOfVisibleWeeks="2">
<calendar:CalendarMonthView.HeaderView>
<calendar:CalendarMonthHeaderView Background="#f5eeff"/>
<calendar:CalendarMonthHeaderView Background="{AppThemeBinding Light={StaticResource BlackOverlaySelectedLight}, Dark={StaticResource BlackOverlaySelected}}"/>
</calendar:CalendarMonthView.HeaderView>
</calendar:CalendarMonthView>
</calendar:SfCalendar.MonthView>
</calendar:SfCalendar>
<Label Grid.Row="2" x:Name="label" HorizontalTextAlignment="Center" VerticalTextAlignment="Center" FontSize="20" TextColor="Black" />
<Label Grid.Row="2" x:Name="label" HorizontalTextAlignment="Center" VerticalTextAlignment="Center" FontSize="20" TextColor="{AppThemeBinding Light={StaticResource TextColourLight}, Dark={StaticResource TextColour}}" />
<Grid Grid.Row="3">
<FlexLayout x:Name="flexLayout" Wrap="Wrap"
JustifyContent="SpaceAround" AlignItems="Center" VerticalOptions="Center" HorizontalOptions="Center">
<FlexLayout.Resources>
<Style TargetType="Button">
<Setter Property="TextColor" Value="Black"/>
<Setter Property="BackgroundColor" Value="White"/>
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource TextColourLight}, Dark={StaticResource TextColour}}"/>
<Setter Property="BackgroundColor" Value="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}"/>
</Style>
</FlexLayout.Resources>
<Button Text="09:00 AM" Clicked="SlotBooking_Changed"/>
@ -52,13 +53,13 @@
</FlexLayout>
</Grid>
<Grid Grid.Row="4">
<Button Text="Book Appointment" BackgroundColor="#6200EE" HorizontalOptions="Center" Clicked="AppointmentanBooking" VerticalOptions="Center" WidthRequest="150"/>
<Button Text="Book Appointment" BackgroundColor="#6200EE" HorizontalOptions="Center" Clicked="AppointmentanBooking" TextColor="White" VerticalOptions="Center" WidthRequest="150"/>
</Grid>
</Grid>
</Frame>
<Border x:Name="border" IsVisible="False" Stroke="WhiteSmoke" StrokeThickness="2" StrokeShape="RoundRectangle 10,10,10,10" BackgroundColor="White" HorizontalOptions="Center" Margin="0" Padding="0">
<Grid Background="#f5eeff">
<Border x:Name="border" IsVisible="False" Stroke="{AppThemeBinding Light={StaticResource BorderLight}, Dark={StaticResource Border}}" StrokeThickness="2" StrokeShape="RoundRectangle 10,10,10,10" BackgroundColor="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}" HorizontalOptions="Center" Margin="0" Padding="0">
<Grid Background="{AppThemeBinding Light={StaticResource BlackOverlaySelectedLight}, Dark={StaticResource BlackOverlaySelected}}">
<Grid.RowDefinitions>
<RowDefinition Height="0.1*"/>
<RowDefinition Height="0.35*"/>
@ -66,27 +67,27 @@
<RowDefinition Height="0.35*"/>
<RowDefinition Height="0.1*"/>
</Grid.RowDefinitions>
<Label Grid.Row="0" HorizontalTextAlignment="Center" VerticalTextAlignment="Center" FontSize="20" BackgroundColor="White" TextColor="Black" Text="Book an Appointment"/>
<calendar:SfCalendar Grid.Row="1" x:Name="appointmentBooking1" EnablePastDates="False" AllowViewNavigation="False" SelectionChanged="AppointmentBooking_SelectionChanged" BackgroundColor="White" NavigationDirection="Horizontal">
<Label Grid.Row="0" HorizontalTextAlignment="Center" VerticalTextAlignment="Center" FontSize="20" BackgroundColor="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}" TextColor="{AppThemeBinding Light={StaticResource TextColourLight}, Dark={StaticResource TextColour}}" Text="Book an Appointment"/>
<calendar:SfCalendar Grid.Row="1" x:Name="appointmentBooking1" EnablePastDates="False" AllowViewNavigation="False" SelectionChanged="AppointmentBooking_SelectionChanged" BackgroundColor="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}" NavigationDirection="Horizontal">
<calendar:SfCalendar.HeaderView>
<calendar:CalendarHeaderView Background="#f5eeff"/>
<calendar:CalendarHeaderView Background="{AppThemeBinding Light={StaticResource BlackOverlaySelectedLight}, Dark={StaticResource BlackOverlaySelected}}"/>
</calendar:SfCalendar.HeaderView>
<calendar:SfCalendar.MonthView>
<calendar:CalendarMonthView NumberOfVisibleWeeks="2">
<calendar:CalendarMonthView.HeaderView>
<calendar:CalendarMonthHeaderView Background="#f5eeff"/>
<calendar:CalendarMonthHeaderView Background="{AppThemeBinding Light={StaticResource BlackOverlaySelectedLight}, Dark={StaticResource BlackOverlaySelected}}"/>
</calendar:CalendarMonthView.HeaderView>
</calendar:CalendarMonthView>
</calendar:SfCalendar.MonthView>
</calendar:SfCalendar>
<Label Grid.Row="2" x:Name="label1" HorizontalTextAlignment="Center" VerticalTextAlignment="Center" FontSize="20" TextColor="Black" />
<Label Grid.Row="2" x:Name="label1" HorizontalTextAlignment="Center" VerticalTextAlignment="Center" FontSize="20" TextColor="{AppThemeBinding Light={StaticResource TextColourLight}, Dark={StaticResource TextColour}}" />
<Grid Grid.Row="3">
<FlexLayout x:Name="flexLayout1" Wrap="Wrap"
JustifyContent="SpaceAround" AlignItems="Center" VerticalOptions="Center" HorizontalOptions="Center">
<FlexLayout.Resources>
<Style TargetType="Button">
<Setter Property="TextColor" Value="Black"/>
<Setter Property="BackgroundColor" Value="White"/>
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource TextColourLight}, Dark={StaticResource TextColour}}"/>
<Setter Property="BackgroundColor" Value="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}"/>
</Style>
</FlexLayout.Resources>
<Button Text="09:00 AM" Clicked="SlotBooking_Changed"/>
@ -104,39 +105,39 @@
</FlexLayout>
</Grid>
<Grid Grid.Row="4">
<Button Text="Book Appointment" BackgroundColor="#6200EE" HorizontalOptions="Center" Clicked="AppointmentanBooking" VerticalOptions="Center" WidthRequest="150"/>
<Button Text="Book Appointment" BackgroundColor="#6200EE" HorizontalOptions="Center" Clicked="AppointmentanBooking" TextColor="White" VerticalOptions="Center" WidthRequest="150"/>
</Grid>
</Grid>
</Border>
</Grid>
<Grid Background="#f5eeff" IsVisible="false" x:Name="mobile">
<Grid Background="{AppThemeBinding Light={StaticResource BlackOverlaySelectedLight}, Dark={StaticResource BlackOverlaySelected}}" IsVisible="false" x:Name="mobile">
<Grid.RowDefinitions>
<RowDefinition Height="0.25*"/>
<RowDefinition Height="0.10*"/>
<RowDefinition Height="0.25*"/>
<RowDefinition Height="0.40*"/>
</Grid.RowDefinitions>
<calendar:SfCalendar Grid.Row="0" x:Name="mobileAppointmentBooking" EnablePastDates="False" AllowViewNavigation="False" SelectionChanged="AppointmentBooking_SelectionChanged" BackgroundColor="White" NavigationDirection="Horizontal">
<calendar:SfCalendar Grid.Row="0" x:Name="mobileAppointmentBooking" EnablePastDates="False" AllowViewNavigation="False" SelectionChanged="AppointmentBooking_SelectionChanged" BackgroundColor="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}" NavigationDirection="Horizontal">
<calendar:SfCalendar.HeaderView>
<calendar:CalendarHeaderView Background="#f5eeff"/>
<calendar:CalendarHeaderView Background="{AppThemeBinding Light={StaticResource BlackOverlaySelectedLight}, Dark={StaticResource BlackOverlaySelected}}"/>
</calendar:SfCalendar.HeaderView>
<calendar:SfCalendar.MonthView>
<calendar:CalendarMonthView NumberOfVisibleWeeks="2">
<calendar:CalendarMonthView.HeaderView>
<calendar:CalendarMonthHeaderView Background="#f5eeff"/>
<calendar:CalendarMonthHeaderView Background="{AppThemeBinding Light={StaticResource BlackOverlaySelectedLight}, Dark={StaticResource BlackOverlaySelected}}"/>
</calendar:CalendarMonthView.HeaderView>
</calendar:CalendarMonthView>
</calendar:SfCalendar.MonthView>
</calendar:SfCalendar>
<Label Grid.Row="1" x:Name="mobileLabel" HorizontalTextAlignment="Center" VerticalTextAlignment="Center" FontSize="20" TextColor="Black" />
<Label Grid.Row="1" x:Name="mobileLabel" HorizontalTextAlignment="Center" VerticalTextAlignment="Center" FontSize="20" TextColor="{AppThemeBinding Light={StaticResource TextColourLight}, Dark={StaticResource TextColour}}" />
<Grid Grid.Row="2">
<FlexLayout x:Name="mobileFlexLayout" Wrap="Wrap"
JustifyContent="SpaceAround" AlignItems="Center" VerticalOptions="Center" HorizontalOptions="Center">
<FlexLayout.Resources>
<Style TargetType="Button">
<Setter Property="TextColor" Value="Black"/>
<Setter Property="Background" Value="White"/>
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource TextColourLight}, Dark={StaticResource TextColour}}"/>
<Setter Property="Background" Value="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}"/>
</Style>
</FlexLayout.Resources>
<Button Text="09:00 AM" Clicked="SlotBooking_Changed"/>
@ -154,7 +155,12 @@
</FlexLayout>
</Grid>
<Grid Grid.Row="3" HorizontalOptions="Center" Padding="0,0,0,30">
<Button Text="Book Appointment" BackgroundColor="#6200EE" HorizontalOptions="Center" Clicked="AppointmentanBooking" VerticalOptions="End" WidthRequest="150" HeightRequest="50"/>
<Button Text="Book Appointment" BackgroundColor="#6200EE" HorizontalOptions="Center" Clicked="AppointmentanBooking" TextColor="White" VerticalOptions="End" WidthRequest="150" HeightRequest="50"/>
<popUp:SfPopup Grid.Row="0" Grid.RowSpan="3" IsVisible="false" x:Name="popUp" FooterHeight="70" ShowHeader="True" HeaderHeight="65" ShowFooter="True" HeightRequest="200">
<popUp:SfPopup.PopupStyle>
<popUp:PopupStyle CornerRadius="15" MessageFontSize="15" HeaderFontSize="17" HeaderFontAttribute="Bold" />
</popUp:SfPopup.PopupStyle>
</popUp:SfPopup>
</Grid>
</Grid>
</Grid>

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

@ -8,6 +8,7 @@
using SampleBrowser.Maui.Base;
using System.Drawing;
using System.Globalization;
using Syncfusion.Maui.Popup;
using Color = Microsoft.Maui.Graphics.Color;
namespace SampleBrowser.Maui.Calendar.SfCalendar
@ -23,6 +24,11 @@ namespace SampleBrowser.Maui.Calendar.SfCalendar
/// </summary>
private string timeSlot = string.Empty;
/// <summary>
/// Check the application theme is light or dark.
/// </summary>
private bool isLightTheme = Application.Current?.RequestedTheme == AppTheme.Light;
/// <summary>
/// Initializes a new instance of the <see cref="Year" /> class.
/// </summary>
@ -30,19 +36,25 @@ namespace SampleBrowser.Maui.Calendar.SfCalendar
{
InitializeComponent();
if (this.popUp != null)
{
popUp.FooterTemplate = this.GetFooterTemplate(popUp);
popUp.ContentTemplate = this.GetContentTemplate(popUp);
}
#if MACCATALYST
this.border.IsVisible = true;
this.border.Stroke = Color.FromArgb("#E6E6E6");
this.border.Stroke = isLightTheme ? Color.FromArgb("#CAC4D0") : Color.FromArgb("#49454F");
this.InitializeCalendar(this.appointmentBooking1, this.deskTop);
#elif !ANDROID && !IOS
this.frame.IsVisible = true;
this.frame.BorderColor = Color.FromArgb("#E6E6E6");
this.frame.BorderColor = isLightTheme ? Color.FromArgb("#CAC4D0") : Color.FromArgb("#49454F");
this.InitializeCalendar(this.appointmentBooking, this.deskTop);
#else
if (DeviceInfo.Idiom == DeviceIdiom.Tablet)
{
this.border.IsVisible = true;
this.border.Stroke = Color.FromArgb("#E6E6E6");
this.border.Stroke = isLightTheme ? Color.FromArgb("#CAC4D0") : Color.FromArgb("#49454F");
this.InitializeCalendar(this.appointmentBooking1, this.deskTop);
}
else
@ -52,6 +64,127 @@ namespace SampleBrowser.Maui.Calendar.SfCalendar
#endif
}
/// <summary>
/// Method to get the dynamic color.
/// </summary>
/// <param name="resourceName">The resource name.</param>
/// <returns>The color.</returns>
private Color GetDynamicColor(string? resourceName = null)
{
if (resourceName != null && App.Current != null && App.Current.Resources.TryGetValue(resourceName, out var colorValue) && colorValue is Color color)
{
return color;
}
else
{
if (App.Current != null && App.Current.RequestedTheme == AppTheme.Light)
{
return Color.FromRgb(0xFF, 0xFF, 0xFF);
}
else if (App.Current != null && App.Current.RequestedTheme == AppTheme.Dark)
{
return Color.FromRgb(0x38, 0x1E, 0x72);
}
}
return Colors.Transparent;
}
/// <summary>
/// Method to get the Ok button style.
/// </summary>
/// <returns>The button style.</returns>
private Style GetOkButtonStyle()
{
return new Style(typeof(Button))
{
Setters =
{
new Setter { Property = Button.CornerRadiusProperty, Value = 15 },
new Setter { Property = Button.BorderColorProperty, Value = Color.FromArgb("#6750A4") },
new Setter { Property = Button.BorderWidthProperty, Value = 1 },
new Setter { Property = Button.BackgroundColorProperty, Value = this.GetDynamicColor("SfCalendarTodayHighlightColor") },
new Setter { Property = Button.TextColorProperty, Value = this.GetDynamicColor() },
new Setter { Property = Button.FontSizeProperty, Value = 14 },
}
};
}
/// <summary>
/// Method to get the footer template.
/// </summary>
/// <param name="popup">The pop up.</param>
/// <returns>The data template.</returns>
private DataTemplate GetFooterTemplate(SfPopup popup)
{
var footerTemplate = new DataTemplate(() =>
{
var grid = new Grid
{
ColumnSpacing = 12,
Padding = new Thickness(24)
};
grid.ColumnDefinitions.Add(new ColumnDefinition { Width = GridLength.Star });
grid.ColumnDefinitions.Add(new ColumnDefinition { Width = GridLength.Star });
var oKButton = new Button
{
Text = "OK",
Style = this.GetOkButtonStyle(),
WidthRequest = 96,
HeightRequest = 40
};
oKButton.Clicked += (sender, args) =>
{
popup.Dismiss();
};
grid.Children.Add(oKButton);
Grid.SetColumn(oKButton, 1);
return grid;
});
return footerTemplate;
}
/// <summary>
/// Method to get the content template.
/// </summary>
/// <param name="popup">The pop up.</param>
/// <returns>The data template.</returns>
private DataTemplate GetContentTemplate(SfPopup popup)
{
var contentTemplate = new DataTemplate(() =>
{
var grid = new Grid();
grid.RowDefinitions.Add(new RowDefinition { Height = GridLength.Star });
grid.RowDefinitions.Add(new RowDefinition { Height = new GridLength(0.1, GridUnitType.Star) });
var label = new Label
{
LineBreakMode = LineBreakMode.WordWrap,
Padding = new Thickness(20, 0, 0, 0),
FontSize = 16,
HorizontalOptions = LayoutOptions.Start,
HorizontalTextAlignment = TextAlignment.Start
};
label.BindingContext = popup;
label.SetBinding(Label.TextProperty, "Message");
var stackLayout = new StackLayout
{
Margin = new Thickness(0, 2, 0, 0),
HeightRequest = 1,
};
stackLayout.BackgroundColor = isLightTheme ? Color.FromArgb("#611c1b1f") : Color.FromArgb("#61e6e1e5");
grid.Children.Add(label);
grid.Children.Add(stackLayout);
Grid.SetRow(label, 0);
Grid.SetRow(stackLayout, 1);
return grid;
});
return contentTemplate;
}
/// <summary>
/// Initialize the calendar.
/// </summary>
@ -113,8 +246,8 @@ namespace SampleBrowser.Maui.Calendar.SfCalendar
foreach (Button child in buttonLayout.Children)
{
Button button = (Button)child;
button.TextColor = Colors.Black;
button.Background = Colors.White;
button.TextColor = isLightTheme ? Colors.Black : Colors.White;
button.Background = isLightTheme ? Colors.White : Color.FromRgba("#1C1B1F");
}
}
@ -125,6 +258,11 @@ namespace SampleBrowser.Maui.Calendar.SfCalendar
/// <param name="e">Event arguments.</param>
private void AppointmentanBooking(object sender, EventArgs e)
{
if (this.popUp == null)
{
return;
}
#if MACCATALYST
this.BookAppointment(this.appointmentBooking1, this.flexLayout1);
#elif !ANDROID && !IOS
@ -139,6 +277,8 @@ namespace SampleBrowser.Maui.Calendar.SfCalendar
this.BookAppointment(this.mobileAppointmentBooking, this.mobileFlexLayout);
}
#endif
this.popUp.Show();
}
/// <summary>
@ -148,30 +288,37 @@ namespace SampleBrowser.Maui.Calendar.SfCalendar
/// <param name="buttonLayout">Time slot button layout.</param>
private void BookAppointment(Syncfusion.Maui.Calendar.SfCalendar calendar, FlexLayout buttonLayout)
{
if (this.popUp == null)
{
return;
}
if (calendar.SelectedDate == null)
{
Application.Current?.MainPage?.DisplayAlert("Alert !", "Please select a date to book an appointment ", "Ok");
this.popUp.HeaderTitle = "Alert !";
this.popUp.Message = "Please select a date to book an appointment";
return;
}
if (this.timeSlot == string.Empty)
{
Application.Current?.MainPage?.DisplayAlert("Alert !", "Please select a time to book an appointment ", "Ok");
this.popUp.HeaderTitle = "Alert !";
this.popUp.Message = "Please select a time to book an appointment";
return;
}
this.popUp.HeaderTitle = "Confirmation";
DateTime dateTime = calendar.SelectedDate.Value;
string dayText = dateTime.ToString("MMMM" + " " + dateTime.Day.ToString() + ", " + dateTime.ToString("yyyy"), CultureInfo.CurrentUICulture);
string text = "Appointment booked for " + dayText + " " + timeSlot;
Application.Current?.MainPage?.DisplayAlert("Confirmation", text, "Ok");
this.popUp.Message = "Appointment booked for " + dayText + " " + timeSlot;
calendar.SelectedDate = DateTime.Now.Date;
calendar.DisplayDate = DateTime.Now.Date;
this.timeSlot = string.Empty;
foreach (Button child in buttonLayout.Children)
{
Button button = (Button)child;
button.TextColor = Colors.Black;
button.Background = Colors.White;
button.TextColor = isLightTheme ? Colors.Black : Colors.White;
button.Background = isLightTheme ? Colors.White : Color.FromRgba("#1C1B1F");
}
}
@ -208,7 +355,9 @@ namespace SampleBrowser.Maui.Calendar.SfCalendar
{
if (calendar.SelectedDate == null)
{
Application.Current?.MainPage?.DisplayAlert("Alert !", "Please select a date to book an appointment ", "Ok");
this.popUp.HeaderTitle = "Alert !";
this.popUp.Message = "Please select a date to book an appointment ";
this.popUp.Show();
return;
}
@ -223,8 +372,8 @@ namespace SampleBrowser.Maui.Calendar.SfCalendar
continue;
}
unPressedbutton.TextColor = Colors.Black;
unPressedbutton.Background = Colors.White;
unPressedbutton.TextColor = isLightTheme ? Colors.Black : Colors.White;
unPressedbutton.Background = isLightTheme ? Colors.White : Color.FromRgba("#1C1B1F");
}
}
}

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

@ -9,6 +9,7 @@ namespace SampleBrowser.Maui.Calendar.SfCalendar
{
using SampleBrowser.Maui.Base;
using Syncfusion.Maui.Calendar;
using Syncfusion.Maui.Buttons;
internal class CalendarIdentifierBehavior : Behavior<SampleView>
{
@ -20,7 +21,7 @@ namespace SampleBrowser.Maui.Calendar.SfCalendar
/// <summary>
/// The radio buttons collection.
/// </summary>
private IEnumerable<RadioButton>? radioButtons;
private IEnumerable<SfRadioButton>? radioButtons;
/// <summary>
/// Begins when the behavior attached to the view
@ -35,8 +36,8 @@ namespace SampleBrowser.Maui.Calendar.SfCalendar
Border border = bindable.Content.FindByName<Border>("desktopBorder");
border.IsVisible = true;
this.calendar = bindable.Content.FindByName<SfCalendar>("desktopIdentifier1");
Grid optionView = bindable.Content.FindByName<Grid>("desktopOptionView");
this.radioButtons = optionView.Children.OfType<RadioButton>();
VerticalStackLayout optionView = bindable.Content.FindByName<VerticalStackLayout>("desktopOptionView");
this.radioButtons = optionView.Children.OfType<SfRadioButton>();
#elif IOS
Grid mobileLayout = bindable.Content.FindByName<Grid>("mobileCalendar");
mobileLayout.IsVisible = true;
@ -46,7 +47,7 @@ namespace SampleBrowser.Maui.Calendar.SfCalendar
Border optionBorder = bindable.Content.FindByName<Border>("mobileOptionBorder");
optionBorder.IsVisible = true;
HorizontalStackLayout optionView = bindable.Content.FindByName<HorizontalStackLayout>("mobileOptionBorderView");
this.radioButtons = optionView.Children.OfType<RadioButton>();
this.radioButtons = optionView.Children.OfType<SfRadioButton>();
#elif ANDROID
Grid mobileLayout = bindable.Content.FindByName<Grid>("mobileCalendar");
mobileLayout.IsVisible = true;
@ -56,29 +57,29 @@ namespace SampleBrowser.Maui.Calendar.SfCalendar
Frame optionFrame = bindable.Content.FindByName<Frame>("mobileOptionFrame");
optionFrame.IsVisible = true;
HorizontalStackLayout optionView = bindable.Content.FindByName<HorizontalStackLayout>("mobileOptionFrameView");
this.radioButtons = optionView.Children.OfType<RadioButton>();
this.radioButtons = optionView.Children.OfType<SfRadioButton>();
#else
HorizontalStackLayout desktopLayout = bindable.Content.FindByName<HorizontalStackLayout>("desktopCalendar");
desktopLayout.IsVisible = true;
Frame frame = bindable.Content.FindByName<Frame>("desktopFrame");
frame.IsVisible = true;
this.calendar = bindable.Content.FindByName<SfCalendar>("desktopIdentifier");
Grid optionView = bindable.Content.FindByName<Grid>("desktopOptionView");
this.radioButtons = optionView.Children.OfType<RadioButton>();
VerticalStackLayout optionView = bindable.Content.FindByName<VerticalStackLayout>("desktopOptionView");
this.radioButtons = optionView.Children.OfType<SfRadioButton>();
#endif
if (this.radioButtons != null)
{
foreach (var item in this.radioButtons)
{
string? radioButtonText = item.Content.ToString();
string? radioButtonText = item.Text.ToString();
//// Handle the is checked on xaml does not rendered correctly on windows.
if (this.calendar != null && string.Equals(radioButtonText, "Hijri"))
{
item.IsChecked = true;
}
item.CheckedChanged += OnRadioButton_CheckedChanged;
item.StateChanged += OnRadioButton_StateChanged;
}
}
}
@ -94,7 +95,7 @@ namespace SampleBrowser.Maui.Calendar.SfCalendar
{
foreach (var item in this.radioButtons)
{
item.CheckedChanged -= OnRadioButton_CheckedChanged;
item.StateChanged -= OnRadioButton_StateChanged;
}
this.radioButtons = null;
@ -106,9 +107,14 @@ namespace SampleBrowser.Maui.Calendar.SfCalendar
/// </summary>
/// <param name="sender">Return the object</param>
/// <param name="e">Event Arguments</param>
private void OnRadioButton_CheckedChanged(object? sender, CheckedChangedEventArgs e)
private void OnRadioButton_StateChanged(object? sender, StateChangedEventArgs e)
{
string? radioButtonText = (sender as RadioButton)?.Content.ToString();
if (e.IsChecked == false)
{
return;
}
string? radioButtonText = (sender as SfRadioButton)?.Text.ToString();
if (calendar == null)
{
return;

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

@ -3,11 +3,14 @@
x:Class="SampleBrowser.Maui.Calendar.SfCalendar.CalendarIdentifier"
xmlns:local="clr-namespace:SampleBrowser.Maui.Calendar.SfCalendar"
xmlns:thickness ="clr-namespace:Microsoft.Maui;assembly=Microsoft.Maui"
xmlns:editors="clr-namespace:Syncfusion.Maui.Inputs;assembly=Syncfusion.Maui.Inputs"
xmlns:calendar="clr-namespace:Syncfusion.Maui.Calendar;assembly=Syncfusion.Maui.Calendar"
xmlns:converters="clr-namespace:SampleBrowser.Maui.Base.Converters;assembly=SampleBrowser.Maui.Base"
xmlns:localCore="clr-namespace:SampleBrowser.Maui.Base;assembly=SampleBrowser.Maui.Base" Background="WhiteSmoke" Margin="-4, -4, -6, -6">
xmlns:buttons="clr-namespace:Syncfusion.Maui.Buttons;assembly=Syncfusion.Maui.Buttons"
xmlns:localCore="clr-namespace:SampleBrowser.Maui.Base;assembly=SampleBrowser.Maui.Base"
Margin="-4, -4, -6, -6">
<localCore:SampleView.Resources>
<buttons:SfRadioGroupKey x:Key="calendar"/>
</localCore:SampleView.Resources>
<localCore:SampleView.Content>
<Grid>
<HorizontalStackLayout IsVisible="False" x:Name="desktopCalendar" HorizontalOptions="Center" VerticalOptions="Center">
@ -20,38 +23,34 @@
<RowDefinition Height="250"/>
</Grid.RowDefinitions>
<Grid BackgroundColor="White">
<Image Source="{converters:SfImageResource calendartype.png}" Aspect="AspectFit"/>
<Grid BackgroundColor="{AppThemeBinding Light={StaticResource SampleBrowserBackgroundLight}, Dark={StaticResource SampleBrowserBackground}}">
<Label Text="&#xe7dd;"
FontSize="70"
TextColor="{AppThemeBinding Light={StaticResource TextColourAlt1Light}, Dark={StaticResource TextColourAlt1}}"
FontFamily="MauiSampleFontIcon"
HorizontalOptions="Center" VerticalOptions="Center"/>
</Grid>
<Grid Grid.Row="2" x:Name="desktopOptionView" BackgroundColor="White" Padding="5, 0">
<Grid.RowDefinitions>
<RowDefinition Height="35"/>
<RowDefinition Height="35"/>
<RowDefinition Height="35"/>
<RowDefinition Height="35"/>
<RowDefinition Height="35"/>
<RowDefinition Height="35"/>
<RowDefinition Height="35"/>
</Grid.RowDefinitions>
<RadioButton Grid.Row="0" Content="Gregorian" VerticalOptions="Start" Padding="{OnPlatform iOS=5, MacCatalyst=5}"/>
<RadioButton Grid.Row="1" Content="Hijri" VerticalOptions="Start" Padding="{OnPlatform iOS=5, MacCatalyst=5}"/>
<RadioButton Grid.Row="2" Content="Korean" VerticalOptions="Start" Padding="{OnPlatform iOS=5, MacCatalyst=5}"/>
<RadioButton Grid.Row="3" Content="Persian" VerticalOptions="Start" Padding="{OnPlatform iOS=5, MacCatalyst=5}"/>
<RadioButton Grid.Row="4" Content="Taiwan" VerticalOptions="Start" Padding="{OnPlatform iOS=5, MacCatalyst=5}"/>
<RadioButton Grid.Row="5" Content="Thai Buddhist" VerticalOptions="Start" Padding="{OnPlatform iOS=5, MacCatalyst=5}"/>
<RadioButton Grid.Row="6" Content="UmAlQura" VerticalOptions="Start" Padding="{OnPlatform iOS=5, MacCatalyst=5}"/>
</Grid>
<ScrollView Grid.Row="2" VerticalScrollBarVisibility="Never" BackgroundColor="{AppThemeBinding Light={StaticResource SampleBrowserBackgroundLight}, Dark={StaticResource SampleBrowserBackground}}" Padding="5, 0">
<VerticalStackLayout x:Name="desktopOptionView">
<buttons:SfRadioButton Text="Gregorian" GroupKey="{StaticResource calendar}" VerticalOptions="Start"/>
<buttons:SfRadioButton Text="Hijri" GroupKey="{StaticResource calendar}" VerticalOptions="Start"/>
<buttons:SfRadioButton Text="Korean" GroupKey="{StaticResource calendar}" VerticalOptions="Start"/>
<buttons:SfRadioButton Text="Persian" GroupKey="{StaticResource calendar}" VerticalOptions="Start"/>
<buttons:SfRadioButton Text="Taiwan" GroupKey="{StaticResource calendar}" VerticalOptions="Start"/>
<buttons:SfRadioButton Text="Thai Buddhist" GroupKey="{StaticResource calendar}" VerticalOptions="Start"/>
<buttons:SfRadioButton Text="UmAlQura" GroupKey="{StaticResource calendar}" VerticalOptions="Start"/>
</VerticalStackLayout>
</ScrollView>
</Grid>
</Frame>
</VerticalStackLayout>
<Grid WidthRequest="320" HeightRequest="350" Padding="0">
<Frame IsVisible="False" x:Name="desktopFrame" HasShadow="False" Background="White" CornerRadius="10" HorizontalOptions="Center" VerticalOptions="Center" Margin="0" Padding="0">
<Frame IsVisible="False" x:Name="desktopFrame" HasShadow="False" Background="{AppThemeBinding Light={StaticResource SampleBrowserBackgroundLight}, Dark={StaticResource SampleBrowserBackground}}" CornerRadius="10" HorizontalOptions="Center" VerticalOptions="Center" Margin="0" Padding="0">
<calendar:SfCalendar x:Name="desktopIdentifier" Identifier="Hijri"/>
</Frame>
<Border IsVisible="False" x:Name="desktopBorder" Background="White" StrokeThickness="2" StrokeShape="RoundRectangle 10,10,10,10" HorizontalOptions="Center" VerticalOptions="Center" Margin="0" Padding="0">
<Border IsVisible="False" x:Name="desktopBorder" Background="{AppThemeBinding Light={StaticResource SampleBrowserBackgroundLight}, Dark={StaticResource SampleBrowserBackground}}" StrokeThickness="2" StrokeShape="RoundRectangle 10,10,10,10" HorizontalOptions="Center" VerticalOptions="Center" Margin="0" Padding="0">
<calendar:SfCalendar x:Name="desktopIdentifier1" Identifier="Hijri"/>
</Border>
</Grid>
@ -64,42 +63,42 @@
</Grid.RowDefinitions>
<Grid WidthRequest="350" HeightRequest="75" Padding="0" Margin="0, 0, 0, 20">
<Frame IsVisible="False" x:Name="mobileOptionFrame" HasShadow="False" Background="White" CornerRadius="10" HorizontalOptions="Center" VerticalOptions="Center" Margin="0" Padding="0">
<Frame IsVisible="False" x:Name="mobileOptionFrame" HasShadow="False" Background="{AppThemeBinding Light={StaticResource SampleBrowserBackgroundLight}, Dark={StaticResource SampleBrowserBackground}}" CornerRadius="10" HorizontalOptions="Center" VerticalOptions="Center" Margin="0" Padding="0">
<ScrollView Orientation="Horizontal" HorizontalScrollBarVisibility="Always" Margin="5, 0">
<HorizontalStackLayout x:Name="mobileOptionFrameView" HeightRequest="50" VerticalOptions="Center">
<RadioButton Content="Gregorian" VerticalOptions="Center" Margin="5, 0" Padding="{OnPlatform iOS=5, MacCatalyst=5}"/>
<RadioButton Content="Hijri" VerticalOptions="Center" Margin="5, 0" Padding="{OnPlatform iOS=5, MacCatalyst=5}"/>
<RadioButton Content="Korean" VerticalOptions="Center" Margin="5, 0" Padding="{OnPlatform iOS=5, MacCatalyst=5}"/>
<RadioButton Content="Persian" VerticalOptions="Center" Margin="5, 0" Padding="{OnPlatform iOS=5, MacCatalyst=5}"/>
<RadioButton Content="Taiwan" VerticalOptions="Center" Margin="5, 0" Padding="{OnPlatform iOS=5, MacCatalyst=5}"/>
<RadioButton Content="Thai Buddhist" VerticalOptions="Center" Margin="5, 0" Padding="{OnPlatform iOS=5, MacCatalyst=5}"/>
<RadioButton Content="UmAlQura" VerticalOptions="Center" Margin="5, 0" Padding="{OnPlatform iOS=5, MacCatalyst=5}"/>
<buttons:SfRadioButton Text="Gregorian" GroupKey="{StaticResource calendar}" VerticalOptions="Center" Margin="5, 0" Padding="{OnPlatform iOS=5, MacCatalyst=5}"/>
<buttons:SfRadioButton Text="Hijri" GroupKey="{StaticResource calendar}" VerticalOptions="Center" Margin="5, 0" Padding="{OnPlatform iOS=5, MacCatalyst=5}"/>
<buttons:SfRadioButton Text="Korean" GroupKey="{StaticResource calendar}" VerticalOptions="Center" Margin="5, 0" Padding="{OnPlatform iOS=5, MacCatalyst=5}"/>
<buttons:SfRadioButton Text="Persian" GroupKey="{StaticResource calendar}" VerticalOptions="Center" Margin="5, 0" Padding="{OnPlatform iOS=5, MacCatalyst=5}"/>
<buttons:SfRadioButton Text="Taiwan" GroupKey="{StaticResource calendar}" VerticalOptions="Center" Margin="5, 0" Padding="{OnPlatform iOS=5, MacCatalyst=5}"/>
<buttons:SfRadioButton Text="Thai Buddhist" GroupKey="{StaticResource calendar}" VerticalOptions="Center" Margin="5, 0" Padding="{OnPlatform iOS=5, MacCatalyst=5}"/>
<buttons:SfRadioButton Text="UmAlQura" GroupKey="{StaticResource calendar}" VerticalOptions="Center" Margin="5, 0" Padding="{OnPlatform iOS=5, MacCatalyst=5}"/>
</HorizontalStackLayout>
</ScrollView>
</Frame>
<Border x:Name="mobileOptionBorder" IsVisible="False" HeightRequest="60" WidthRequest="350" Background="White" StrokeThickness="2" StrokeShape="RoundRectangle 10,10,10,10" HorizontalOptions="Center" VerticalOptions="Center" Margin="0" Padding="0">
<Border x:Name="mobileOptionBorder" IsVisible="False" HeightRequest="60" WidthRequest="350" Background="{AppThemeBinding Light={StaticResource SampleBrowserBackgroundLight}, Dark={StaticResource SampleBrowserBackground}}" StrokeThickness="2" StrokeShape="RoundRectangle 10,10,10,10" HorizontalOptions="Center" VerticalOptions="Center" Margin="0" Padding="0">
<Grid>
<ScrollView Orientation="Horizontal" HorizontalScrollBarVisibility="Always">
<HorizontalStackLayout x:Name="mobileOptionBorderView" HeightRequest="50" VerticalOptions="Center">
<RadioButton Content="Gregorian" BackgroundColor="White" VerticalOptions="Center" Margin="5, 0" Padding="{OnPlatform iOS=5, MacCatalyst=5}"/>
<RadioButton Content="Hijri" BackgroundColor="White" VerticalOptions="Center" Margin="5, 0" Padding="{OnPlatform iOS=5, MacCatalyst=5}"/>
<RadioButton Content="Korean" BackgroundColor="White" VerticalOptions="Center" Margin="5, 0" Padding="{OnPlatform iOS=5, MacCatalyst=5}"/>
<RadioButton Content="Persian" BackgroundColor="White" VerticalOptions="Center" Margin="5, 0" Padding="{OnPlatform iOS=5, MacCatalyst=5}"/>
<RadioButton Content="Taiwan" BackgroundColor="White" VerticalOptions="Center" Margin="5, 0" Padding="{OnPlatform iOS=5, MacCatalyst=5}"/>
<RadioButton Content="Thai Buddhist" BackgroundColor="White" VerticalOptions="Center" Margin="5, 0" Padding="{OnPlatform iOS=5, MacCatalyst=5}"/>
<RadioButton Content="UmAlQura" BackgroundColor="White" VerticalOptions="Center" Margin="5, 0" Padding="{OnPlatform iOS=5, MacCatalyst=5}"/>
<buttons:SfRadioButton Text="Gregorian" GroupKey="{StaticResource calendar}" VerticalOptions="Center" Margin="5, 0"/>
<buttons:SfRadioButton Text="Hijri" GroupKey="{StaticResource calendar}" VerticalOptions="Center" Margin="5, 0"/>
<buttons:SfRadioButton Text="Korean" GroupKey="{StaticResource calendar}" VerticalOptions="Center" Margin="5, 0"/>
<buttons:SfRadioButton Text="Persian" GroupKey="{StaticResource calendar}" VerticalOptions="Center" Margin="5, 0"/>
<buttons:SfRadioButton Text="Taiwan" GroupKey="{StaticResource calendar}" VerticalOptions="Center" Margin="5, 0"/>
<buttons:SfRadioButton Text="Thai Buddhist" GroupKey="{StaticResource calendar}" VerticalOptions="Center" Margin="5, 0"/>
<buttons:SfRadioButton Text="UmAlQura" GroupKey="{StaticResource calendar}" VerticalOptions="Center" Margin="5, 0"/>
</HorizontalStackLayout>
</ScrollView>
</Grid>
</Border>
</Grid>
<Grid Grid.Row="1" WidthRequest="350" HeightRequest="400" Padding="0">
<Frame IsVisible="False" x:Name="mobileFrame" HasShadow="False" Background="White" CornerRadius="10" HorizontalOptions="Center" VerticalOptions="Center" Margin="0" Padding="0">
<Frame IsVisible="False" x:Name="mobileFrame" HasShadow="False" Background="{AppThemeBinding Light={StaticResource SampleBrowserBackgroundLight}, Dark={StaticResource SampleBrowserBackground}}" CornerRadius="10" HorizontalOptions="Center" VerticalOptions="Center" Margin="0" Padding="0">
<calendar:SfCalendar x:Name="mobileIdentifier" Identifier="Hijri"/>
</Frame>
<Border IsVisible="False" x:Name="mobileBorder" Background="White" StrokeThickness="2" StrokeShape="RoundRectangle 10,10,10,10" HorizontalOptions="Center" VerticalOptions="Center" Margin="0" Padding="0">
<Border IsVisible="False" x:Name="mobileBorder" Background="{AppThemeBinding Light={StaticResource SampleBrowserBackgroundLight}, Dark={StaticResource SampleBrowserBackground}}" StrokeThickness="2" StrokeShape="RoundRectangle 10,10,10,10" HorizontalOptions="Center" VerticalOptions="Center" Margin="0" Padding="0">
<calendar:SfCalendar x:Name="mobileIdentifier1" Identifier="Hijri"/>
</Border>
</Grid>

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

@ -49,6 +49,11 @@ namespace SampleBrowser.Maui.Calendar.SfCalendar
/// </summary>
private CalendarDateRange dateRange = new CalendarDateRange(DateTime.Now, DateTime.Now.AddDays(3));
/// <summary>
/// Check the application theme is light or dark.
/// </summary>
private bool isLightTheme = Application.Current?.RequestedTheme == AppTheme.Light;
/// <summary>
/// Begins when the behavior attached to the view
/// </summary>
@ -60,7 +65,7 @@ namespace SampleBrowser.Maui.Calendar.SfCalendar
Border border = bindable.Content.FindByName<Border>("border");
border.IsVisible = true;
#if MACCATALYST
border.Stroke = Color.FromArgb("#E6E6E6");
border.Stroke = isLightTheme ? Color.FromArgb("#CAC4D0") : Color.FromArgb("#49454F");
#else
border.Stroke = Colors.Transparent;
#endif
@ -73,7 +78,7 @@ namespace SampleBrowser.Maui.Calendar.SfCalendar
#if ANDROID
frame.BorderColor = Colors.Transparent;
#else
frame.BorderColor = Color.FromArgb("#E6E6E6");
frame.BorderColor = isLightTheme ? Color.FromArgb("#CAC4D0") : Color.FromArgb("#49454F");
#endif
this.calendar = bindable.Content.FindByName<SfCalendar>("dateSelection");
this.label = bindable.Content.FindByName<Label>("label");

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

@ -4,10 +4,10 @@
xmlns:local="clr-namespace:SampleBrowser.Maui.Calendar.SfCalendar"
xmlns:calendar="clr-namespace:Syncfusion.Maui.Calendar;assembly=Syncfusion.Maui.Calendar"
xmlns:localCore="clr-namespace:SampleBrowser.Maui.Base;assembly=SampleBrowser.Maui.Base"
xmlns:editors="clr-namespace:Syncfusion.Maui.Inputs;assembly=Syncfusion.Maui.Inputs" Background="WhiteSmoke" Margin="-4, -4, -6, -6">
xmlns:editors="clr-namespace:Syncfusion.Maui.Inputs;assembly=Syncfusion.Maui.Inputs" Background="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}" Margin="-4, -4, -6, -6">
<localCore:SampleView.Content>
<Grid WidthRequest="350" HeightRequest="500">
<Frame IsVisible="False" x:Name="frame" HasShadow="False" Background="White" CornerRadius="10" Margin="0" Padding="0">
<Frame IsVisible="False" x:Name="frame" HasShadow="False" Background="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}" CornerRadius="10" Margin="0" Padding="0">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
@ -15,14 +15,14 @@
<RowDefinition Height="0.5"/>
<RowDefinition Height="7*"/>
</Grid.RowDefinitions>
<Label Grid.Row="0" x:Name="selectionLabel" Text="Select date" FontSize="15" Margin="20, 0, 0, 0" VerticalTextAlignment="Center" TextColor="Gray" VerticalOptions="Center"/>
<Label Grid.Row="0" x:Name="selectionLabel" Text="Select date" FontSize="15" Margin="20, 0, 0, 0" VerticalTextAlignment="Center" TextColor="{AppThemeBinding Light={StaticResource TileTextColourAlt1Light}, Dark={StaticResource TileTextColourAlt1}}" VerticalOptions="Center"/>
<Label Grid.Row="1" x:Name="label" FontSize="30" Margin="20,0,0,0" VerticalTextAlignment="Center" VerticalOptions="Center" />
<Line Grid.Row="2" BackgroundColor="LightGrey"/>
<calendar:SfCalendar x:Name="dateSelection" Grid.Row="3" View="Month" RangeSelectionDirection="Both" AllowViewNavigation="True" NavigationDirection="Horizontal" Margin="5" HorizontalOptions="Center" VerticalOptions="Center" ShowActionButtons="True" ShowTodayButton="True"/>
</Grid>
</Frame>
<Border IsVisible="False" x:Name="border" Background="White" StrokeThickness="2" StrokeShape="RoundRectangle 10,10,10,10" Margin="0" Padding="0">
<Border IsVisible="False" x:Name="border" Background="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}" StrokeThickness="2" StrokeShape="RoundRectangle 10,10,10,10" Margin="0" Padding="0">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="1*"/>
@ -53,10 +53,11 @@
FontSize="14"
VerticalOptions="Center"
HorizontalOptions="Start"
TextColor="Gray"/>
TextColor="{AppThemeBinding Light={StaticResource TileTextColourAlt1Light}, Dark={StaticResource TileTextColourAlt1}}"/>
<editors:SfComboBox x:Name="comboBox" Grid.Column="1"
<editors:SfComboBox x:Name="comboBox" Grid.Column="1" IsClearButtonVisible="False"
Margin="5,15,0,0" VerticalOptions="Center"
TextColor="{AppThemeBinding Light={StaticResource PlaceholderTextColourLight}, Dark={StaticResource PlaceholderTextColour}}"
HorizontalOptions="End"/>
</Grid>
</StackLayout>

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

@ -14,6 +14,7 @@ namespace SampleBrowser.Maui.Calendar.SfCalendar
using Syncfusion.Maui.Calendar;
using Syncfusion.Maui.DataSource.Extensions;
using Syncfusion.Maui.Inputs;
using Syncfusion.Maui.Buttons;
/// <summary>
/// Getting started Behavior class
@ -28,22 +29,22 @@ namespace SampleBrowser.Maui.Calendar.SfCalendar
/// <summary>
/// The current time indicator switch.
/// </summary>
private Switch? enableDatesSwitch;
private SfSwitch? enableDatesSwitch;
/// <summary>
/// The enable swipe selection switch
/// </summary>
private Switch? enableSwipeSelectionSwitch;
private SfSwitch? enableSwipeSelectionSwitch;
/// <summary>
/// The weekNumber switch.
/// </summary>
private Switch? weekNumberSwitch;
private SfSwitch? weekNumberSwitch;
/// <summary>
/// The allow view navigation switch
/// </summary>
private Switch? allowViewNavigationSwitch;
private SfSwitch? allowViewNavigationSwitch;
/// <summary>
/// The week number grid.
@ -53,7 +54,7 @@ namespace SampleBrowser.Maui.Calendar.SfCalendar
/// <summary>
/// The trailing dates switch.
/// </summary>
private Switch? trailingDatesSwitch;
private SfSwitch? trailingDatesSwitch;
/// <summary>
/// The combo box is a text box component that allows users to type a value or choose
@ -89,12 +90,12 @@ namespace SampleBrowser.Maui.Calendar.SfCalendar
/// <summary>
/// The show action buttons switch.
/// </summary>
private Switch? enableActionButtonsSwitch;
private SfSwitch? enableActionButtonsSwitch;
/// <summary>
/// The show today buttons switch.
/// </summary>
private Switch? enableTodayButtonSwitch;
private SfSwitch? enableTodayButtonSwitch;
/// <summary>
/// Begins when the behavior attached to the view
@ -107,33 +108,25 @@ namespace SampleBrowser.Maui.Calendar.SfCalendar
#if IOS || MACCATALYST
Border border = bindable.Content.FindByName<Border>("border");
border.IsVisible = true;
#if MACCATALYST
border.Stroke = Color.FromArgb("#E6E6E6");
#else
border.Stroke = Colors.Transparent;
#endif
this.calendar = bindable.Content.FindByName<SfCalendar>("Calendar1");
#else
Frame frame = bindable.Content.FindByName<Frame>("frame");
frame.IsVisible = true;
#if ANDROID
frame.BorderColor = Colors.Transparent;
#else
frame.BorderColor = Color.FromArgb("#E6E6E6");
#endif
this.calendar = bindable.Content.FindByName<SfCalendar>("Calendar");
#endif
this.datePicker = bindable.Content.FindByName<DatePicker>("datePicker");
this.weekNumberSwitch = bindable.Content.FindByName<Switch>("weekNumberSwitch");
this.enableDatesSwitch = bindable.Content.FindByName<Switch>("enableDatesSwitch");
this.allowViewNavigationSwitch = bindable.Content.FindByName<Switch>("allowViewNavigationSwitch");
this.weekNumberSwitch = bindable.Content.FindByName<SfSwitch>("weekNumberSwitch");
this.enableDatesSwitch = bindable.Content.FindByName<SfSwitch>("enableDatesSwitch");
this.allowViewNavigationSwitch = bindable.Content.FindByName<SfSwitch>("allowViewNavigationSwitch");
this.weekNumberGrid = bindable.Content.FindByName<Grid>("weekNumberGrid");
this.enableSwipeSelectionSwitch = bindable.Content.FindByName<Switch>("enableSwipeSelectionSwitch");
this.enableSwipeSelectionSwitch = bindable.Content.FindByName<SfSwitch>("enableSwipeSelectionSwitch");
this.enableSwipeSelectionGrid = bindable.Content.FindByName<Grid>("enableSwipeSelectionGrid");
this.trailingDatesGrid = bindable.Content.FindByName<Grid>("trailingDatesGrid");
this.trailingDatesSwitch = bindable.Content.FindByName<Switch>("trailingDatesSwitch");
this.trailingDatesSwitch = bindable.Content.FindByName<SfSwitch>("trailingDatesSwitch");
this.comboBox = bindable.Content.FindByName<SfComboBox>("comboBox");
comboBox.ItemsSource = Enum.GetValues(typeof(CalendarView)).ToList<CalendarView>();
@ -156,8 +149,8 @@ namespace SampleBrowser.Maui.Calendar.SfCalendar
directionComboBox.SelectedIndex = 0;
directionComboBox.SelectionChanged += DirectionComboBox_SelectionChanged;
this.enableActionButtonsSwitch = bindable.Content.FindByName<Switch>("showActionButtonsSwitch");
this.enableTodayButtonSwitch = bindable.Content.FindByName<Switch>("showTodayButtonSwitch");
this.enableActionButtonsSwitch = bindable.Content.FindByName<SfSwitch>("showActionButtonsSwitch");
this.enableTodayButtonSwitch = bindable.Content.FindByName<SfSwitch>("showTodayButtonSwitch");
this.calendar.MinimumDate = new DateTime(1900, 01, 01);
this.calendar.MaximumDate = new DateTime(2100, 12, 31);
@ -175,37 +168,37 @@ namespace SampleBrowser.Maui.Calendar.SfCalendar
if (this.enableDatesSwitch != null)
{
this.enableDatesSwitch.Toggled += EnablePastDates_Toggled;
this.enableDatesSwitch.StateChanged += EnablePastDates_Toggled;
}
if (this.enableSwipeSelectionSwitch != null)
{
this.enableSwipeSelectionSwitch.Toggled += EnableSwipeSelection_Toggled;
this.enableSwipeSelectionSwitch.StateChanged += EnableSwipeSelection_Toggled;
}
if (this.weekNumberSwitch != null)
{
this.weekNumberSwitch.Toggled += WeekNumberSwitch_Toggled;
this.weekNumberSwitch.StateChanged += WeekNumberSwitch_Toggled;
}
if (this.trailingDatesSwitch != null)
{
this.trailingDatesSwitch.Toggled += TrailingDatesSwitch_Toggled;
this.trailingDatesSwitch.StateChanged += TrailingDatesSwitch_Toggled;
}
if (this.allowViewNavigationSwitch != null)
{
this.allowViewNavigationSwitch.Toggled += AllowViewNavigationSwitch_Toggled;
this.allowViewNavigationSwitch.StateChanged += AllowViewNavigationSwitch_Toggled;
}
if (this.enableActionButtonsSwitch != null)
{
this.enableActionButtonsSwitch.Toggled += EnableActionButtonsSwitch_Toggled;
this.enableActionButtonsSwitch.StateChanged += EnableActionButtonsSwitch_Toggled;
}
if (this.enableTodayButtonSwitch != null)
{
this.enableTodayButtonSwitch.Toggled += EnableTodayButtonSwitch_Toggled;
this.enableTodayButtonSwitch.StateChanged += EnableTodayButtonSwitch_Toggled;
}
if (this.calendar != null && this.datePicker != null)
@ -387,11 +380,11 @@ namespace SampleBrowser.Maui.Calendar.SfCalendar
/// </summary>
/// <param name="sender">return the object</param>
/// <param name="e">Event Arguments</param>
private void AllowViewNavigationSwitch_Toggled(object? sender, ToggledEventArgs e)
private void AllowViewNavigationSwitch_Toggled(object? sender, SwitchStateChangedEventArgs e)
{
if (this.calendar != null)
if (this.calendar != null && e.NewValue.HasValue)
{
this.calendar.AllowViewNavigation = e.Value;
this.calendar.AllowViewNavigation = e.NewValue.Value;
}
}
@ -400,11 +393,11 @@ namespace SampleBrowser.Maui.Calendar.SfCalendar
/// </summary>
/// <param name="sender">return the object</param>
/// <param name="e">Event Arguments</param>
private void WeekNumberSwitch_Toggled(object? sender, ToggledEventArgs e)
private void WeekNumberSwitch_Toggled(object? sender, SwitchStateChangedEventArgs e)
{
if (this.calendar != null)
if (this.calendar != null && e.NewValue.HasValue)
{
this.calendar.MonthView.ShowWeekNumber = e.Value;
this.calendar.MonthView.ShowWeekNumber = e.NewValue.Value;
}
}
@ -413,11 +406,11 @@ namespace SampleBrowser.Maui.Calendar.SfCalendar
/// </summary>
/// <param name="sender">return the object</param>
/// <param name="e">Event Arguments</param>
private void TrailingDatesSwitch_Toggled(object? sender, ToggledEventArgs e)
private void TrailingDatesSwitch_Toggled(object? sender, SwitchStateChangedEventArgs e)
{
if (this.calendar != null)
if (this.calendar != null && e.NewValue.HasValue)
{
this.calendar.ShowTrailingAndLeadingDates = e.Value;
this.calendar.ShowTrailingAndLeadingDates = e.NewValue.Value;
}
}
@ -426,11 +419,11 @@ namespace SampleBrowser.Maui.Calendar.SfCalendar
/// </summary>
/// <param name="sender">return the object</param>
/// <param name="e">Event Arguments</param>
private void EnablePastDates_Toggled(object? sender, ToggledEventArgs e)
private void EnablePastDates_Toggled(object? sender, SwitchStateChangedEventArgs e)
{
if (this.calendar != null)
if (this.calendar != null && e.NewValue.HasValue)
{
this.calendar.EnablePastDates = e.Value;
this.calendar.EnablePastDates = e.NewValue.Value;
}
}
@ -439,11 +432,11 @@ namespace SampleBrowser.Maui.Calendar.SfCalendar
/// </summary>
/// <param name="sender">return the object</param>
/// <param name="e">Event Arguments</param>
private void EnableSwipeSelection_Toggled(object? sender, ToggledEventArgs e)
private void EnableSwipeSelection_Toggled(object? sender, SwitchStateChangedEventArgs e)
{
if (this.calendar != null)
if (this.calendar != null && e.NewValue.HasValue)
{
this.calendar.EnableSwipeSelection = e.Value;
this.calendar.EnableSwipeSelection = e.NewValue.Value;
}
}
@ -452,11 +445,11 @@ namespace SampleBrowser.Maui.Calendar.SfCalendar
/// </summary>
/// <param name="sender">return the object</param>
/// <param name="e">Event Arguments</param>
private void EnableTodayButtonSwitch_Toggled(object? sender, ToggledEventArgs e)
private void EnableTodayButtonSwitch_Toggled(object? sender, SwitchStateChangedEventArgs e)
{
if (this.calendar != null)
if (this.calendar != null && e.NewValue.HasValue)
{
this.calendar.ShowTodayButton = e.Value;
this.calendar.ShowTodayButton = e.NewValue.Value;
}
}
@ -465,11 +458,11 @@ namespace SampleBrowser.Maui.Calendar.SfCalendar
/// </summary>
/// <param name="sender">return the object</param>
/// <param name="e">Event Arguments</param>
private void EnableActionButtonsSwitch_Toggled(object? sender, ToggledEventArgs e)
private void EnableActionButtonsSwitch_Toggled(object? sender, SwitchStateChangedEventArgs e)
{
if (this.calendar != null)
if (this.calendar != null && e.NewValue.HasValue)
{
this.calendar.ShowActionButtons = e.Value;
this.calendar.ShowActionButtons = e.NewValue.Value;
}
}
@ -487,43 +480,43 @@ namespace SampleBrowser.Maui.Calendar.SfCalendar
if (this.weekNumberSwitch != null)
{
this.weekNumberSwitch.Toggled -= WeekNumberSwitch_Toggled;
this.weekNumberSwitch.StateChanged -= WeekNumberSwitch_Toggled;
this.weekNumberSwitch = null;
}
if (this.trailingDatesSwitch != null)
{
this.trailingDatesSwitch.Toggled -= TrailingDatesSwitch_Toggled;
this.trailingDatesSwitch.StateChanged -= TrailingDatesSwitch_Toggled;
this.trailingDatesSwitch = null;
}
if (this.enableDatesSwitch != null)
{
this.enableDatesSwitch.Toggled -= EnablePastDates_Toggled;
this.enableDatesSwitch.StateChanged -= EnablePastDates_Toggled;
this.enableDatesSwitch = null;
}
if (this.enableSwipeSelectionSwitch != null)
{
this.enableSwipeSelectionSwitch.Toggled -= EnableSwipeSelection_Toggled;
this.enableSwipeSelectionSwitch.StateChanged -= EnableSwipeSelection_Toggled;
this.enableDatesSwitch = null;
}
if (this.allowViewNavigationSwitch != null)
{
this.allowViewNavigationSwitch.Toggled -= AllowViewNavigationSwitch_Toggled;
this.allowViewNavigationSwitch.StateChanged -= AllowViewNavigationSwitch_Toggled;
this.allowViewNavigationSwitch = null;
}
if (this.enableActionButtonsSwitch != null)
{
this.enableActionButtonsSwitch.Toggled -= EnableActionButtonsSwitch_Toggled;
this.enableActionButtonsSwitch.StateChanged -= EnableActionButtonsSwitch_Toggled;
this.enableActionButtonsSwitch = null;
}
if (this.enableTodayButtonSwitch != null)
{
this.enableTodayButtonSwitch.Toggled -= EnableTodayButtonSwitch_Toggled;
this.enableTodayButtonSwitch.StateChanged -= EnableTodayButtonSwitch_Toggled;
this.enableTodayButtonSwitch = null;
}

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

@ -4,17 +4,22 @@
xmlns:local="clr-namespace:SampleBrowser.Maui.Calendar.SfCalendar"
xmlns:thickness ="clr-namespace:Microsoft.Maui;assembly=Microsoft.Maui"
xmlns:editors="clr-namespace:Syncfusion.Maui.Inputs;assembly=Syncfusion.Maui.Inputs"
xmlns:buttons="clr-namespace:Syncfusion.Maui.Buttons;assembly=Syncfusion.Maui.Buttons"
xmlns:calendar="clr-namespace:Syncfusion.Maui.Calendar;assembly=Syncfusion.Maui.Calendar"
xmlns:localCore="clr-namespace:SampleBrowser.Maui.Base;assembly=SampleBrowser.Maui.Base"
Background="WhiteSmoke" Margin="-4, -4, -6, -6">
Background="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}" Margin="-4, -4, -6, -6">
<localCore:SampleView.Content>
<Grid WidthRequest="350" HeightRequest="400">
<Frame IsVisible="False" x:Name="frame" HasShadow="False" Background="White" CornerRadius="10" HorizontalOptions="Center" VerticalOptions="Center" Margin="0" Padding="2">
<calendar:SfCalendar x:Name="Calendar" ShowActionButtons="True" ShowTodayButton="True"/>
<Frame IsVisible="False" x:Name="frame" HasShadow="False"
Background="{AppThemeBinding Light={StaticResource SampleBrowserBackgroundLight}, Dark={StaticResource SampleBrowserBackground}}"
CornerRadius="10" HorizontalOptions="Center" VerticalOptions="Center" Margin="0" Padding="2">
<calendar:SfCalendar x:Name="Calendar" Background="Transparent" ShowActionButtons="True" ShowTodayButton="True"/>
</Frame>
<Border IsVisible="False" x:Name="border" Background="White" StrokeThickness="2" StrokeShape="RoundRectangle 10,10,10,10" HorizontalOptions="Center" VerticalOptions="Center" Margin="0" Padding="2">
<calendar:SfCalendar x:Name="Calendar1" ShowActionButtons="True" ShowTodayButton="True"/>
<Border IsVisible="False" x:Name="border"
Background="{AppThemeBinding Light={StaticResource SampleBrowserBackgroundLight}, Dark={StaticResource SampleBrowserBackground}}"
StrokeThickness="2" StrokeShape="RoundRectangle 10,10,10,10" HorizontalOptions="Center" VerticalOptions="Center" Margin="0" Padding="2">
<calendar:SfCalendar x:Name="Calendar1" Background="Transparent" ShowActionButtons="True" ShowTodayButton="True"/>
</Border>
</Grid>
</localCore:SampleView.Content>
@ -33,10 +38,10 @@
FontSize="14"
VerticalOptions="Center"
HorizontalOptions="Start"
TextColor="Gray"/>
TextColor="{AppThemeBinding Light={StaticResource TileTextColourAlt1Light}, Dark={StaticResource TileTextColourAlt1}}"/>
<editors:SfComboBox x:Name="comboBox" Grid.Column="1"
Margin="5,15,0,0" VerticalOptions="Center"
<editors:SfComboBox x:Name="comboBox" Grid.Column="1" IsClearButtonVisible="False"
Margin="5,15,0,0" VerticalOptions="Center" TextColor="{AppThemeBinding Light={StaticResource PlaceholderTextColourLight}, Dark={StaticResource PlaceholderTextColour}}"
HorizontalOptions="End" />
</Grid>
@ -51,10 +56,10 @@
FontSize="14"
VerticalOptions="Center"
HorizontalOptions="Start"
TextColor="Gray"/>
TextColor="{AppThemeBinding Light={StaticResource TileTextColourAlt1Light}, Dark={StaticResource TileTextColourAlt1}}"/>
<editors:SfComboBox x:Name="selectionComboBox" Grid.Column="1"
Margin="5,15,0,0" VerticalOptions="Center"
<editors:SfComboBox x:Name="selectionComboBox" Grid.Column="1" IsClearButtonVisible="False"
Margin="5,15,0,0" VerticalOptions="Center" TextColor="{AppThemeBinding Light={StaticResource PlaceholderTextColourLight}, Dark={StaticResource PlaceholderTextColour}}"
HorizontalOptions="End"/>
</Grid>
@ -69,10 +74,10 @@
FontSize="14"
VerticalOptions="Center"
HorizontalOptions="Start"
TextColor="Gray"/>
TextColor="{AppThemeBinding Light={StaticResource TileTextColourAlt1Light}, Dark={StaticResource TileTextColourAlt1}}"/>
<editors:SfComboBox x:Name="selectionShapeComboBox" Grid.Column="1"
Margin="5,15,0,0" VerticalOptions="Center"
<editors:SfComboBox x:Name="selectionShapeComboBox" Grid.Column="1" IsClearButtonVisible="False"
Margin="5,15,0,0" VerticalOptions="Center" TextColor="{AppThemeBinding Light={StaticResource PlaceholderTextColourLight}, Dark={StaticResource PlaceholderTextColour}}"
HorizontalOptions="End"/>
</Grid>
@ -88,10 +93,10 @@
FontSize="14"
VerticalOptions="Center"
HorizontalOptions="Start"
TextColor="Gray"/>
TextColor="{AppThemeBinding Light={StaticResource TileTextColourAlt1Light}, Dark={StaticResource TileTextColourAlt1}}"/>
<editors:SfComboBox x:Name="directionComboBox" Grid.Column="1"
Margin="5,15,0,0" VerticalOptions="Center"
<editors:SfComboBox x:Name="directionComboBox" Grid.Column="1" IsClearButtonVisible="False"
Margin="5,15,0,0" VerticalOptions="Center" TextColor="{AppThemeBinding Light={StaticResource PlaceholderTextColourLight}, Dark={StaticResource PlaceholderTextColour}}"
HorizontalOptions="End" />
</Grid>
@ -105,7 +110,7 @@
FontSize="14"
VerticalOptions="Center"
HorizontalOptions="Start"
TextColor="Gray"/>
TextColor="{AppThemeBinding Light={StaticResource TileTextColourAlt1Light}, Dark={StaticResource TileTextColourAlt1}}"/>
<DatePicker x:Name="datePicker"
Grid.Column="1"
@ -115,28 +120,28 @@
<Grid x:Name="allowViewNavigationGrid" HeightRequest="50">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.8*"/>
<ColumnDefinition Width="0.2*"/>
<ColumnDefinition Width="0.7*"/>
<ColumnDefinition Width="0.3*"/>
</Grid.ColumnDefinitions>
<Label Text="Allow view navigation"
LineBreakMode="WordWrap"
FontSize="14"
VerticalOptions="Center"
HorizontalOptions="Start"
TextColor="Gray"/>
<Switch x:Name="allowViewNavigationSwitch"
Grid.Column="1"
TextColor="{AppThemeBinding Light={StaticResource TileTextColourAlt1Light}, Dark={StaticResource TileTextColourAlt1}}"/>
<buttons:SfSwitch x:Name="allowViewNavigationSwitch"
Grid.Column="1"
Margin="5,0,0,0"
VerticalOptions="Center"
IsToggled="True"
HorizontalOptions="End">
</Switch>
VerticalOptions="Center"
IsOn="True"
HorizontalOptions="End">
</buttons:SfSwitch>
</Grid>
<Grid x:Name="weekNumberGrid" HeightRequest="50">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.8*"/>
<ColumnDefinition Width="0.2*"/>
<ColumnDefinition Width="0.7*"/>
<ColumnDefinition Width="0.3*"/>
</Grid.ColumnDefinitions>
<Label Text="Show week number"
@ -144,114 +149,114 @@
FontSize="14"
VerticalOptions="Center"
HorizontalOptions="Start"
TextColor="Gray"/>
<Switch x:Name="weekNumberSwitch"
TextColor="{AppThemeBinding Light={StaticResource TileTextColourAlt1Light}, Dark={StaticResource TileTextColourAlt1}}"/>
<buttons:SfSwitch x:Name="weekNumberSwitch"
Grid.Column="1"
Margin="5,0,0,0"
IsToggled="False"
IsOn="False"
VerticalOptions="Center"
HorizontalOptions="End">
</Switch>
</buttons:SfSwitch>
</Grid>
<Grid x:Name="trailingDatesGrid" HeightRequest="50">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.8*"/>
<ColumnDefinition Width="0.2*"/>
<ColumnDefinition Width="0.7*"/>
<ColumnDefinition Width="0.3*"/>
</Grid.ColumnDefinitions>
<Label Text="Show trailing and leading dates"
LineBreakMode="WordWrap"
FontSize="14"
VerticalOptions="Center"
HorizontalOptions="Start"
TextColor="Gray"/>
<Switch x:Name="trailingDatesSwitch"
TextColor="{AppThemeBinding Light={StaticResource TileTextColourAlt1Light}, Dark={StaticResource TileTextColourAlt1}}"/>
<buttons:SfSwitch x:Name="trailingDatesSwitch"
Grid.Column="1"
Margin="5,0,0,0"
IsToggled="True"
IsOn="True"
VerticalOptions="Center"
HorizontalOptions="End">
</Switch>
</buttons:SfSwitch>
</Grid>
<Grid x:Name="enableDatesGrid" HeightRequest="50">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.8*"/>
<ColumnDefinition Width="0.2*"/>
<ColumnDefinition Width="0.7*"/>
<ColumnDefinition Width="0.3*"/>
</Grid.ColumnDefinitions>
<Label Text="Enable Past Dates"
LineBreakMode="WordWrap"
FontSize="14"
VerticalOptions="Center"
HorizontalOptions="Start"
TextColor="Gray"/>
<Switch x:Name="enableDatesSwitch"
TextColor="{AppThemeBinding Light={StaticResource TileTextColourAlt1Light}, Dark={StaticResource TileTextColourAlt1}}"/>
<buttons:SfSwitch x:Name="enableDatesSwitch"
Grid.Column="1"
Margin="5,0,0,0"
VerticalOptions="Center"
IsToggled="True"
IsOn="True"
HorizontalOptions="End">
</Switch>
</buttons:SfSwitch>
</Grid>
<Grid x:Name="enableSwipeSelectionGrid" HeightRequest="50">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.8*"/>
<ColumnDefinition Width="0.2*"/>
<ColumnDefinition Width="0.7*"/>
<ColumnDefinition Width="0.3*"/>
</Grid.ColumnDefinitions>
<Label Text="Enable swipe Selection"
LineBreakMode="WordWrap"
FontSize="14"
VerticalOptions="Center"
HorizontalOptions="Start"
TextColor="Gray"/>
<Switch x:Name="enableSwipeSelectionSwitch"
TextColor="{AppThemeBinding Light={StaticResource TileTextColourAlt1Light}, Dark={StaticResource TileTextColourAlt1}}"/>
<buttons:SfSwitch x:Name="enableSwipeSelectionSwitch"
Grid.Column="1"
Margin="5,0,0,0"
VerticalOptions="Center"
IsToggled="False"
IsOn="False"
HorizontalOptions="End">
</Switch>
</buttons:SfSwitch>
</Grid>
<Grid x:Name="showActionButtonGrid" HeightRequest="50">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.8*"/>
<ColumnDefinition Width="0.2*"/>
<ColumnDefinition Width="0.7*"/>
<ColumnDefinition Width="0.3*"/>
</Grid.ColumnDefinitions>
<Label Text="Show action buttons"
LineBreakMode="WordWrap"
FontSize="14"
VerticalOptions="Center"
HorizontalOptions="Start"
TextColor="Gray"/>
<Switch x:Name="showActionButtonsSwitch"
TextColor="{AppThemeBinding Light={StaticResource TileTextColourAlt1Light}, Dark={StaticResource TileTextColourAlt1}}"/>
<buttons:SfSwitch x:Name="showActionButtonsSwitch"
Grid.Column="1"
Margin="5,0,0,0"
VerticalOptions="Center"
IsToggled="True"
IsOn="True"
HorizontalOptions="End">
</Switch>
</buttons:SfSwitch>
</Grid>
<Grid x:Name="showTodayButtonGrid" HeightRequest="50">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="0.8*"/>
<ColumnDefinition Width="0.2*"/>
<ColumnDefinition Width="0.7*"/>
<ColumnDefinition Width="0.3*"/>
</Grid.ColumnDefinitions>
<Label Text="Show today button"
LineBreakMode="WordWrap"
FontSize="14"
VerticalOptions="Center"
HorizontalOptions="Start"
TextColor="Gray"/>
<Switch x:Name="showTodayButtonSwitch"
TextColor="{AppThemeBinding Light={StaticResource TileTextColourAlt1Light}, Dark={StaticResource TileTextColourAlt1}}"/>
<buttons:SfSwitch x:Name="showTodayButtonSwitch"
Grid.Column="1"
Margin="5,0,0,0"
VerticalOptions="Center"
IsToggled="True"
IsOn="True"
HorizontalOptions="End">
</Switch>
</buttons:SfSwitch>
</Grid>
</StackLayout>

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

@ -5,14 +5,14 @@
xmlns:thickness ="clr-namespace:Microsoft.Maui;assembly=Microsoft.Maui"
xmlns:editors="clr-namespace:Syncfusion.Maui.Inputs;assembly=Syncfusion.Maui.Inputs"
xmlns:calendar="clr-namespace:Syncfusion.Maui.Calendar;assembly=Syncfusion.Maui.Calendar"
xmlns:localCore="clr-namespace:SampleBrowser.Maui.Base;assembly=SampleBrowser.Maui.Base" Background="WhiteSmoke" Margin="-4, -4, -6, -6">
xmlns:localCore="clr-namespace:SampleBrowser.Maui.Base;assembly=SampleBrowser.Maui.Base" Background="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}" Margin="-4, -4, -6, -6">
<localCore:SampleView.Content>
<Grid WidthRequest="350" HeightRequest="400" Padding="0">
<Frame IsVisible="False" x:Name="frame" HasShadow="False" Background="White" CornerRadius="10" HorizontalOptions="Center" VerticalOptions="Center" Margin="0" Padding="0">
<Frame IsVisible="False" x:Name="frame" HasShadow="False" Background="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}" CornerRadius="10" HorizontalOptions="Center" VerticalOptions="Center" Margin="0" Padding="0">
<calendar:SfCalendar x:Name="HighlightCalendar" AllowViewNavigation="False"/>
</Frame>
<Border IsVisible="False" x:Name="border" Background="WhiteSmoke" StrokeThickness="2" StrokeShape="RoundRectangle 10,10,10,10" HorizontalOptions="Center" VerticalOptions="Center" Margin="0" Padding="0">
<Border IsVisible="False" x:Name="border" Background="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}" StrokeThickness="2" StrokeShape="RoundRectangle 10,10,10,10" HorizontalOptions="Center" VerticalOptions="Center" Margin="0" Padding="0">
<calendar:SfCalendar x:Name="HighlightCalendar1" AllowViewNavigation="False"/>
</Border>
</Grid>
@ -32,10 +32,10 @@
FontSize="14"
VerticalOptions="Center"
HorizontalOptions="Start"
TextColor="Gray"/>
TextColor="{AppThemeBinding Light={StaticResource TileTextColourAlt1Light}, Dark={StaticResource TileTextColourAlt1}}"/>
<editors:SfComboBox x:Name="comboBox" Grid.Column="1"
Margin="5,15,0,0" VerticalOptions="Center"
<editors:SfComboBox x:Name="comboBox" Grid.Column="1" IsClearButtonVisible="False"
Margin="5,15,0,0" VerticalOptions="Center" TextColor="{AppThemeBinding Light={StaticResource PlaceholderTextColourLight}, Dark={StaticResource PlaceholderTextColour}}"
HorizontalOptions="End" SelectionChanged="comboBox_SelectionChanged"/>
</Grid>
</StackLayout>

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

@ -15,6 +15,11 @@ namespace SampleBrowser.Maui.Calendar.SfCalendar
/// </summary>
public partial class HighlightDates : SampleView
{
/// <summary>
/// Check the application theme is light or dark.
/// </summary>
private bool isLightTheme = Application.Current?.RequestedTheme == AppTheme.Light;
/// <summary>
/// Initializes a new instance of the <see cref="HighlightDates" /> class.
/// </summary>
@ -28,7 +33,7 @@ namespace SampleBrowser.Maui.Calendar.SfCalendar
#if IOS || MACCATALYST
this.border.IsVisible = true;
#if MACCATALYST
this.border.Stroke = Color.FromArgb("#E6E6E6");
this.border.Stroke = isLightTheme ? Colors.White : Color.FromRgba("#1C1B1F");
#else
this.border.Stroke = Colors.Transparent;
#endif
@ -38,7 +43,7 @@ namespace SampleBrowser.Maui.Calendar.SfCalendar
#if ANDROID
this.frame.BorderColor = Colors.Transparent;
#else
this.frame.BorderColor = Color.FromArgb("#E6E6E6");
this.frame.BorderColor = isLightTheme ? Colors.White : Color.FromRgba("#1C1B1F");
#endif
#endif

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

@ -6,11 +6,11 @@
<localCore:SampleView.Content>
<Grid WidthRequest="{OnPlatform Android=330, Default=350}" HeightRequest="{OnPlatform Android=370, Default=400}" Padding="0">
<Frame IsVisible="False" x:Name="frame" HasShadow="False" Background="{Binding BGColor}" BorderColor="{Binding StrokeColor}" CornerRadius="10" HorizontalOptions="Center" VerticalOptions="Center" Margin="0" Padding="2">
<calendar:SfCalendar x:Name="century" View="Century" TodayHighlightBrush="Transparent" AllowViewNavigation="False" NavigationDirection="Horizontal"/>
<calendar:SfCalendar x:Name="century" View="Century" Background="Transparent" TodayHighlightBrush="Transparent" AllowViewNavigation="False" NavigationDirection="Horizontal"/>
</Frame>
<Border IsVisible="False" x:Name="border" Background="{Binding BGColor}" Stroke="{Binding StrokeColor}" StrokeThickness="2" StrokeShape="RoundRectangle 10,10,10,10" HorizontalOptions="Center" VerticalOptions="Center" Margin="0" Padding="2">
<calendar:SfCalendar x:Name="century1" View="Century" TodayHighlightBrush="Transparent" AllowViewNavigation="False" NavigationDirection="Horizontal"/>
<calendar:SfCalendar x:Name="century1" View="Century" Background="Transparent" TodayHighlightBrush="Transparent" AllowViewNavigation="False" NavigationDirection="Horizontal"/>
</Border>
</Grid>
</localCore:SampleView.Content>

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

@ -25,6 +25,11 @@ namespace SampleBrowser.Maui.Calendar.SfCalendar
/// </summary>
public Color StrokeColor { get; set; }
/// <summary>
/// Check the application theme is light or dark.
/// </summary>
private bool isLightTheme = Application.Current?.RequestedTheme == AppTheme.Light;
/// <summary>
/// Initializes a new instance of the <see cref="Century" /> class.
/// </summary>
@ -32,10 +37,10 @@ namespace SampleBrowser.Maui.Calendar.SfCalendar
{
InitializeComponent();
#if MACCATALYST || (!ANDROID && !IOS)
this.Background = Brush.WhiteSmoke;
this.Background = isLightTheme ? Brush.White : (Brush)Color.FromRgba("#1C1B1F");
this.Margin = new Thickness(-4, -4, -6, -6);
this.BGColor = Colors.White;
this.StrokeColor = Color.FromArgb("#E6E6E6");
this.BGColor = isLightTheme ? Color.FromArgb("#F7F2FB") : Color.FromArgb("#25232A");
this.StrokeColor = Colors.Transparent;
#else
this.BGColor = Colors.Transparent;
this.StrokeColor = Colors.Transparent;

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

@ -6,11 +6,11 @@
<localCore:SampleView.Content>
<Grid WidthRequest="{OnPlatform Android=330, Default=350}" HeightRequest="{OnPlatform Android=370, Default=400}" Padding="0">
<Frame IsVisible="False" x:Name="frame" HasShadow="False" Background="{Binding BGColor}" BorderColor="{Binding StrokeColor}" CornerRadius="10" HorizontalOptions="Center" VerticalOptions="Center" Margin="0" Padding="2">
<calendar:SfCalendar x:Name="decade" View="Decade" TodayHighlightBrush="Transparent" AllowViewNavigation="False" NavigationDirection="Horizontal"/>
<calendar:SfCalendar x:Name="decade" View="Decade" Background="Transparent" TodayHighlightBrush="Transparent" AllowViewNavigation="False" NavigationDirection="Horizontal"/>
</Frame>
<Border IsVisible="False" x:Name="border" Background="{Binding BGColor}" Stroke="{Binding StrokeColor}" StrokeThickness="2" StrokeShape="RoundRectangle 10,10,10,10" HorizontalOptions="Center" VerticalOptions="Center" Margin="0" Padding="2">
<calendar:SfCalendar x:Name="decade1" View="Decade" TodayHighlightBrush="Transparent" AllowViewNavigation="False" NavigationDirection="Horizontal"/>
<calendar:SfCalendar x:Name="decade1" View="Decade" Background="Transparent" TodayHighlightBrush="Transparent" AllowViewNavigation="False" NavigationDirection="Horizontal"/>
</Border>
</Grid>
</localCore:SampleView.Content>

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

@ -25,6 +25,11 @@ namespace SampleBrowser.Maui.Calendar.SfCalendar
/// </summary>
public Color StrokeColor { get; set; }
/// <summary>
/// Check the application theme is light or dark.
/// </summary>
private bool isLightTheme = Application.Current?.RequestedTheme == AppTheme.Light;
/// <summary>
/// Initializes a new instance of the <see cref="Decade" /> class.
/// </summary>
@ -32,10 +37,10 @@ namespace SampleBrowser.Maui.Calendar.SfCalendar
{
InitializeComponent();
#if MACCATALYST || (!ANDROID && !IOS)
this.Background = Brush.WhiteSmoke;
this.Background = isLightTheme ? Brush.White : (Brush)Color.FromRgba("#1C1B1F");
this.Margin = new Thickness(-4, -4, -6, -6);
this.BGColor = Colors.White;
this.StrokeColor = Color.FromArgb("#E6E6E6");
this.BGColor = isLightTheme ? Color.FromArgb("#F7F2FB") : Color.FromArgb("#25232A");
this.StrokeColor = Colors.Transparent;
#else
this.BGColor = Colors.Transparent;
this.StrokeColor = Colors.Transparent;

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

@ -2,15 +2,15 @@
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="SampleBrowser.Maui.Calendar.SfCalendar.Month"
xmlns:calendar="clr-namespace:Syncfusion.Maui.Calendar;assembly=Syncfusion.Maui.Calendar"
xmlns:localCore="clr-namespace:SampleBrowser.Maui.Base;assembly=SampleBrowser.Maui.Base" >
xmlns:localCore="clr-namespace:SampleBrowser.Maui.Base;assembly=SampleBrowser.Maui.Base">
<localCore:SampleView.Content>
<Grid WidthRequest="{OnPlatform Android=330, Default=350}" HeightRequest="{OnPlatform Android=370, Default=400}" Padding="0">
<Frame IsVisible="False" x:Name="frame" HasShadow="False" Background="{Binding BGColor}" BorderColor="{Binding StrokeColor}" CornerRadius="10" HorizontalOptions="Center" VerticalOptions="Center" Margin="0" Padding="2">
<calendar:SfCalendar x:Name="month" View="Month" TodayHighlightBrush="Transparent" AllowViewNavigation="False" NavigationDirection="Horizontal"/>
<calendar:SfCalendar x:Name="month" Background="Transparent" View="Month" TodayHighlightBrush="Transparent" AllowViewNavigation="False" NavigationDirection="Horizontal"/>
</Frame>
<Border IsVisible="False" x:Name="border" Background="{Binding BGColor}" Stroke="{Binding StrokeColor}" StrokeThickness="2" StrokeShape="RoundRectangle 10,10,10,10" HorizontalOptions="Center" VerticalOptions="Center" Margin="0" Padding="2">
<calendar:SfCalendar x:Name="month1" View="Month" TodayHighlightBrush="Transparent" AllowViewNavigation="False" NavigationDirection="Horizontal"/>
<calendar:SfCalendar x:Name="month1" Background="Transparent" View="Month" TodayHighlightBrush="Transparent" AllowViewNavigation="False" NavigationDirection="Horizontal"/>
</Border>
</Grid>
</localCore:SampleView.Content>

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

@ -25,6 +25,11 @@ namespace SampleBrowser.Maui.Calendar.SfCalendar
/// </summary>
public Color StrokeColor { get; set; }
/// <summary>
/// Check the application theme is light or dark.
/// </summary>
private bool isLightTheme = Application.Current?.RequestedTheme == AppTheme.Light;
/// <summary>
/// Initializes a new instance of the <see cref="Month" /> class.
/// </summary>
@ -32,10 +37,10 @@ namespace SampleBrowser.Maui.Calendar.SfCalendar
{
InitializeComponent();
#if MACCATALYST || (!ANDROID && !IOS)
this.Background = Brush.WhiteSmoke;
this.Background = isLightTheme ? Brush.White : (Brush)Color.FromRgba("#1C1B1F");
this.Margin = new Thickness(-4, -4, -6, -6);
this.BGColor = Colors.White;
this.StrokeColor = Color.FromArgb("#E6E6E6");
this.BGColor = isLightTheme ? Color.FromArgb("#F7F2FB") : Color.FromArgb("#25232A");
this.StrokeColor = Colors.Transparent;
#else
this.BGColor = Colors.Transparent;
this.StrokeColor = Colors.Transparent;

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

@ -6,11 +6,11 @@
<localCore:SampleView.Content>
<Grid WidthRequest="{OnPlatform Android=330, Default=350}" HeightRequest="{OnPlatform Android=370, Default=400}" Padding="0">
<Frame IsVisible="False" x:Name="frame" HasShadow="False" Background="{Binding BGColor}" BorderColor="{Binding StrokeColor}" CornerRadius="10" HorizontalOptions="Center" VerticalOptions="Center" Margin="0" Padding="2">
<calendar:SfCalendar x:Name="year" View="Year" TodayHighlightBrush="Transparent" AllowViewNavigation="False" NavigationDirection="Horizontal"/>
<calendar:SfCalendar x:Name="year" View="Year" Background="Transparent" TodayHighlightBrush="Transparent" AllowViewNavigation="False" NavigationDirection="Horizontal"/>
</Frame>
<Border IsVisible="False" x:Name="border" Background="{Binding BGColor}" Stroke="{Binding StrokeColor}" StrokeThickness="2" StrokeShape="RoundRectangle 10,10,10,10" HorizontalOptions="Center" VerticalOptions="Center" Margin="0" Padding="2">
<calendar:SfCalendar x:Name="year1" View="Year" TodayHighlightBrush="Transparent" AllowViewNavigation="False" NavigationDirection="Horizontal"/>
<calendar:SfCalendar x:Name="year1" View="Year" Background="Transparent" TodayHighlightBrush="Transparent" AllowViewNavigation="False" NavigationDirection="Horizontal"/>
</Border>
</Grid>

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

@ -25,6 +25,11 @@ namespace SampleBrowser.Maui.Calendar.SfCalendar
/// </summary>
public Color StrokeColor { get; set; }
/// <summary>
/// Check the application theme is light or dark.
/// </summary>
private bool isLightTheme = Application.Current?.RequestedTheme == AppTheme.Light;
/// <summary>
/// Initializes a new instance of the <see cref="Year" /> class.
/// </summary>
@ -32,10 +37,10 @@ namespace SampleBrowser.Maui.Calendar.SfCalendar
{
InitializeComponent();
#if MACCATALYST || (!ANDROID && !IOS)
this.Background = Brush.WhiteSmoke;
this.Background = isLightTheme ? Brush.White : (Brush)Color.FromRgba("#1C1B1F");
this.Margin = new Thickness(-4, -4, -6, -6);
this.BGColor = Colors.White;
this.StrokeColor = Color.FromArgb("#E6E6E6");
this.BGColor = isLightTheme ? Color.FromArgb("#F7F2FB") : Color.FromArgb("#25232A");
this.StrokeColor = Colors.Transparent;
#else
this.BGColor = Colors.Transparent;
this.StrokeColor = Colors.Transparent;

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

@ -3,11 +3,13 @@
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:SampleBrowser.Maui.Cards"
xmlns:base="clr-namespace:SampleBrowser.Maui.Base;assembly=SampleBrowser.Maui.Base"
xmlns:syncTheme="clr-namespace:Syncfusion.Maui.Themes;assembly=Syncfusion.Maui.Core"
x:Class="SampleBrowser.Maui.Cards.App">
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<base:SampleBrowserStyles/>
<syncTheme:SyncfusionThemeResourceDictionary />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>

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

@ -3,11 +3,9 @@
<ControlCategory Name="Layouts">
<Control Title="Cards"
Image="cards.png"
StatusTag="New" IsPreview="true"
ControlName="SfCards"
Description="The Cards control allows you to create a dismissible card or a stack of cards where one card is visible at a time until you swipe to see the next card.">
Description="A container control that allows users to create dismissible cards or a stack of cards.">
<Sample Title="Card view" SampleName="CardView" CodeViewerPath="Cards/GettingStarted/"/>
<Sample Title="Card manager" SampleName="CreditCard" CodeViewerPath="Cards/CardManager/"/>
</Control>
</ControlCategory>
</SyncfusionControls>

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

@ -71,9 +71,11 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="SampleBrowser.Maui.Base" version="24.2.3" />
<PackageReference Include="Syncfusion.Maui.Cards" version="24.2.3" />
<PackageReference Include="Syncfusion.Maui.Core" version="24.2.3" />
<PackageReference Include="Syncfusion.Maui.TabView" version="24.2.3" />
<PackageReference Include="SampleBrowser.Maui.Base" version="25.1.35" />
<PackageReference Include="Syncfusion.Maui.Cards" version="25.1.35" />
<PackageReference Include="Syncfusion.Maui.Core" version="25.1.35" />
<PackageReference Include="Syncfusion.Maui.Inputs" version="25.1.35" />
<PackageReference Include="Syncfusion.Maui.TabView" version="25.1.35" />
<PackageReference Include="Syncfusion.Maui.Buttons" version="25.1.35" />
</ItemGroup>
</Project>

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

@ -6,25 +6,25 @@
<DependentUpon>CardView.xaml</DependentUpon>
</Compile>
<Compile Include="$(MSBuildThisFileDirectory)\Samples\Cards\CardManager\View\CreditCard.xaml.cs">
<Link>Samples\Cards\CardManager\View\CreditCard.xaml.cs</Link>
<DependentUpon>CreditCard.xaml</DependentUpon>
<Compile Include="$(MSBuildThisFileDirectory)\Samples\Cards\CardManager\View\CardManager.xaml.cs">
<Link>Samples\Cards\CardManager\View\CardManager.xaml.cs</Link>
<DependentUpon>CardManager.xaml</DependentUpon>
</Compile>
<Compile Include="$(MSBuildThisFileDirectory)\Samples\Cards\GettingStarted\Behavior\GettingStartedBehavior.cs">
<Link>Samples\Cards\GettingStarted\Behavior\GettingStartedBehavior.cs</Link>
</Compile>
<Compile Include="$(MSBuildThisFileDirectory)\Samples\Cards\CardManager\Behavior\CreditCardBehavior.cs">
<Link>Samples\Cards\CardManager\Behavior\CreditCardBehavior.cs</Link>
<Compile Include="$(MSBuildThisFileDirectory)\Samples\Cards\CardManager\Behavior\CardManagerBehavior.cs">
<Link>Samples\Cards\CardManager\Behavior\CardManagerBehavior.cs</Link>
</Compile>
<Compile Include="$(MSBuildThisFileDirectory)\Samples\Cards\GettingStarted\ViewModel\ViewModel.cs">
<Link>Samples\Cards\GettingStarted\ViewModel\ViewModel.cs</Link>
</Compile>
<Compile Include="$(MSBuildThisFileDirectory)\Samples\Cards\CardManager\ViewModel\CreditCardViewModel.cs">
<Link>Samples\Cards\CardManager\ViewModel\CreditCardViewModel.cs</Link>
<Compile Include="$(MSBuildThisFileDirectory)\Samples\Cards\CardManager\ViewModel\CardManagerViewModel.cs">
<Link>Samples\Cards\CardManager\ViewModel\CardManagerViewModel.cs</Link>
</Compile>
</ItemGroup>
@ -37,8 +37,8 @@
<MauiXaml Include="$(MSBuildThisFileDirectory)\Samples\Cards\GettingStarted\View\CardView.xaml">
<Link>Samples\Cards\GettingStarted\View\CardView.xaml</Link>
</MauiXaml>
<MauiXaml Include="$(MSBuildThisFileDirectory)\Samples\Cards\CardManager\View\CreditCard.xaml">
<Link>Samples\Cards\CardManager\View\CreditCard.xaml</Link>
<MauiXaml Include="$(MSBuildThisFileDirectory)\Samples\Cards\CardManager\View\CardManager.xaml">
<Link>Samples\Cards\CardManager\View\CardManager.xaml</Link>
</MauiXaml>
</ItemGroup>

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