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" <Application xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:SampleBrowser.Maui.Accordion" 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> <Application.Resources>
<ResourceDictionary> <ResourceDictionary>
<ResourceDictionary.MergedDictionaries> <ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="Resources/Styles/Colors.xaml" /> <base:SampleBrowserStyles/>
<ResourceDictionary Source="Resources/Styles/Styles.xaml" /> <theme:SyncfusionThemeResourceDictionary/>
</ResourceDictionary.MergedDictionaries> </ResourceDictionary.MergedDictionaries>
</ResourceDictionary> </ResourceDictionary>
</Application.Resources> </Application.Resources>

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

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

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

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

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

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

@ -6,8 +6,7 @@
xmlns:imageExtension="clr-namespace:SampleBrowser.Maui.Base.Converters;assembly=SampleBrowser.Maui.Base" xmlns:imageExtension="clr-namespace:SampleBrowser.Maui.Base.Converters;assembly=SampleBrowser.Maui.Base"
xmlns:localCore="clr-namespace:SampleBrowser.Maui.Base;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:syncfusion="clr-namespace:Syncfusion.Maui.Accordion;assembly=Syncfusion.Maui.Expander"
xmlns:thickness ="clr-namespace:Microsoft.Maui;assembly=Microsoft.Maui" xmlns:thickness ="clr-namespace:Microsoft.Maui;assembly=Microsoft.Maui">
Background="White">
<localCore:SampleView.Resources> <localCore:SampleView.Resources>
<imageExtension:SfImageSourceConverter x:Key="imageconverter"/> <imageExtension:SfImageSourceConverter x:Key="imageconverter"/>
</localCore:SampleView.Resources> </localCore:SampleView.Resources>
@ -22,28 +21,6 @@
</localCore:SampleView.Margin> </localCore:SampleView.Margin>
<localCore:SampleView.Content> <localCore:SampleView.Content>
<Grid ColumnDefinitions="0.4*, 0.6*"> <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}" <Grid IsClippedToBounds="True" IsVisible="{OnPlatform MacCatalyst=True, WinUI=True, Default=False}"
RowDefinitions="0.3*,100,50,*"> RowDefinitions="0.3*,100,50,*">
<Image Source="{imageExtension:SfImageResource registrationform.png}" Aspect="AspectFill" Grid.RowSpan="4"/> <Image Source="{imageExtension:SfImageResource registrationform.png}" Aspect="AspectFill" Grid.RowSpan="4"/>
@ -68,13 +45,8 @@
</Grid> </Grid>
</syncfusion:AccordionItem.Header> </syncfusion:AccordionItem.Header>
<syncfusion:AccordionItem.Content> <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 Margin="16,6,0,0">
<Grid.Resources>
<Style TargetType="Label">
<Setter Property="FontFamily" Value="Roboto-Regular"/>
</Style>
</Grid.Resources>
<Grid.RowDefinitions > <Grid.RowDefinitions >
<RowDefinition Height="25"/> <RowDefinition Height="25"/>
<RowDefinition Height="25"/> <RowDefinition Height="25"/>
@ -88,28 +60,28 @@
<ColumnDefinition Width="100"/> <ColumnDefinition Width="100"/>
<ColumnDefinition Width="*"/> <ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions> </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}}"/> <Image Source="{Binding Image,Converter={StaticResource imageconverter}}"/>
</Frame> </Frame>
<Label 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="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 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 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="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 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 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="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 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 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="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="{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" <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}"> Text="{Binding Description}">
</Label> </Label>
<StackLayout Grid.Row="5" Orientation="Horizontal" Margin="0,0,0,12"> <StackLayout Grid.Row="5" Orientation="Horizontal" Margin="0,0,0,12">
<Label Text="&#xe700;" FontSize="16" Margin="0,2,2,2" <Label Text="&#xe763;" FontSize="16" Margin="0,2,2,2"
FontFamily='{OnPlatform Android=AccordionFontIcons.ttf#,WinUI=AccordionFontIcons.ttf#AccordionFontIcons,MacCatalyst=AccordionFontIcons,iOS=AccordionFontIcons}' FontFamily="MauiSampleFontIcon" TextColor="{AppThemeBinding Light={StaticResource TileTextColourAlt1Light}, Dark={StaticResource TileTextColourAlt1}}"
VerticalOptions="Center" VerticalTextAlignment="Center"/> 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> </StackLayout>
</Grid> </Grid>

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

@ -3,11 +3,13 @@
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:SampleBrowser.Maui.AvatarView" xmlns:local="clr-namespace:SampleBrowser.Maui.AvatarView"
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"
x:Class="SampleBrowser.Maui.AvatarView.App"> x:Class="SampleBrowser.Maui.AvatarView.App">
<Application.Resources> <Application.Resources>
<ResourceDictionary> <ResourceDictionary>
<ResourceDictionary.MergedDictionaries> <ResourceDictionary.MergedDictionaries>
<base:SampleBrowserStyles/> <base:SampleBrowserStyles/>
<syncTheme:SyncfusionThemeResourceDictionary/>
</ResourceDictionary.MergedDictionaries> </ResourceDictionary.MergedDictionaries>
</ResourceDictionary> </ResourceDictionary>
</Application.Resources> </Application.Resources>

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

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8" ?>
<SyncfusionControls> <SyncfusionControls>
<ControlCategory Name="Miscellaneous"> <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="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="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" /> <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>
<ItemGroup> <ItemGroup>
<PackageReference Include="SampleBrowser.Maui.Base" version="24.2.3" /> <PackageReference Include="SampleBrowser.Maui.Base" version="25.1.35" />
<PackageReference Include="Syncfusion.Maui.Core" version="24.2.3" /> <PackageReference Include="Syncfusion.Maui.Core" version="25.1.35" />
<PackageReference Include="Syncfusion.Maui.TabView" version="24.2.3" /> <PackageReference Include="Syncfusion.Maui.TabView" version="25.1.35" />
<PackageReference Include="Syncfusion.Maui.Buttons" version="25.1.35" />
</ItemGroup> </ItemGroup>
</Project> </Project>

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

@ -4,8 +4,10 @@
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:syncfusion="clr-namespace:Syncfusion.Maui.Core;assembly=Syncfusion.Maui.Core" xmlns:syncfusion="clr-namespace:Syncfusion.Maui.Core;assembly=Syncfusion.Maui.Core"
xmlns:localCore="clr-namespace:SampleBrowser.Maui.Base;assembly=SampleBrowser.Maui.Base" 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" 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> <localCore:SampleView.Resources>
<ResourceDictionary> <ResourceDictionary>
@ -40,7 +42,8 @@
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Label Text="{Binding TitleText}" <Label Text="{Binding TitleText}"
VerticalOptions="Start" VerticalOptions="Start"
HorizontalOptions="Start"/> HorizontalOptions="Start"
TextColor="{AppThemeBinding Light={StaticResource TextColourLight}, Dark={StaticResource TextColour}}"/>
<syncfusion:SfBadgeView x:Name="StatusBadge" Margin="0,30,0,0" <syncfusion:SfBadgeView x:Name="StatusBadge" Margin="0,30,0,0"
VerticalOptions="Center" VerticalOptions="Center"
@ -69,39 +72,58 @@
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="40"/> <RowDefinition Height="40"/>
</Grid.RowDefinitions> </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>
<Grid Margin="0,50,0,0"> <Grid Margin="0,50,0,0">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/> <ColumnDefinition Width="*"/>
<ColumnDefinition Width="40"/> <ColumnDefinition Width="40"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Label HorizontalOptions="Start" Text="Show status indicator"/> <Label HorizontalOptions="Start" Text="Show status indicator" TextColor="{AppThemeBinding Light={StaticResource TextColourLight}, Dark={StaticResource TextColour}}"/>
<CheckBox IsChecked="True" Grid.Column="1" Color="#6200EE" x:Name="StatusIndicatorCheck" HorizontalOptions="End"/> <buttons:SfCheckBox IsChecked="True" Grid.Column="1"
x:Name="StatusIndicatorCheck"
StateChanged="StatusIndicatorCheck_StateChanged"
HorizontalOptions="End"/>
</Grid> </Grid>
<Grid Margin="0,5,0,0"> <Grid Margin="0,5,0,0">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/> <ColumnDefinition Width="*"/>
<ColumnDefinition Width="40"/> <ColumnDefinition Width="40"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Label HorizontalOptions="Start" Text="Use custom picture"/> <Label HorizontalOptions="Start" Text="Use custom picture" TextColor="{AppThemeBinding Light={StaticResource TextColourLight}, Dark={StaticResource TextColour}}"/>
<CheckBox HorizontalOptions="End" Grid.Column="1" Color="#6200EE" IsChecked="{Binding UseCustomAvatar}"/> <buttons:SfCheckBox HorizontalOptions="End" Grid.Column="1"
IsChecked="{Binding UseCustomAvatar}"/>
</Grid> </Grid>
<Grid Margin="0,5,0,0"> <Grid Margin="0,5,0,0">
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/> <ColumnDefinition Width="*"/>
<ColumnDefinition Width="40"/> <ColumnDefinition Width="40"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Label HorizontalOptions="Start" Text="Show double character" /> <Label HorizontalOptions="Start" Text="Show double character" TextColor="{AppThemeBinding Light={StaticResource TextColourLight}, Dark={StaticResource TextColour}}" />
<CheckBox HorizontalOptions="End" Grid.Column="1" Color="#6200EE" IsChecked="{Binding UseDoubleCharacter}"/> <buttons:SfCheckBox HorizontalOptions="End" Grid.Column="1"
IsChecked="{Binding UseDoubleCharacter}"/>
</Grid> </Grid>
<Grid Margin="0,15,0,0" IsEnabled="{Binding UseInitialAvatar}" Opacity="{Binding ColorPickerOpacity}"> <Grid Margin="0,15,0,0" IsEnabled="{Binding UseInitialAvatar}" Opacity="{Binding ColorPickerOpacity}">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="*"/> <RowDefinition Height="*"/>
<RowDefinition Height="130"/> <RowDefinition Height="130"/>
</Grid.RowDefinitions> </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'}"> <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> <BindableLayout.ItemTemplate>
<DataTemplate> <DataTemplate>

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

@ -5,11 +5,16 @@
// licensing@syncfusion.com. Any infringement will be prosecuted under // licensing@syncfusion.com. Any infringement will be prosecuted under
// applicable laws. // applicable laws.
#endregion #endregion
using Microsoft.Maui.Platform;
using SampleBrowser.Maui.Base; using SampleBrowser.Maui.Base;
using Syncfusion.Maui.Core; using Syncfusion.Maui.Core;
using System.Collections.ObjectModel; using System.Collections.ObjectModel;
#if ANDROID
using Android.Content.Res;
#endif
namespace SampleBrowser.Maui.AvatarView.SfAvatarView; namespace SampleBrowser.Maui.AvatarView.SfAvatarView;
public partial class AvatarViewGettingStarted : SampleView public partial class AvatarViewGettingStarted : SampleView
{ {
@ -305,7 +310,6 @@ public partial class AvatarViewGettingStarted : SampleView
public AvatarViewGettingStarted() public AvatarViewGettingStarted()
{ {
InitializeComponent(); InitializeComponent();
this.StatusIndicatorCheck.CheckedChanged += StatusIndicatorSwitch_Toggled;
PopulateColorCollection(); PopulateColorCollection();
@ -315,19 +319,15 @@ public partial class AvatarViewGettingStarted : SampleView
this.BindingContext = this; 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; this.StatusBadge.BadgeSettings!.Icon = BadgeIcon.Available;
} }
else else {
{ this.StatusBadge.BadgeSettings!.Icon = BadgeIcon.None;
this.StatusBadge.BadgeSettings!.Type = BadgeType.None;
this.StatusBadge.BadgeSettings.Icon = BadgeIcon.None;
} }
} }
private void SetAvatarName() private void SetAvatarName()
{ {
if (tappedAvatar == null) if (tappedAvatar == null)
@ -437,7 +437,6 @@ public partial class AvatarViewGettingStarted : SampleView
{ {
item.InitialsColor = Colors.Transparent; item.InitialsColor = Colors.Transparent;
item.Stroke = Color.FromArgb("#9E9E9E"); item.Stroke = Color.FromArgb("#9E9E9E");
item.StrokeThickness = 1;
} }
tappedAvatar.Stroke = Color.FromArgb("#6200EE"); 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" x:Class="SampleBrowser.Maui.AvatarView.SfAvatarView.GroupView"
xmlns:localCore="clr-namespace:SampleBrowser.Maui.Base;assembly=SampleBrowser.Maui.Base" xmlns:localCore="clr-namespace:SampleBrowser.Maui.Base;assembly=SampleBrowser.Maui.Base"
xmlns:imageExtension="clr-namespace:SampleBrowser.Maui.Base.Converters;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> <localCore:SampleView.Content>
<Grid> <Grid>
<Grid Margin="10"> <Grid Margin="10">
<ListView ItemsSource="{Binding GroupCollection}" RowHeight="60" <ListView ItemsSource="{Binding GroupCollection}" RowHeight="60"
SelectionMode="None"> SelectionMode="None" BackgroundColor="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}">
<ListView.ItemTemplate> <ListView.ItemTemplate>
<DataTemplate> <DataTemplate>
<ViewCell> <ViewCell>
@ -30,7 +30,7 @@
ImageSourceMemberPath="Image" ImageSourceMemberPath="Image"
BackgroundColorMemberPath="Backgroundcolor" BackgroundColorMemberPath="Backgroundcolor"
InitialsMemberPath="Name"/> InitialsMemberPath="Name"/>
<Grid Grid.Column="1" VerticalOptions="Center"> <Grid Grid.Column="1" Margin="12,0,0,0" VerticalOptions="Center">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/>
@ -39,13 +39,13 @@
VerticalOptions="Center" VerticalOptions="Center"
VerticalTextAlignment="Center" VerticalTextAlignment="Center"
FontSize="14" FontSize="14"
TextColor="Black"/> TextColor="{AppThemeBinding Light={StaticResource TileTextColourLight}, Dark={StaticResource TileTextColour}}"/>
<Label Grid.Row="1" <Label Grid.Row="1"
Text="{Binding TotalParticipants}" Text="{Binding TotalParticipants}"
VerticalOptions="Center" VerticalOptions="Center"
VerticalTextAlignment="Center" VerticalTextAlignment="Center"
FontSize="11" FontSize="11"
TextColor="Gray"/> TextColor="{AppThemeBinding Light={StaticResource TileTextColourAlt1Light}, Dark={StaticResource TileTextColourAlt1}}"/>
</Grid> </Grid>
</Grid> </Grid>
</ViewCell> </ViewCell>

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

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

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

@ -3,12 +3,14 @@
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:SampleBrowser.Maui.Backdrop" xmlns:local="clr-namespace:SampleBrowser.Maui.Backdrop"
x:Class="SampleBrowser.Maui.Backdrop.App" 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> <Application.Resources>
<ResourceDictionary> <ResourceDictionary>
<ResourceDictionary.MergedDictionaries> <ResourceDictionary.MergedDictionaries>
<base:SampleBrowserStyles/> <base:SampleBrowserStyles/>
<syncTheme:SyncfusionThemeResourceDictionary />
</ResourceDictionary.MergedDictionaries> </ResourceDictionary.MergedDictionaries>
</ResourceDictionary> </ResourceDictionary>
</Application.Resources> </Application.Resources>

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

@ -2,7 +2,7 @@
<SyncfusionControls> <SyncfusionControls>
<ControlCategory Name="Layouts" > <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"/> <Sample SampleName="InitialPage" Title="Features" CodeViewerPath="Backdrop/" VideoLink="https://www.youtube.com/watch?v=99VGii8CFmw"/>
</Control> </Control>
</ControlCategory> </ControlCategory>

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

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

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

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

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

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

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

@ -11,7 +11,7 @@ namespace SampleBrowser.Maui.Backdrop.SfBackdropPage;
public partial class InitialPage : SampleView public partial class InitialPage : SampleView
{ {
public InitialPage() public InitialPage()
{ {
InitializeComponent(); InitializeComponent();
} }
@ -23,8 +23,8 @@ public partial class InitialPage : SampleView
var page = Application.Current.MainPage as NavigationPage; var page = Application.Current.MainPage as NavigationPage;
if (page != null) if (page != null)
{ {
page.BarBackgroundColor = Color.FromArgb("#6200EE"); page.BarBackgroundColor = Application.Current.RequestedTheme == AppTheme.Light ? Color.FromArgb("#6750A4") : Color.FromArgb("#D0BCFF");
page.BarTextColor = Colors.White; 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:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:SampleBrowser.Maui.BadgeView" xmlns:local="clr-namespace:SampleBrowser.Maui.BadgeView"
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"
x:Class="SampleBrowser.Maui.BadgeView.App"> x:Class="SampleBrowser.Maui.BadgeView.App">
<Application.Resources> <Application.Resources>
<ResourceDictionary> <ResourceDictionary>
<ResourceDictionary.MergedDictionaries> <ResourceDictionary.MergedDictionaries>
<base:SampleBrowserStyles/> <base:SampleBrowserStyles/>
<syncTheme:SyncfusionThemeResourceDictionary/>
</ResourceDictionary.MergedDictionaries> </ResourceDictionary.MergedDictionaries>
</ResourceDictionary> </ResourceDictionary>
</Application.Resources> </Application.Resources>

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

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?> <?xml version="1.0" encoding="utf-8" ?>
<SyncfusionControls> <SyncfusionControls>
<ControlCategory Name="Notification"> <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"> <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="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" /> <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>
<ItemGroup> <ItemGroup>
<PackageReference Include="SampleBrowser.Maui.Base" version="24.2.3" /> <PackageReference Include="SampleBrowser.Maui.Base" version="25.1.35" />
<PackageReference Include="Syncfusion.Maui.Core" version="24.2.3" /> <PackageReference Include="Syncfusion.Maui.Core" version="25.1.35" />
<PackageReference Include="Syncfusion.Maui.TabView" version="24.2.3" /> <PackageReference Include="Syncfusion.Maui.TabView" version="25.1.35" />
<PackageReference Include="Syncfusion.Maui.Buttons" version="25.1.35" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -3,11 +3,13 @@
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:SampleBrowser.Maui.Barcode" xmlns:local="clr-namespace:SampleBrowser.Maui.Barcode"
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"
x:Class="SampleBrowser.Maui.Barcode.App"> x:Class="SampleBrowser.Maui.Barcode.App">
<Application.Resources> <Application.Resources>
<ResourceDictionary> <ResourceDictionary>
<ResourceDictionary.MergedDictionaries> <ResourceDictionary.MergedDictionaries>
<base:SampleBrowserStyles/> <base:SampleBrowserStyles/>
<syncTheme:SyncfusionThemeResourceDictionary />
</ResourceDictionary.MergedDictionaries> </ResourceDictionary.MergedDictionaries>
</ResourceDictionary> </ResourceDictionary>
</Application.Resources> </Application.Resources>

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -3,11 +3,13 @@
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:SampleBrowser.Maui.BulletChart" xmlns:local="clr-namespace:SampleBrowser.Maui.BulletChart"
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"
x:Class="SampleBrowser.Maui.BulletChart.App"> x:Class="SampleBrowser.Maui.BulletChart.App">
<Application.Resources> <Application.Resources>
<ResourceDictionary> <ResourceDictionary>
<ResourceDictionary.MergedDictionaries> <ResourceDictionary.MergedDictionaries>
<base:SampleBrowserStyles /> <base:SampleBrowserStyles />
<syncTheme:SyncfusionThemeResourceDictionary/>
</ResourceDictionary.MergedDictionaries> </ResourceDictionary.MergedDictionaries>
</ResourceDictionary> </ResourceDictionary>
</Application.Resources> </Application.Resources>

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

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

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

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

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

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

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

@ -3,11 +3,13 @@
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:SampleBrowser.Maui.BusyIndicator" xmlns:local="clr-namespace:SampleBrowser.Maui.BusyIndicator"
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"
x:Class="SampleBrowser.Maui.BusyIndicator.App"> x:Class="SampleBrowser.Maui.BusyIndicator.App">
<Application.Resources> <Application.Resources>
<ResourceDictionary> <ResourceDictionary>
<ResourceDictionary.MergedDictionaries> <ResourceDictionary.MergedDictionaries>
<base:SampleBrowserStyles/> <base:SampleBrowserStyles/>
<syncTheme:SyncfusionThemeResourceDictionary/>
</ResourceDictionary.MergedDictionaries> </ResourceDictionary.MergedDictionaries>
</ResourceDictionary> </ResourceDictionary>
</Application.Resources> </Application.Resources>

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

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

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

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

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

@ -6,12 +6,12 @@
xmlns:localCore="clr-namespace:SampleBrowser.Maui.Base;assembly=SampleBrowser.Maui.Base" xmlns:localCore="clr-namespace:SampleBrowser.Maui.Base;assembly=SampleBrowser.Maui.Base"
xmlns:imageExtension="clr-namespace:SampleBrowser.Maui.Base.Converters;assembly=SampleBrowser.Maui.Base" xmlns:imageExtension="clr-namespace:SampleBrowser.Maui.Base.Converters;assembly=SampleBrowser.Maui.Base"
xmlns:local="clr-namespace:SampleBrowser.Maui.BusyIndicator.SfBusyIndicator" xmlns:local="clr-namespace:SampleBrowser.Maui.BusyIndicator.SfBusyIndicator"
BackgroundColor="White"> BackgroundColor="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}">
<localCore:SampleView.Content> <localCore:SampleView.Content>
<Grid HeightRequest="300" WidthRequest="300" RowDefinitions="*,50,20"> <Grid HeightRequest="300" WidthRequest="300" RowDefinitions="*,50,20">
<core:SfBusyIndicator x:Name="busyIndicator" IsRunning="True" /> <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" /> <Label Text="Size" VerticalOptions="Center" HorizontalOptions="Center" Grid.Row="2" />
</Grid> </Grid>
</localCore:SampleView.Content> </localCore:SampleView.Content>

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

@ -6,12 +6,12 @@
xmlns:localCore="clr-namespace:SampleBrowser.Maui.Base;assembly=SampleBrowser.Maui.Base" xmlns:localCore="clr-namespace:SampleBrowser.Maui.Base;assembly=SampleBrowser.Maui.Base"
xmlns:imageExtension="clr-namespace:SampleBrowser.Maui.Base.Converters;assembly=SampleBrowser.Maui.Base" xmlns:imageExtension="clr-namespace:SampleBrowser.Maui.Base.Converters;assembly=SampleBrowser.Maui.Base"
xmlns:local="clr-namespace:SampleBrowser.Maui.BusyIndicator.SfBusyIndicator" xmlns:local="clr-namespace:SampleBrowser.Maui.BusyIndicator.SfBusyIndicator"
BackgroundColor="White"> BackgroundColor="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}">
<localCore:SampleView.Content> <localCore:SampleView.Content>
<Grid HeightRequest="300" WidthRequest="300" RowDefinitions="*,50,20"> <Grid HeightRequest="300" WidthRequest="300" RowDefinitions="*,50,20">
<core:SfBusyIndicator x:Name="busyIndicator" IsRunning="True" /> <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"/> <Label Text="Speed" VerticalOptions="Center" HorizontalOptions="Center" Grid.Row="2"/>
</Grid> </Grid>
</localCore:SampleView.Content> </localCore:SampleView.Content>

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

@ -4,30 +4,33 @@
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:core="clr-namespace:Syncfusion.Maui.Core;assembly=Syncfusion.Maui.Core" xmlns:core="clr-namespace:Syncfusion.Maui.Core;assembly=Syncfusion.Maui.Core"
xmlns:localCore="clr-namespace:SampleBrowser.Maui.Base;assembly=SampleBrowser.Maui.Base" 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" xmlns:local="clr-namespace:SampleBrowser.Maui.BusyIndicator.SfBusyIndicator"
BackgroundColor="White"> BackgroundColor="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}">
<localCore:SampleView.Content> <localCore:SampleView.Content>
<Grid HeightRequest="400" WidthRequest="320" RowDefinitions="*,220" > <Grid HeightRequest="400" WidthRequest="320" RowDefinitions="*,220" >
<core:SfBusyIndicator x:Name="busyIndicator" IsRunning="True" Title="Searching..."/> <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" Background="#EAEAEA" > <Grid Grid.Row="1" RowDefinitions="50,50,50,50" Padding="15,10,15,15" BackgroundColor="Transparent" >
<Grid ColumnDefinitions="Auto,*" > <Grid ColumnDefinitions="Auto,*" >
<Label Text="Font Size" VerticalOptions="Center" VerticalTextAlignment="Center"/> <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>
<Grid ColumnDefinitions="*,*,*" Grid.Row="1" > <buttons:SfRadioGroup x:Name="fontAttribute" Orientation="Horizontal" CheckedChanged="RadioButton_CheckedChanged" Spacing="15" Grid.Row="1">
<RadioButton GroupName="FontAttribute" BackgroundColor="#EAEAEA" Content=" None" VerticalOptions="Center" IsChecked="True" CheckedChanged="RadioButton_CheckedChanged"/> <buttons:SfRadioButton Text="None" IsChecked="True"/>
<RadioButton Grid.Column="1" BackgroundColor="#EAEAEA" GroupName="FontAttribute" Content=" Bold" VerticalOptions="Center" CheckedChanged="RadioButton_CheckedChanged_1"/> <buttons:SfRadioButton Text="Bold"/>
<RadioButton Grid.Column="2" BackgroundColor="#EAEAEA" GroupName="FontAttribute" Content=" Italic" VerticalOptions="Center" CheckedChanged="RadioButton_CheckedChanged_2"/> <buttons:SfRadioButton Text="Italic"/>
</Grid> </buttons:SfRadioGroup>
<Grid ColumnDefinitions="Auto,*,*" Grid.Row="2" > <Grid ColumnDefinitions="Auto,*" Grid.Row="2" >
<Label Text="Title Placement" VerticalOptions="Center" VerticalTextAlignment="Center"/> <Label Text="Title Placement" VerticalOptions="Center" VerticalTextAlignment="Center"/>
<RadioButton Grid.Column="1" BackgroundColor="#EAEAEA" VerticalOptions="Center" GroupName="TitlePosition" Content=" Top" CheckedChanged="RadioButton_CheckedChanged_3"/> <buttons:SfRadioGroup x:Name="titlePosition" Orientation="Horizontal" CheckedChanged="RadioButton_CheckedChanged_1" Spacing="15" Grid.Column="1">
<RadioButton Grid.Column="2" BackgroundColor="#EAEAEA" VerticalOptions="Center" GroupName="TitlePosition" Content=" Bottom" IsChecked="True" CheckedChanged="RadioButton_CheckedChanged_4"/> <buttons:SfRadioButton Text="Top"/>
<buttons:SfRadioButton Text="Bottom" IsChecked="True"/>
</buttons:SfRadioGroup>
</Grid> </Grid>
<Grid Grid.Row="3" ColumnDefinitions="Auto,*" > <Grid Grid.Row="3" ColumnDefinitions="Auto,*" >
<Label Text="Title Spacing" VerticalOptions="Center" VerticalTextAlignment="Center"/> <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> </Grid>
</Grid> </Grid>

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

@ -29,35 +29,46 @@ namespace SampleBrowser.Maui.BusyIndicator.SfBusyIndicator
this.busyIndicator.FontSize = e.NewValue * 10; 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) private void Slider_ValueChanged_1(object sender, ValueChangedEventArgs e)
{ {
this.busyIndicator.TitleSpacing = e.NewValue * 10; 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 Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17 # Visual Studio Version 17
VisualStudioVersion = 17.0.31611.283 VisualStudioVersion = 17.0.31611.283

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

@ -4,12 +4,14 @@
xmlns="http://schemas.microsoft.com/dotnet/2021/maui" xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
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"
xmlns:local="clr-namespace:SampleBrowser.Maui.Buttons"> xmlns:local="clr-namespace:SampleBrowser.Maui.Buttons">
<Application.Resources> <Application.Resources>
<ResourceDictionary> <ResourceDictionary>
<ResourceDictionary.MergedDictionaries> <ResourceDictionary.MergedDictionaries>
<base:SampleBrowserStyles /> <base:SampleBrowserStyles />
<syncTheme:SyncfusionThemeResourceDictionary/>
</ResourceDictionary.MergedDictionaries> </ResourceDictionary.MergedDictionaries>
</ResourceDictionary> </ResourceDictionary>
</Application.Resources> </Application.Resources>

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

@ -35,19 +35,15 @@
<Control ControlName="Switch" <Control ControlName="Switch"
Title="Switch" Title="Switch"
Image="switch.png" Image="switch.png"
StatusTag="New" Description=" The switch allows toggling items with an optional indeterminate state." >
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." >
<Sample SampleName="GettingStarted" <Sample SampleName="GettingStarted"
Title="Getting Started" Title="Getting Started"
SearchTags="switch, threestate, button" SearchTags="switch, threestate, button"
StatusTag="New"
CodeViewerPath="Switch/GettingStarted/" CodeViewerPath="Switch/GettingStarted/"
VideoLink=""/> VideoLink=""/>
<Sample SampleName="Features" <Sample SampleName="Features"
Title="Features" Title="Features"
SearchTags="switch, threestate, button, switchfeatures" SearchTags="switch, threestate, button, switchfeatures"
StatusTag="New"
CodeViewerPath="Switch/Features/" CodeViewerPath="Switch/Features/"
VideoLink=""/> VideoLink=""/>
</Control> </Control>
@ -55,7 +51,7 @@
<Control ControlName="CheckBox" <Control ControlName="CheckBox"
Title="CheckBox" Title="CheckBox"
Image="checkbox.png" 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" <Sample SampleName="GettingStarted"
Title="Getting Started" Title="Getting Started"
SearchTags="checkbox, selection, threestates" SearchTags="checkbox, selection, threestates"
@ -71,7 +67,7 @@
<Control ControlName="RadioButton" <Control ControlName="RadioButton"
Title="Radio Button" Title="Radio Button"
Image="radiobutton.png" 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" <Sample SampleName="GettingStarted"
Title="Getting Started" Title="Getting Started"
SearchTags="radiobutton, twostate, button" SearchTags="radiobutton, twostate, button"

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

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

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

@ -8,30 +8,32 @@
xmlns:button="clr-namespace:Syncfusion.Maui.Buttons;assembly=Syncfusion.Maui.Buttons" xmlns:button="clr-namespace:Syncfusion.Maui.Buttons;assembly=Syncfusion.Maui.Buttons"
xmlns:sliders="clr-namespace:Syncfusion.Maui.Sliders;assembly=Syncfusion.Maui.Sliders" xmlns:sliders="clr-namespace:Syncfusion.Maui.Sliders;assembly=Syncfusion.Maui.Sliders"
xmlns:local="clr-namespace:SampleBrowser.Maui.Buttons.Button" xmlns:local="clr-namespace:SampleBrowser.Maui.Buttons.Button"
BackgroundColor="White" BackgroundColor="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}"
WidthRequest="380"> WidthRequest="400">
<localCore:SampleView.Resources> <localCore:SampleView.Resources>
<Style x:Key="CheckBoxNormalStyle" TargetType="button:SfCheckBox"> <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="CheckedColor" Value="#6200EE"/>
<Setter Property="FontFamily" Value="Roboto-Regular"/> <Setter Property="FontFamily" Value="Roboto-Regular"/>
</Style> </Style>
<Style x:Key="EntryNormalStyle" TargetType="Entry"> <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"/> <Setter Property="FontFamily" Value="Roboto-Regular"/>
</Style> </Style>
</localCore:SampleView.Resources> </localCore:SampleView.Resources>
<localCore:SampleView.Content> <localCore:SampleView.Content>
<Grid WidthRequest="380" HorizontalOptions="Center">
<Grid WidthRequest="380" HorizontalOptions="Center">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="150"/> <RowDefinition Height="150"/>
<RowDefinition Height="*"/> <RowDefinition Height="*"/>
</Grid.RowDefinitions> </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> <Grid>
<button:SfButton x:Name="cartButton" <button:SfButton x:Name="cartButton"
Background="#6200EE" Background="#6200EE"
StrokeThickness="{Binding BorderWidth}" StrokeThickness="{Binding BorderWidth}"
WidthRequest="150" WidthRequest="150"
@ -41,12 +43,12 @@
CornerRadius="{Binding CornerRadius,Mode=TwoWay}"> CornerRadius="{Binding CornerRadius,Mode=TwoWay}">
<button:SfButton.Content> <button:SfButton.Content>
<DataTemplate> <DataTemplate>
<Grid HorizontalOptions="Center" VerticalOptions="Center"> <Grid HorizontalOptions="Center" VerticalOptions="Center" >
<Grid.ColumnDefinitions> <Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/> <ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/> <ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<Grid Padding="5,0,5,0"> <Grid Padding="5,0,5,0" >
<Label Text="&#xE7BF;" <Label Text="&#xE7BF;"
HorizontalTextAlignment="Center" HorizontalTextAlignment="Center"
VerticalOptions="Center" VerticalOptions="Center"
@ -74,8 +76,8 @@
</button:SfButton> </button:SfButton>
</Grid> </Grid>
</Border> </Border>
<Border Grid.Row="1" Margin="5,0,5,10" BackgroundColor="#f6f6f8" Stroke="Gray" StrokeShape="RoundRectangle 10" StrokeThickness="0.3"> <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> <Grid>
<ScrollView VerticalScrollBarVisibility="Never"> <ScrollView VerticalScrollBarVisibility="Never">
<StackLayout HorizontalOptions="Center" VerticalOptions="Start"> <StackLayout HorizontalOptions="Center" VerticalOptions="Start">
<Core:SfTextInputLayout ContainerType="Outlined" Hint="Text" Margin="10,5,15,0"> <Core:SfTextInputLayout ContainerType="Outlined" Hint="Text" Margin="10,5,15,0">
@ -85,14 +87,11 @@
</Core:SfTextInputLayout> </Core:SfTextInputLayout>
<tabView:SfTabView <tabView:SfTabView
Margin="15,0" Margin="15,0"
IndicatorBackground="#c6c6c6"
TabBarBackground="White"
HorizontalOptions="Start" HorizontalOptions="Start"
VerticalOptions="Center" VerticalOptions="Center"
HeightRequest="130"> HeightRequest="130">
<tabView:SfTabItem Header="Text Color" <tabView:SfTabItem Header="Text Color"
FontFamily="Roboto-Regular" FontFamily="Roboto-Regular" >
HeightRequest="40">
<tabView:SfTabItem.FontSize> <tabView:SfTabItem.FontSize>
<OnPlatform x:TypeArguments="x:Double"> <OnPlatform x:TypeArguments="x:Double">
<On Platform="WinUI" Value ="12"/> <On Platform="WinUI" Value ="12"/>
@ -141,7 +140,7 @@
</StackLayout> </StackLayout>
</tabView:SfTabItem.Content> </tabView:SfTabItem.Content>
</tabView:SfTabItem> </tabView:SfTabItem>
<tabView:SfTabItem Header="Background" FontFamily="Roboto-Regular" HeightRequest="40"> <tabView:SfTabItem Header="Background" FontFamily="Roboto-Regular">
<tabView:SfTabItem.FontSize> <tabView:SfTabItem.FontSize>
<OnPlatform x:TypeArguments="x:Double"> <OnPlatform x:TypeArguments="x:Double">
<On Platform="WinUI" Value ="12"/> <On Platform="WinUI" Value ="12"/>
@ -190,7 +189,7 @@
</StackLayout> </StackLayout>
</tabView:SfTabItem.Content> </tabView:SfTabItem.Content>
</tabView:SfTabItem> </tabView:SfTabItem>
<tabView:SfTabItem Header="Border Color" FontFamily="Roboto-Regular" HeightRequest="40"> <tabView:SfTabItem Header="Border Color" FontFamily="Roboto-Regular">
<tabView:SfTabItem.FontSize> <tabView:SfTabItem.FontSize>
<OnPlatform x:TypeArguments="x:Double"> <OnPlatform x:TypeArguments="x:Double">
<On Platform="WinUI" Value ="12"/> <On Platform="WinUI" Value ="12"/>

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

@ -8,15 +8,15 @@
xmlns:button="clr-namespace:Syncfusion.Maui.Buttons;assembly=Syncfusion.Maui.Buttons" xmlns:button="clr-namespace:Syncfusion.Maui.Buttons;assembly=Syncfusion.Maui.Buttons"
xmlns:sliders="clr-namespace:Syncfusion.Maui.Sliders;assembly=Syncfusion.Maui.Sliders" xmlns:sliders="clr-namespace:Syncfusion.Maui.Sliders;assembly=Syncfusion.Maui.Sliders"
xmlns:local="clr-namespace:SampleBrowser.Maui.Buttons.Button" xmlns:local="clr-namespace:SampleBrowser.Maui.Buttons.Button"
BackgroundColor="White"> BackgroundColor="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}">
<localCore:SampleView.Resources> <localCore:SampleView.Resources>
<Style x:Key="CheckBoxNormalStyle" TargetType="button:SfCheckBox"> <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"/> <Setter Property="FontSize" Value="14"/>
</Style> </Style>
<Style x:Key="EntryNormalStyle" TargetType="Entry"> <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"/> <Setter Property="FontSize" Value="15"/>
</Style> </Style>
</localCore:SampleView.Resources> </localCore:SampleView.Resources>
@ -72,12 +72,12 @@
</button:SfButton> </button:SfButton>
<Grid Grid.Row="1" Margin="18,0,11,5"> <Grid Grid.Row="1" Margin="18,0,11,5">
<ScrollView> <ScrollView HorizontalScrollBarVisibility="Never" VerticalScrollBarVisibility="Never">
<StackLayout> <StackLayout>
<Label Text="Options" Margin="2,0,0,0" FontFamily="Roboto-Medium" FontSize="16"/> <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"> Hint="Text">
<Entry TextColor="#212121" FontFamily="Roboto-Regular" <Entry TextColor="{AppThemeBinding Light={StaticResource TextColourLight}, Dark={StaticResource TextColour}}"
Style="{StaticResource EntryNormalStyle}" Style="{StaticResource EntryNormalStyle}"
Text="{Binding Text,Mode=TwoWay}" /> Text="{Binding Text,Mode=TwoWay}" />
</Core:SfTextInputLayout> </Core:SfTextInputLayout>
@ -86,7 +86,7 @@
HorizontalOptions="Center" HorizontalOptions="Center"
VerticalOptions="Center" VerticalOptions="Center"
HeightRequest="130"> HeightRequest="130">
<tabView:SfTabItem Header="Text Color" FontFamily="Roboto-Regular" HeightRequest="40" > <tabView:SfTabItem Header="Text Color" FontFamily="Roboto-Regular" >
<tabView:SfTabItem.FontSize> <tabView:SfTabItem.FontSize>
<OnPlatform x:TypeArguments="x:Double"> <OnPlatform x:TypeArguments="x:Double">
<On Platform="Android" Value ="12"/> <On Platform="Android" Value ="12"/>
@ -135,7 +135,7 @@
</StackLayout> </StackLayout>
</tabView:SfTabItem.Content> </tabView:SfTabItem.Content>
</tabView:SfTabItem> </tabView:SfTabItem>
<tabView:SfTabItem Header="Background" FontFamily="Roboto-Regular" HeightRequest="40"> <tabView:SfTabItem Header="Background" FontFamily="Roboto-Regular" >
<tabView:SfTabItem.FontSize> <tabView:SfTabItem.FontSize>
<OnPlatform x:TypeArguments="x:Double"> <OnPlatform x:TypeArguments="x:Double">
<On Platform="Android" Value ="12"/> <On Platform="Android" Value ="12"/>
@ -184,7 +184,7 @@
</StackLayout> </StackLayout>
</tabView:SfTabItem.Content> </tabView:SfTabItem.Content>
</tabView:SfTabItem> </tabView:SfTabItem>
<tabView:SfTabItem Header="Border Color" FontFamily="Roboto-Regular" HeightRequest="40"> <tabView:SfTabItem Header="Border Color" FontFamily="Roboto-Regular">
<tabView:SfTabItem.FontSize> <tabView:SfTabItem.FontSize>
<OnPlatform x:TypeArguments="x:Double"> <OnPlatform x:TypeArguments="x:Double">
<On Platform="Android" Value ="12"/> <On Platform="Android" Value ="12"/>

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

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

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

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

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

@ -8,7 +8,7 @@
xmlns:button="clr-namespace:Syncfusion.Maui.Buttons;assembly=Syncfusion.Maui.Buttons" xmlns:button="clr-namespace:Syncfusion.Maui.Buttons;assembly=Syncfusion.Maui.Buttons"
xmlns:sliders="clr-namespace:Syncfusion.Maui.Sliders;assembly=Syncfusion.Maui.Sliders" xmlns:sliders="clr-namespace:Syncfusion.Maui.Sliders;assembly=Syncfusion.Maui.Sliders"
xmlns:local="clr-namespace:SampleBrowser.Maui.Buttons.CheckBox" xmlns:local="clr-namespace:SampleBrowser.Maui.Buttons.CheckBox"
BackgroundColor="White" BackgroundColor="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}"
Padding="0" Padding="0"
WidthRequest="400"> WidthRequest="400">
@ -16,12 +16,23 @@
<localCore:SampleView.Resources> <localCore:SampleView.Resources>
<Style x:Key="CheckBoxNormalStyle" TargetType="button:SfCheckBox"> <Style x:Key="CheckBoxNormalStyle" TargetType="button:SfCheckBox">
<Setter Property="TextColor" Value="Black"/>
<Setter Property="CheckedColor" Value="#6200EE"/> <Setter Property="CheckedColor" Value="#6200EE"/>
<Setter Property="FontFamily" Value="Roboto-Regular"/> <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>
<Style x:Key="EntryNormalStyle" TargetType="Entry"> <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="FontSize" Value="15"/>
<Setter Property="FontFamily" Value="Roboto-Regular"/> <Setter Property="FontFamily" Value="Roboto-Regular"/>
</Style> </Style>
@ -34,7 +45,7 @@
<RowDefinition Height="*"/> <RowDefinition Height="*"/>
</Grid.RowDefinitions> </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" <button:SfCheckBox x:Name="checkBox"
WidthRequest="150" WidthRequest="150"
HeightRequest="50" HeightRequest="50"
@ -44,11 +55,10 @@
Text="{Binding Text}" Text="{Binding Text}"
HorizontalOptions="Center" HorizontalOptions="Center"
HorizontalTextAlignment="Start" HorizontalTextAlignment="Start"
Style="{StaticResource CheckBoxNormalStyle}"
CornerRadius="{Binding CornerRadius,Mode=TwoWay}"> CornerRadius="{Binding CornerRadius,Mode=TwoWay}">
</button:SfCheckBox> </button:SfCheckBox>
</Border> </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> <Grid>
<ScrollView VerticalScrollBarVisibility="Never"> <ScrollView VerticalScrollBarVisibility="Never">
<StackLayout HorizontalOptions="Center" VerticalOptions="Start"> <StackLayout HorizontalOptions="Center" VerticalOptions="Start">
@ -60,15 +70,12 @@
<tabView:SfTabView <tabView:SfTabView
IndicatorBackground="#c6c6c6"
Margin="5,0" Margin="5,0"
TabBarBackground="White"
HorizontalOptions="Start" HorizontalOptions="Start"
VerticalOptions="Center" VerticalOptions="Center"
HeightRequest="130"> HeightRequest="130">
<tabView:SfTabItem Header="Text Color" <tabView:SfTabItem Header="Text Color"
FontFamily="Roboto-Regular" FontFamily="Roboto-Regular">
HeightRequest="40">
<tabView:SfTabItem.FontSize> <tabView:SfTabItem.FontSize>
<OnPlatform x:TypeArguments="x:Double"> <OnPlatform x:TypeArguments="x:Double">
<On Platform="WinUI" Value ="12"/> <On Platform="WinUI" Value ="12"/>
@ -117,7 +124,7 @@
</StackLayout> </StackLayout>
</tabView:SfTabItem.Content> </tabView:SfTabItem.Content>
</tabView:SfTabItem> </tabView:SfTabItem>
<tabView:SfTabItem Header="Checked Color" FontFamily="Roboto-Regular" HeightRequest="40"> <tabView:SfTabItem Header="Checked Color" FontFamily="Roboto-Regular">
<tabView:SfTabItem.FontSize> <tabView:SfTabItem.FontSize>
<OnPlatform x:TypeArguments="x:Double"> <OnPlatform x:TypeArguments="x:Double">
<On Platform="WinUI" Value ="12"/> <On Platform="WinUI" Value ="12"/>
@ -166,7 +173,7 @@
</StackLayout> </StackLayout>
</tabView:SfTabItem.Content> </tabView:SfTabItem.Content>
</tabView:SfTabItem> </tabView:SfTabItem>
<tabView:SfTabItem Header="Unchecked Color" FontFamily="Roboto-Regular" HeightRequest="40"> <tabView:SfTabItem Header="Unchecked Color" FontFamily="Roboto-Regular">
<tabView:SfTabItem.FontSize> <tabView:SfTabItem.FontSize>
<OnPlatform x:TypeArguments="x:Double"> <OnPlatform x:TypeArguments="x:Double">
<On Platform="WinUI" Value ="12"/> <On Platform="WinUI" Value ="12"/>
@ -228,10 +235,10 @@
VerticalOptions="CenterAndExpand" VerticalOptions="CenterAndExpand"
Minimum="0" Minimum="0"
Maximum="10" Maximum="10"
MaximumTrackColor="#E0E0E0" MaximumTrackColor="{AppThemeBinding Light=#E0E0E0, Dark=#404040}"
MinimumTrackColor="#6200EE" MinimumTrackColor="{AppThemeBinding Light=#4285F4, Dark=White}"
Value="{Binding Radius,Mode=TwoWay}" ThumbColor="{AppThemeBinding Light=#4285F4, Dark=White}"
ThumbColor="#6200EE"> Value="{Binding Radius,Mode=TwoWay}" >
<Slider.Margin> <Slider.Margin>
<OnPlatform x:TypeArguments="Thickness"> <OnPlatform x:TypeArguments="Thickness">
<On Platform="WinUI" Value="0,15,0,0"/> <On Platform="WinUI" Value="0,15,0,0"/>

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

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

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

@ -8,15 +8,25 @@
xmlns:button="clr-namespace:Syncfusion.Maui.Buttons;assembly=Syncfusion.Maui.Buttons" xmlns:button="clr-namespace:Syncfusion.Maui.Buttons;assembly=Syncfusion.Maui.Buttons"
xmlns:sliders="clr-namespace:Syncfusion.Maui.Sliders;assembly=Syncfusion.Maui.Sliders" xmlns:sliders="clr-namespace:Syncfusion.Maui.Sliders;assembly=Syncfusion.Maui.Sliders"
xmlns:local="clr-namespace:SampleBrowser.Maui.Buttons.CheckBox" xmlns:local="clr-namespace:SampleBrowser.Maui.Buttons.CheckBox"
BackgroundColor="White"> BackgroundColor="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}">
<localCore:SampleView.Resources> <localCore:SampleView.Resources>
<Style x:Key="CheckBoxNormalStyle" TargetType="button:SfCheckBox"> <Style x:Key="CheckBoxNormalStyle" TargetType="button:SfCheckBox">
<Setter Property="TextColor" Value="Black"/>
<Setter Property="FontSize" Value="14"/> <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>
<Style x:Key="EntryNormalStyle" TargetType="Entry"> <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="FontSize" Value="15"/>
</Style> </Style>
</localCore:SampleView.Resources> </localCore:SampleView.Resources>
@ -38,16 +48,19 @@
HorizontalTextAlignment="Start" HorizontalTextAlignment="Start"
FontSize="15" FontSize="15"
FontFamily="Roboto-Regular" FontFamily="Roboto-Regular"
Style="{StaticResource CheckBoxNormalStyle}"
CornerRadius="{Binding CornerRadius,Mode=TwoWay}"> CornerRadius="{Binding CornerRadius,Mode=TwoWay}">
</button:SfCheckBox> </button:SfCheckBox>
<Grid Grid.Row="1" Margin="8,5,5,5"> <Grid Grid.Row="1" Margin="8,5,5,5" Background="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}">
<ScrollView> <ScrollView HorizontalScrollBarVisibility="Never" VerticalScrollBarVisibility="Never" Background="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}">
<StackLayout> <StackLayout>
<Label Text="Options" FontFamily="Roboto-Medium" FontSize="16"/> <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"> 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}" Style="{StaticResource EntryNormalStyle}"
Text="{Binding Text,Mode=TwoWay}" /> Text="{Binding Text,Mode=TwoWay}" />
</Core:SfTextInputLayout> </Core:SfTextInputLayout>
@ -56,7 +69,7 @@
HorizontalOptions="Center" HorizontalOptions="Center"
VerticalOptions="Center" VerticalOptions="Center"
HeightRequest="130"> HeightRequest="130">
<tabView:SfTabItem Header="Text Color" FontFamily="Roboto-Regular" HeightRequest="40"> <tabView:SfTabItem Header="Text Color" FontFamily="Roboto-Regular">
<tabView:SfTabItem.FontSize> <tabView:SfTabItem.FontSize>
<OnPlatform x:TypeArguments="x:Double"> <OnPlatform x:TypeArguments="x:Double">
<On Platform="Android" Value ="11"/> <On Platform="Android" Value ="11"/>
@ -105,7 +118,7 @@
</StackLayout> </StackLayout>
</tabView:SfTabItem.Content> </tabView:SfTabItem.Content>
</tabView:SfTabItem> </tabView:SfTabItem>
<tabView:SfTabItem Header="Checked Color" FontFamily="Roboto-Regular" HeightRequest="40"> <tabView:SfTabItem Header="Checked Color" FontFamily="Roboto-Regular">
<tabView:SfTabItem.FontSize> <tabView:SfTabItem.FontSize>
<OnPlatform x:TypeArguments="x:Double"> <OnPlatform x:TypeArguments="x:Double">
<On Platform="Android" Value ="11"/> <On Platform="Android" Value ="11"/>
@ -154,7 +167,7 @@
</StackLayout> </StackLayout>
</tabView:SfTabItem.Content> </tabView:SfTabItem.Content>
</tabView:SfTabItem> </tabView:SfTabItem>
<tabView:SfTabItem Header="UnChecked Color" FontFamily="Roboto-Regular" HeightRequest="40"> <tabView:SfTabItem Header="UnChecked Color" FontFamily="Roboto-Regular">
<tabView:SfTabItem.FontSize> <tabView:SfTabItem.FontSize>
<OnPlatform x:TypeArguments="x:Double"> <OnPlatform x:TypeArguments="x:Double">
<On Platform="Android" Value ="11"/> <On Platform="Android" Value ="11"/>
@ -217,10 +230,10 @@
VerticalOptions="CenterAndExpand" VerticalOptions="CenterAndExpand"
Minimum="0" Minimum="0"
Maximum="10" Maximum="10"
MaximumTrackColor="#E0E0E0" MaximumTrackColor="{AppThemeBinding Light=#E0E0E0, Dark=#404040}"
MinimumTrackColor="#4285F4" MinimumTrackColor="{AppThemeBinding Light=#4285F4, Dark=White}"
Value="{Binding Radius,Mode=TwoWay}" ThumbColor="{AppThemeBinding Light=#4285F4, Dark=White}"
ThumbColor="#4285F4"> Value="{Binding Radius,Mode=TwoWay}" >
</Slider> </Slider>
<Label Text="{Binding Radius}" <Label Text="{Binding Radius}"
Grid.Column="1" Grid.Column="1"

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

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

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

@ -9,7 +9,7 @@
xmlns:listView="clr-namespace:Syncfusion.Maui.ListView;assembly=Syncfusion.Maui.ListView" xmlns:listView="clr-namespace:Syncfusion.Maui.ListView;assembly=Syncfusion.Maui.ListView"
xmlns:local="clr-namespace:SampleBrowser.Maui.Buttons.Samples.CheckBox" xmlns:local="clr-namespace:SampleBrowser.Maui.Buttons.Samples.CheckBox"
xmlns:thickness ="clr-namespace:Microsoft.Maui;assembly=Microsoft.Maui" xmlns:thickness ="clr-namespace:Microsoft.Maui;assembly=Microsoft.Maui"
BackgroundColor="White"> BackgroundColor="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}">
<localcore:SampleView.Resources> <localcore:SampleView.Resources>
<ResourceDictionary> <ResourceDictionary>
@ -31,7 +31,7 @@
<localcore:SampleView.Content> <localcore:SampleView.Content>
<Grid ColumnDefinitions="2.5*,7.5*"> <Grid ColumnDefinitions="2.5*,7.5*" BackgroundColor="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}">
<Border <Border
Grid.Column="0" Grid.Column="0"
Margin="5" Margin="5"
@ -78,7 +78,7 @@
FontSize="14" FontSize="14"
Text="COLORS" /> Text="COLORS" />
<StackLayout> <StackLayout>
<HorizontalStackLayout> <HorizontalStackLayout >
<Syncfusion:SfCheckBox x:Name="brown" HorizontalOptions="Start" BindingContext="{x:StaticResource ViewModel}" IsChecked="{Binding ColorFilterChecked1}"/> <Syncfusion:SfCheckBox x:Name="brown" HorizontalOptions="Start" BindingContext="{x:StaticResource ViewModel}" IsChecked="{Binding ColorFilterChecked1}"/>
<Border Style="{x:StaticResource ColorBorder}"> <Border Style="{x:StaticResource ColorBorder}">
<BoxView Color="SandyBrown" /> <BoxView Color="SandyBrown" />
@ -145,7 +145,7 @@
StrokeThickness="0.3" StrokeThickness="0.3"
StrokeShape="RoundRectangle 10"> 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:SfListView.ItemsLayout>
<listView:GridLayout SpanCount="3" /> <listView:GridLayout SpanCount="3" />
</listView:SfListView.ItemsLayout> </listView:SfListView.ItemsLayout>
@ -153,7 +153,7 @@
<DataTemplate> <DataTemplate>
<ViewCell> <ViewCell>
<Border <Border
BackgroundColor="White" BackgroundColor="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}"
Stroke="Gray" Stroke="Gray"
StrokeThickness="0.3" StrokeThickness="0.3"
StrokeShape="RoundRectangle 0"> StrokeShape="RoundRectangle 0">
@ -163,7 +163,7 @@
<On Platform="WinUI" Value="0,0,7,0"/> <On Platform="WinUI" Value="0,0,7,0"/>
</OnPlatform> </OnPlatform>
</Border.Margin> </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}}"/> <Image Source="{Binding Image,Converter={StaticResource imageconverter}}"/>
<Grid <Grid
RowDefinitions="1*,3*" RowDefinitions="1*,3*"

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

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

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

@ -8,7 +8,7 @@
xmlns:button="clr-namespace:Syncfusion.Maui.Buttons;assembly=Syncfusion.Maui.Buttons" xmlns:button="clr-namespace:Syncfusion.Maui.Buttons;assembly=Syncfusion.Maui.Buttons"
xmlns:sliders="clr-namespace:Syncfusion.Maui.Sliders;assembly=Syncfusion.Maui.Sliders" xmlns:sliders="clr-namespace:Syncfusion.Maui.Sliders;assembly=Syncfusion.Maui.Sliders"
xmlns:local="clr-namespace:SampleBrowser.Maui.Buttons.RadioButton" xmlns:local="clr-namespace:SampleBrowser.Maui.Buttons.RadioButton"
BackgroundColor="White" BackgroundColor="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}"
Padding="0" Padding="0"
WidthRequest="400"> WidthRequest="400">
@ -16,12 +16,23 @@
<localCore:SampleView.Resources> <localCore:SampleView.Resources>
<Style x:Key="RadiobuttonNormalStyle" TargetType="button:SfRadioButton"> <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="CheckedColor" Value="#6200EE"/>
<Setter Property="FontFamily" Value="Roboto-Regular"/> <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>
<Style x:Key="EntryNormalStyle" TargetType="Entry"> <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="FontSize" Value="15"/>
<Setter Property="FontFamily" Value="Roboto-Regular"/> <Setter Property="FontFamily" Value="Roboto-Regular"/>
</Style> </Style>
@ -34,7 +45,7 @@
<RowDefinition Height="*"/> <RowDefinition Height="*"/>
</Grid.RowDefinitions> </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" <button:SfRadioButton Grid.Row="0" x:Name="radiobutton"
WidthRequest="150" WidthRequest="150"
HeightRequest="50" HeightRequest="50"
@ -47,7 +58,7 @@
</button:SfRadioButton> </button:SfRadioButton>
</Border> </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> <Grid>
<ScrollView VerticalScrollBarVisibility="Never"> <ScrollView VerticalScrollBarVisibility="Never">
@ -58,15 +69,12 @@
<tabView:SfTabView <tabView:SfTabView
IndicatorBackground="#c6c6c6"
Margin="5,0" Margin="5,0"
TabBarBackground="White"
HorizontalOptions="Start" HorizontalOptions="Start"
VerticalOptions="Center" VerticalOptions="Center"
HeightRequest="130"> HeightRequest="130">
<tabView:SfTabItem Header="Text Color" <tabView:SfTabItem Header="Text Color"
FontFamily="Roboto-Regular" FontFamily="Roboto-Regular" >
HeightRequest="40">
<tabView:SfTabItem.FontSize> <tabView:SfTabItem.FontSize>
<OnPlatform x:TypeArguments="x:Double"> <OnPlatform x:TypeArguments="x:Double">
<On Platform="WinUI" Value ="12"/> <On Platform="WinUI" Value ="12"/>
@ -115,7 +123,7 @@
</StackLayout> </StackLayout>
</tabView:SfTabItem.Content> </tabView:SfTabItem.Content>
</tabView:SfTabItem> </tabView:SfTabItem>
<tabView:SfTabItem Header="Checked Color" FontFamily="Roboto-Regular" HeightRequest="40"> <tabView:SfTabItem Header="Checked Color" FontFamily="Roboto-Regular">
<tabView:SfTabItem.FontSize> <tabView:SfTabItem.FontSize>
<OnPlatform x:TypeArguments="x:Double"> <OnPlatform x:TypeArguments="x:Double">
<On Platform="WinUI" Value ="12"/> <On Platform="WinUI" Value ="12"/>
@ -164,7 +172,7 @@
</StackLayout> </StackLayout>
</tabView:SfTabItem.Content> </tabView:SfTabItem.Content>
</tabView:SfTabItem> </tabView:SfTabItem>
<tabView:SfTabItem Header="Unchecked Color" FontFamily="Roboto-Regular" HeightRequest="40"> <tabView:SfTabItem Header="Unchecked Color" FontFamily="Roboto-Regular">
<tabView:SfTabItem.FontSize> <tabView:SfTabItem.FontSize>
<OnPlatform x:TypeArguments="x:Double"> <OnPlatform x:TypeArguments="x:Double">
<On Platform="WinUI" Value ="12"/> <On Platform="WinUI" Value ="12"/>
@ -226,10 +234,10 @@
VerticalOptions="CenterAndExpand" VerticalOptions="CenterAndExpand"
Minimum="1" Minimum="1"
Maximum="5" Maximum="5"
MaximumTrackColor="#E0E0E0" MaximumTrackColor="{AppThemeBinding Light=#E0E0E0, Dark=#404040}"
MinimumTrackColor="#6200EE" MinimumTrackColor="{AppThemeBinding Light=#4285F4, Dark=White}"
Value="{Binding Radius,Mode=TwoWay}" ThumbColor="{AppThemeBinding Light=#4285F4, Dark=White}"
ThumbColor="#6200EE"> Value="{Binding Radius,Mode=TwoWay}" >
<Slider.Margin> <Slider.Margin>
<OnPlatform x:TypeArguments="Thickness"> <OnPlatform x:TypeArguments="Thickness">
<On Platform="WinUI" Value="0,15,0,0"/> <On Platform="WinUI" Value="0,15,0,0"/>

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

@ -8,15 +8,26 @@
xmlns:button="clr-namespace:Syncfusion.Maui.Buttons;assembly=Syncfusion.Maui.Buttons" xmlns:button="clr-namespace:Syncfusion.Maui.Buttons;assembly=Syncfusion.Maui.Buttons"
xmlns:sliders="clr-namespace:Syncfusion.Maui.Sliders;assembly=Syncfusion.Maui.Sliders" xmlns:sliders="clr-namespace:Syncfusion.Maui.Sliders;assembly=Syncfusion.Maui.Sliders"
xmlns:local="clr-namespace:SampleBrowser.Maui.Buttons.RadioButton" xmlns:local="clr-namespace:SampleBrowser.Maui.Buttons.RadioButton"
BackgroundColor="White"> BackgroundColor="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}">
<localCore:SampleView.Resources> <localCore:SampleView.Resources>
<Style x:Key="CheckBoxNormalStyle" TargetType="button:SfCheckBox"> <Style x:Key="CheckBoxNormalStyle" TargetType="button:SfRadioButton">
<Setter Property="TextColor" Value="Black"/>
<Setter Property="FontSize" Value="14"/> <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>
<Style x:Key="EntryNormalStyle" TargetType="Entry"> <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="FontSize" Value="15"/>
</Style> </Style>
</localCore:SampleView.Resources> </localCore:SampleView.Resources>
@ -39,16 +50,20 @@
HorizontalTextAlignment="Start" HorizontalTextAlignment="Start"
FontSize="15" FontSize="15"
FontFamily="Roboto-Regular" FontFamily="Roboto-Regular"
Style="{StaticResource CheckBoxNormalStyle}"
StrokeThickness="{Binding Radius,Mode=TwoWay}"> StrokeThickness="{Binding Radius,Mode=TwoWay}">
</button:SfRadioButton> </button:SfRadioButton>
<Grid Grid.Row="1" Margin="8,5,5,5"> <Grid Grid.Row="1" Margin="8,5,5,5">
<ScrollView> <ScrollView HorizontalScrollBarVisibility="Never" VerticalScrollBarVisibility="Never">
<StackLayout Spacing="3"> <StackLayout Spacing="3">
<Label Text="Options" FontFamily="Roboto-Medium" FontSize="16"/> <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"> 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}" Style="{StaticResource EntryNormalStyle}"
Placeholder="Enter the Text" Placeholder="Enter the Text"
Text="{Binding Text,Mode=TwoWay}" /> Text="{Binding Text,Mode=TwoWay}" />
@ -58,7 +73,7 @@
HorizontalOptions="Center" HorizontalOptions="Center"
VerticalOptions="Center" VerticalOptions="Center"
HeightRequest="130"> HeightRequest="130">
<tabView:SfTabItem Header="Text Color" FontFamily="Roboto-Regular" HeightRequest="40" > <tabView:SfTabItem Header="Text Color" FontFamily="Roboto-Regular">
<tabView:SfTabItem.FontSize> <tabView:SfTabItem.FontSize>
<OnPlatform x:TypeArguments="x:Double"> <OnPlatform x:TypeArguments="x:Double">
<On Platform="Android" Value ="11"/> <On Platform="Android" Value ="11"/>
@ -107,7 +122,7 @@
</StackLayout> </StackLayout>
</tabView:SfTabItem.Content> </tabView:SfTabItem.Content>
</tabView:SfTabItem> </tabView:SfTabItem>
<tabView:SfTabItem Header="Checked Color" FontFamily="Roboto-Regular" HeightRequest="40"> <tabView:SfTabItem Header="Checked Color" FontFamily="Roboto-Regular">
<tabView:SfTabItem.FontSize> <tabView:SfTabItem.FontSize>
<OnPlatform x:TypeArguments="x:Double"> <OnPlatform x:TypeArguments="x:Double">
<On Platform="Android" Value ="11"/> <On Platform="Android" Value ="11"/>
@ -156,7 +171,7 @@
</StackLayout> </StackLayout>
</tabView:SfTabItem.Content> </tabView:SfTabItem.Content>
</tabView:SfTabItem> </tabView:SfTabItem>
<tabView:SfTabItem Header="UnChecked Color" FontFamily="Roboto-Regular" HeightRequest="40"> <tabView:SfTabItem Header="UnChecked Color" FontFamily="Roboto-Regular">
<tabView:SfTabItem.FontSize> <tabView:SfTabItem.FontSize>
<OnPlatform x:TypeArguments="x:Double"> <OnPlatform x:TypeArguments="x:Double">
<On Platform="Android" Value ="11"/> <On Platform="Android" Value ="11"/>
@ -219,10 +234,10 @@
VerticalOptions="CenterAndExpand" VerticalOptions="CenterAndExpand"
Minimum="1" Minimum="1"
Maximum="5" Maximum="5"
MaximumTrackColor="#E0E0E0" MaximumTrackColor="{AppThemeBinding Light=#E0E0E0, Dark=#404040}"
MinimumTrackColor="#4285F4" MinimumTrackColor="{AppThemeBinding Light=#4285F4, Dark=White}"
Value="{Binding Radius,Mode=TwoWay}" ThumbColor="{AppThemeBinding Light=#4285F4, Dark=White}"
ThumbColor="#4285F4"> Value="{Binding Radius,Mode=TwoWay}" >
</Slider> </Slider>
<Label Text="{Binding Radius}" <Label Text="{Binding Radius}"
Grid.Column="1" Grid.Column="1"

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

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

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

@ -26,13 +26,14 @@
<VisualStateGroup x:Name="CommonStates"> <VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal"> <VisualState x:Name="Normal">
<VisualState.Setters> <VisualState.Setters>
<Setter Property="Background" Value="#6200EE"/> <Setter Property="Background" Value="{AppThemeBinding Light={StaticResource PrimaryBackgroundLight}, Dark={StaticResource PrimaryBackground}}"/>
<Setter Property="TextColor" Value="White"/> <Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource PrimaryForegroundLight}, Dark={StaticResource PrimaryForeground}}"/>
</VisualState.Setters> </VisualState.Setters>
</VisualState> </VisualState>
<VisualState x:Name="Disabled"> <VisualState x:Name="Disabled">
<VisualState.Setters> <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.Setters>
</VisualState> </VisualState>
</VisualStateGroup> </VisualStateGroup>
@ -44,30 +45,30 @@
<localcore:SampleView.Content> <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}"/> <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"/> <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> <ScrollView>
<Grid RowDefinitions="60,60,60,60,60,60,60,60,Auto"> <Grid RowDefinitions="60,60,60,60,60,60,60,60,Auto">
<Grid> <Grid>
<Button HeightRequest="30" BackgroundColor="#6200EE" CornerRadius="15" Margin="10,0" HorizontalOptions="Start" WidthRequest="30"/> <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="White"/> <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"/> <Label Margin="50,20,0,20" Text="Select Payment Method"/>
</Grid> </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,*"> <Grid ColumnDefinitions="50,*">
<syncfusion:SfRadioButton x:Name="masterCard" StateChanged="MasterCard_StateChanged" GroupKey="{StaticResource payment mode}"/> <syncfusion:SfRadioButton x:Name="masterCard" StateChanged="MasterCard_StateChanged" GroupKey="{StaticResource payment mode}"/>
<StackLayout Grid.Column="1" VerticalOptions="Center"> <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> <Label.GestureRecognizers>
<TapGestureRecognizer Tapped="TapGestureRecognizer_Tapped"/> <TapGestureRecognizer Tapped="TapGestureRecognizer_Tapped"/>
</Label.GestureRecognizers> </Label.GestureRecognizers>
</Label> </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> <Label.GestureRecognizers>
<TapGestureRecognizer Tapped="TapGestureRecognizer_Tapped"/> <TapGestureRecognizer Tapped="TapGestureRecognizer_Tapped"/>
</Label.GestureRecognizers> </Label.GestureRecognizers>
@ -75,7 +76,7 @@
</StackLayout> </StackLayout>
</Grid> </Grid>
</Frame> </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,*"> <Grid ColumnDefinitions="50,*">
<syncfusion:SfRadioButton x:Name="visa" StateChanged="Visa_StateChanged" GroupKey="{StaticResource payment mode}"/> <syncfusion:SfRadioButton x:Name="visa" StateChanged="Visa_StateChanged" GroupKey="{StaticResource payment mode}"/>
<StackLayout VerticalOptions="Center" Grid.Column="1"> <StackLayout VerticalOptions="Center" Grid.Column="1">
@ -84,7 +85,7 @@
<TapGestureRecognizer Tapped="TapGestureRecognizer_Tapped_1"/> <TapGestureRecognizer Tapped="TapGestureRecognizer_Tapped_1"/>
</Label.GestureRecognizers> </Label.GestureRecognizers>
</Label> </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> <Label.GestureRecognizers>
<TapGestureRecognizer Tapped="TapGestureRecognizer_Tapped_1"/> <TapGestureRecognizer Tapped="TapGestureRecognizer_Tapped_1"/>
</Label.GestureRecognizers> </Label.GestureRecognizers>
@ -92,11 +93,11 @@
</StackLayout> </StackLayout>
</Grid> </Grid>
</Frame> </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,*"> <Grid ColumnDefinitions="50,*">
<syncfusion:SfRadioButton x:Name="payDirect" StateChanged="PayDirect_StateChanged" GroupKey="{StaticResource payment mode}"/> <syncfusion:SfRadioButton x:Name="payDirect" StateChanged="PayDirect_StateChanged" GroupKey="{StaticResource payment mode}"/>
<StackLayout Grid.Column="1" VerticalOptions="Center"> <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> <Label.GestureRecognizers>
<TapGestureRecognizer Tapped="TapGestureRecognizer_Tapped_2"/> <TapGestureRecognizer Tapped="TapGestureRecognizer_Tapped_2"/>
</Label.GestureRecognizers> </Label.GestureRecognizers>
@ -105,21 +106,21 @@
</Grid> </Grid>
</Frame> </Frame>
<Grid Grid.Row="4"> <Grid Grid.Row="4">
<Button HeightRequest="30" BackgroundColor="#6200EE" CornerRadius="15" Margin="10,0" HorizontalOptions="Start" WidthRequest="30"/> <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="White"/> <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"/> <Label Margin="50,20,0,20" Grid.Row="4" Text="Choose EMI Plan"/>
</Grid> </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="*"> <Grid ColumnDefinitions="*">
<syncfusion:SfRadioButton x:Name="noCost" Text="$6,66 x 3 months | No Cost | Total Cost: $39,99" GroupKey="{StaticResource plan mode}"/> <syncfusion:SfRadioButton x:Name="noCost" Text="$6,66 x 3 months | No Cost | Total Cost: $39,99" GroupKey="{StaticResource plan mode}"/>
</Grid> </Grid>
</Frame> </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="*"> <Grid ColumnDefinitions="*">
<syncfusion:SfRadioButton x:Name="nineMonths" Text="$4,74 x 6 months | 15.99% pa | Total Cost: $42,71" GroupKey="{StaticResource plan mode}"/> <syncfusion:SfRadioButton x:Name="nineMonths" Text="$4,74 x 6 months | 15.99% pa | Total Cost: $42,71" GroupKey="{StaticResource plan mode}"/>
</Grid> </Grid>
</Frame> </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="*"> <Grid ColumnDefinitions="*">
<syncfusion:SfRadioButton x:Name="twelveMonths" Text="$3,62 x 9 months | 15.99% pa | Total Cost: $43,11" GroupKey="{StaticResource plan mode}"/> <syncfusion:SfRadioButton x:Name="twelveMonths" Text="$3,62 x 9 months | 15.99% pa | Total Cost: $43,11" GroupKey="{StaticResource plan mode}"/>
</Grid> </Grid>

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

@ -22,13 +22,14 @@
<VisualStateGroup x:Name="CommonStates"> <VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal"> <VisualState x:Name="Normal">
<VisualState.Setters> <VisualState.Setters>
<Setter Property="Background" Value="#6200EE"/> <Setter Property="Background" Value="{AppThemeBinding Light={StaticResource PrimaryBackgroundLight}, Dark={StaticResource PrimaryBackground}}"/>
<Setter Property="TextColor" Value="White"/> <Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource PrimaryForegroundLight}, Dark={StaticResource PrimaryForeground}}"/>
</VisualState.Setters> </VisualState.Setters>
</VisualState> </VisualState>
<VisualState x:Name="Disabled"> <VisualState x:Name="Disabled">
<VisualState.Setters> <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.Setters>
</VisualState> </VisualState>
</VisualStateGroup> </VisualStateGroup>
@ -43,8 +44,8 @@
<ScrollView> <ScrollView>
<StackLayout Spacing="15"> <StackLayout Spacing="15">
<Label x:Name="paymentmodelbl" Text="Payment methods" Margin="10,5" FontAttributes="Bold" HorizontalOptions="Start" FontSize="Medium"/> <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"/> <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"> <Frame CornerRadius="10" Padding="5" HasShadow="False" BorderColor="LightGray" Margin="10,0" Background="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}">
<Grid ColumnDefinitions="40,*"> <Grid ColumnDefinitions="40,*">
<syncfusion:SfRadioButton VerticalOptions="Start" x:Name="bankDebitCard" GroupKey="{StaticResource payment mode}"/> <syncfusion:SfRadioButton VerticalOptions="Start" x:Name="bankDebitCard" GroupKey="{StaticResource payment mode}"/>
<StackLayout Grid.Column="1" VerticalOptions="Center"> <StackLayout Grid.Column="1" VerticalOptions="Center">
@ -53,7 +54,7 @@
<TapGestureRecognizer Tapped="TapGestureRecognizer_Tapped_3"/> <TapGestureRecognizer Tapped="TapGestureRecognizer_Tapped_3"/>
</Label.GestureRecognizers> </Label.GestureRecognizers>
</Label> </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> <Label.GestureRecognizers>
<TapGestureRecognizer Tapped="TapGestureRecognizer_Tapped_3"/> <TapGestureRecognizer Tapped="TapGestureRecognizer_Tapped_3"/>
</Label.GestureRecognizers> </Label.GestureRecognizers>
@ -61,7 +62,7 @@
</StackLayout> </StackLayout>
</Grid> </Grid>
</Frame> </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,*"> <Grid ColumnDefinitions="40,*">
<syncfusion:SfRadioButton VerticalOptions="Start" x:Name="bankCreditCard" GroupKey="{StaticResource payment mode}"/> <syncfusion:SfRadioButton VerticalOptions="Start" x:Name="bankCreditCard" GroupKey="{StaticResource payment mode}"/>
<StackLayout Grid.Column="1" VerticalOptions="Center"> <StackLayout Grid.Column="1" VerticalOptions="Center">
@ -70,7 +71,7 @@
<TapGestureRecognizer Tapped="TapGestureRecognizer_Tapped_1"/> <TapGestureRecognizer Tapped="TapGestureRecognizer_Tapped_1"/>
</Label.GestureRecognizers> </Label.GestureRecognizers>
</Label> </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> <Label.GestureRecognizers>
<TapGestureRecognizer Tapped="TapGestureRecognizer_Tapped_1"/> <TapGestureRecognizer Tapped="TapGestureRecognizer_Tapped_1"/>
</Label.GestureRecognizers> </Label.GestureRecognizers>
@ -78,7 +79,7 @@
</StackLayout> </StackLayout>
</Grid> </Grid>
</Frame> </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,*"> <Grid ColumnDefinitions="40,*">
<syncfusion:SfRadioButton VerticalOptions="Start" x:Name="creditCard" GroupKey="{StaticResource payment mode}"/> <syncfusion:SfRadioButton VerticalOptions="Start" x:Name="creditCard" GroupKey="{StaticResource payment mode}"/>
<StackLayout Grid.Column="1" VerticalOptions="Center"> <StackLayout Grid.Column="1" VerticalOptions="Center">
@ -87,7 +88,7 @@
<TapGestureRecognizer Tapped="TapGestureRecognizer_Tapped_2"/> <TapGestureRecognizer Tapped="TapGestureRecognizer_Tapped_2"/>
</Label.GestureRecognizers> </Label.GestureRecognizers>
</Label> </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> <Label.GestureRecognizers>
<TapGestureRecognizer Tapped="TapGestureRecognizer_Tapped_2"/> <TapGestureRecognizer Tapped="TapGestureRecognizer_Tapped_2"/>
</Label.GestureRecognizers> </Label.GestureRecognizers>
@ -95,14 +96,14 @@
</StackLayout> </StackLayout>
</Grid> </Grid>
</Frame> </Frame>
<Label Text="MORE WAYS TO PAY" FontSize="14" Margin="10,25,10,10" FontAttributes="Bold" TextColor="#555555" FontFamily="Roboto-Regular"/> <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"> <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}"/> <syncfusion:SfRadioButton x:Name="debitOrCreditCard" Text="Debit or Credit Card" FontAttributes="Bold" FontFamily="Roboto-Regular" GroupKey="{StaticResource payment mode}"/>
</Frame> </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}"/> <syncfusion:SfRadioButton x:Name="netBanking" Text="Net Banking" FontFamily="Roboto-Regular" FontAttributes="Bold" GroupKey="{StaticResource payment mode}"/>
</Frame> </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> <HorizontalStackLayout>
<syncfusion:SfRadioButton x:Name="cashButton" GroupKey="{StaticResource payment mode}"/> <syncfusion:SfRadioButton x:Name="cashButton" GroupKey="{StaticResource payment mode}"/>
<StackLayout> <StackLayout>

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

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

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

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

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

@ -6,7 +6,8 @@
xmlns:ev="clr-namespace:Syncfusion.Maui.Core;assembly=Syncfusion.Maui.Core" xmlns:ev="clr-namespace:Syncfusion.Maui.Core;assembly=Syncfusion.Maui.Core"
xmlns:local="clr-namespace:SampleBrowser.Maui.Buttons.Switch" 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"
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> <localcore:SampleView.Resources>
@ -303,6 +304,61 @@
</Setter.Value> </Setter.Value>
</Setter> </Setter>
</Style> </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> </localcore:SampleView.Resources>
@ -315,7 +371,7 @@
<Style TargetType="Label"> <Style TargetType="Label">
<Setter Property="Margin" Value="15,0" /> <Setter Property="Margin" Value="15,0" />
<Setter Property="FontFamily" Value="Roboto" /> <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="VerticalOptions" Value="Center" />
<Setter Property="HorizontalOptions" Value="Center" /> <Setter Property="HorizontalOptions" Value="Center" />
</Style> </Style>
@ -364,7 +420,7 @@
Grid.Row="1" Grid.Row="1"
Grid.Column="0" Grid.Column="0"
FontSize="12" FontSize="12"
Text="Material 3"/> Text="Material"/>
<Label <Label
Grid.Row="1" Grid.Row="1"
Grid.Column="1" Grid.Column="1"
@ -386,7 +442,7 @@
<Grid <Grid
Margin="0,10,10,10" Margin="0,10,10,10"
BackgroundColor="White" BackgroundColor="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}"
HeightRequest="75"> HeightRequest="75">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="Auto" /> <RowDefinition Height="Auto" />
@ -447,7 +503,7 @@
<Grid <Grid
Margin="0,10,10,10" Margin="0,10,10,10"
BackgroundColor="White" BackgroundColor="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}"
HeightRequest="70"> HeightRequest="70">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="Auto" /> <RowDefinition Height="Auto" />
@ -463,17 +519,20 @@
Grid.Column="0" Grid.Column="0"
AllowIndeterminateState="True" AllowIndeterminateState="True"
IsEnabled="False" IsEnabled="False"
Style="{StaticResource DisabledSwitch}"
IsOn="False" /> IsOn="False" />
<syncfusion:SfSwitch <syncfusion:SfSwitch
Grid.Row="0" Grid.Row="0"
Grid.Column="1" Grid.Column="1"
AllowIndeterminateState="True" AllowIndeterminateState="True"
Style="{StaticResource DisabledSwitch}"
IsEnabled="False" IsEnabled="False"
IsOn="{x:Null}" /> IsOn="{x:Null}" />
<syncfusion:SfSwitch <syncfusion:SfSwitch
Grid.Row="0" Grid.Row="0"
Grid.Column="2" Grid.Column="2"
AllowIndeterminateState="True" AllowIndeterminateState="True"
Style="{StaticResource DisabledSwitch}"
IsEnabled="False" IsEnabled="False"
IsOn="True" /> IsOn="True" />
<Label <Label
@ -504,7 +563,7 @@
<Grid <Grid
Margin="0,10,10,10" Margin="0,10,10,10"
BackgroundColor="White" BackgroundColor="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}"
HeightRequest="70"> HeightRequest="70">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="Auto" /> <RowDefinition Height="Auto" />

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

@ -6,7 +6,8 @@
xmlns:button="clr-namespace:Syncfusion.Maui.Buttons;assembly=Syncfusion.Maui.Buttons" xmlns:button="clr-namespace:Syncfusion.Maui.Buttons;assembly=Syncfusion.Maui.Buttons"
xmlns:ev="clr-namespace:Syncfusion.Maui.Core;assembly=Syncfusion.Maui.Core" xmlns:ev="clr-namespace:Syncfusion.Maui.Core;assembly=Syncfusion.Maui.Core"
xmlns:local="clr-namespace:SampleBrowser.Maui.Buttons.Switch" 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> <localcore:SampleView.Content>
<Grid> <Grid>

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

@ -7,12 +7,13 @@
xmlns:ev="clr-namespace:Syncfusion.Maui.Core;assembly=Syncfusion.Maui.Core" xmlns:ev="clr-namespace:Syncfusion.Maui.Core;assembly=Syncfusion.Maui.Core"
xmlns:imageExtension="clr-namespace:SampleBrowser.Maui.Base.Converters;assembly=SampleBrowser.Maui.Base" xmlns:imageExtension="clr-namespace:SampleBrowser.Maui.Base.Converters;assembly=SampleBrowser.Maui.Base"
xmlns:local="clr-namespace:SampleBrowser.Maui.Buttons.Switch" 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> <localcore:SampleView.Resources>
<imageExtension:SfImageSourceConverter x:Key="imageconverter" /> <imageExtension:SfImageSourceConverter x:Key="imageconverter" />
<Style TargetType="Label"> <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="FontFamily" Value="Roboto" />
<Setter Property="VerticalOptions" Value="Center" /> <Setter Property="VerticalOptions" Value="Center" />
</Style> </Style>

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

@ -6,7 +6,8 @@
xmlns:button="clr-namespace:Syncfusion.Maui.Buttons;assembly=Syncfusion.Maui.Buttons" xmlns:button="clr-namespace:Syncfusion.Maui.Buttons;assembly=Syncfusion.Maui.Buttons"
xmlns:ev="clr-namespace:Syncfusion.Maui.Core;assembly=Syncfusion.Maui.Core" xmlns:ev="clr-namespace:Syncfusion.Maui.Core;assembly=Syncfusion.Maui.Core"
xmlns:local="clr-namespace:SampleBrowser.Maui.Buttons.Switch" 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> <localcore:SampleView.Content>
<Grid> <Grid>

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

@ -3,11 +3,13 @@
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:SampleBrowser.Maui.Calendar" xmlns:local="clr-namespace:SampleBrowser.Maui.Calendar"
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"
x:Class="SampleBrowser.Maui.Calendar.App"> x:Class="SampleBrowser.Maui.Calendar.App">
<Application.Resources> <Application.Resources>
<ResourceDictionary> <ResourceDictionary>
<ResourceDictionary.MergedDictionaries> <ResourceDictionary.MergedDictionaries>
<base:SampleBrowserStyles/> <base:SampleBrowserStyles/>
<syncTheme:SyncfusionThemeResourceDictionary />
</ResourceDictionary.MergedDictionaries> </ResourceDictionary.MergedDictionaries>
</ResourceDictionary> </ResourceDictionary>
</Application.Resources> </Application.Resources>

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

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

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

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

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

@ -4,20 +4,19 @@
xmlns:local="clr-namespace:SampleBrowser.Maui.Calendar.SfCalendar" xmlns:local="clr-namespace:SampleBrowser.Maui.Calendar.SfCalendar"
xmlns:calendar="clr-namespace:Syncfusion.Maui.Calendar;assembly=Syncfusion.Maui.Calendar" 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"
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> <localCore:SampleView.Content>
<Grid WidthRequest="346" HeightRequest="363"> <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" <calendar:SfCalendar x:Name="circleCalendar"
ShowTrailingAndLeadingDates="False" ShowTrailingAndLeadingDates="False"
NavigationDirection="Horizontal" NavigationDirection="Horizontal"
TodayHighlightBrush="#0A3A74"
AllowViewNavigation="False"> AllowViewNavigation="False">
<calendar:SfCalendar.MonthView> <calendar:SfCalendar.MonthView>
<calendar:CalendarMonthView CellTemplate="{Binding Template}"> <calendar:CalendarMonthView CellTemplate="{Binding Template}">
<calendar:CalendarMonthView.HeaderView> <calendar:CalendarMonthView.HeaderView>
<calendar:CalendarMonthHeaderView Background="#F1F7FF"/> <calendar:CalendarMonthHeaderView Background="{AppThemeBinding Light={StaticResource PreviewAreaBackgroundLight}, Dark={StaticResource PreviewAreaBackground}}"/>
</calendar:CalendarMonthView.HeaderView> </calendar:CalendarMonthView.HeaderView>
</calendar:CalendarMonthView> </calendar:CalendarMonthView>
</calendar:SfCalendar.MonthView> </calendar:SfCalendar.MonthView>
@ -27,16 +26,15 @@
</calendar:SfCalendar> </calendar:SfCalendar>
</Frame> </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" <calendar:SfCalendar x:Name="iOSCircleCalendar"
ShowTrailingAndLeadingDates="False" ShowTrailingAndLeadingDates="False"
NavigationDirection="Horizontal" NavigationDirection="Horizontal"
TodayHighlightBrush="#0A3A74"
AllowViewNavigation="False"> AllowViewNavigation="False">
<calendar:SfCalendar.MonthView> <calendar:SfCalendar.MonthView>
<calendar:CalendarMonthView CellTemplate="{Binding Template}"> <calendar:CalendarMonthView CellTemplate="{Binding Template}">
<calendar:CalendarMonthView.HeaderView> <calendar:CalendarMonthView.HeaderView>
<calendar:CalendarMonthHeaderView Background="#F1F7FF"/> <calendar:CalendarMonthHeaderView Background="{AppThemeBinding Light={StaticResource PreviewAreaBackgroundLight}, Dark={StaticResource PreviewAreaBackground}}"/>
</calendar:CalendarMonthView.HeaderView> </calendar:CalendarMonthView.HeaderView>
</calendar:CalendarMonthView> </calendar:CalendarMonthView>
</calendar:SfCalendar.MonthView> </calendar:SfCalendar.MonthView>
@ -63,10 +61,11 @@
FontSize="14" FontSize="14"
VerticalOptions="Center" VerticalOptions="Center"
HorizontalOptions="Start" 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" Margin="0,15,0,0" VerticalOptions="Center"
TextColor="{AppThemeBinding Light={StaticResource PlaceholderTextColourLight}, Dark={StaticResource PlaceholderTextColour}}"
HorizontalOptions="Start"/> HorizontalOptions="Start"/>
</Grid> </Grid>
</StackLayout> </StackLayout>

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

@ -14,6 +14,11 @@ namespace SampleBrowser.Maui.Calendar.SfCalendar;
public class AppearanceViewModel : INotifyPropertyChanged 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 circleTemplate;
private DataTemplate rectTemplate; private DataTemplate rectTemplate;
@ -42,14 +47,14 @@ public class AppearanceViewModel : INotifyPropertyChanged
Grid grid = new Grid(); Grid grid = new Grid();
Border border = new Border(); Border border = new Border();
border.BackgroundColor = Color.FromRgba("#F5F5F5"); border.BackgroundColor = isLightTheme ? Color.FromRgba("#F5F5F5") : Color.FromRgba("#E6E1E51F");
border.StrokeShape = new RoundRectangle() border.StrokeShape = new RoundRectangle()
{ {
CornerRadius = new CornerRadius(25) CornerRadius = new CornerRadius(25)
}; };
border.SetBinding(Border.StrokeThicknessProperty, "Date", converter: new DateToStrokeConverter()); 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 label = new Label();
label.SetBinding(Label.TextProperty, "Date.Day"); label.SetBinding(Label.TextProperty, "Date.Day");
@ -69,14 +74,14 @@ public class AppearanceViewModel : INotifyPropertyChanged
Grid grid = new Grid(); Grid grid = new Grid();
Border border = new Border(); Border border = new Border();
border.BackgroundColor = Color.FromRgba("#F5F5F5"); border.BackgroundColor = isLightTheme ? Color.FromRgba("#F5F5F5") : Color.FromRgba("#E6E1E51F");
border.StrokeShape = new RoundRectangle() border.StrokeShape = new RoundRectangle()
{ {
CornerRadius = new CornerRadius(2) CornerRadius = new CornerRadius(2)
}; };
border.SetBinding(Border.StrokeThicknessProperty, "Date", converter: new DateToStrokeConverter()); 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 label = new Label();
label.SetBinding(Label.TextProperty, "Date.Day"); label.SetBinding(Label.TextProperty, "Date.Day");

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

@ -1,12 +1,13 @@
<localCore:SampleView xmlns="http://schemas.microsoft.com/dotnet/2021/maui" <localCore:SampleView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="SampleBrowser.Maui.Calendar.SfCalendar.AppointmentBooking" 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: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>
<Grid IsVisible="False" x:Name="deskTop" HorizontalOptions="Center" VerticalOptions="Center" HeightRequest="500" WidthRequest="350"> <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"> <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="#f5eeff"> <Grid Background="{AppThemeBinding Light={StaticResource BlackOverlaySelectedLight}, Dark={StaticResource BlackOverlaySelected}}">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="0.1*"/> <RowDefinition Height="0.1*"/>
<RowDefinition Height="0.35*"/> <RowDefinition Height="0.35*"/>
@ -14,27 +15,27 @@
<RowDefinition Height="0.35*"/> <RowDefinition Height="0.35*"/>
<RowDefinition Height="0.1*"/> <RowDefinition Height="0.1*"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Label Grid.Row="0" HorizontalTextAlignment="Center" VerticalTextAlignment="Center" FontSize="20" BackgroundColor="White" TextColor="Black" Text="Book an Appointment"/> <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="White" NavigationDirection="Horizontal"> <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:SfCalendar.HeaderView>
<calendar:CalendarHeaderView Background="#f5eeff"/> <calendar:CalendarHeaderView Background="{AppThemeBinding Light={StaticResource BlackOverlaySelectedLight}, Dark={StaticResource BlackOverlaySelected}}"/>
</calendar:SfCalendar.HeaderView> </calendar:SfCalendar.HeaderView>
<calendar:SfCalendar.MonthView> <calendar:SfCalendar.MonthView>
<calendar:CalendarMonthView NumberOfVisibleWeeks="2"> <calendar:CalendarMonthView NumberOfVisibleWeeks="2">
<calendar:CalendarMonthView.HeaderView> <calendar:CalendarMonthView.HeaderView>
<calendar:CalendarMonthHeaderView Background="#f5eeff"/> <calendar:CalendarMonthHeaderView Background="{AppThemeBinding Light={StaticResource BlackOverlaySelectedLight}, Dark={StaticResource BlackOverlaySelected}}"/>
</calendar:CalendarMonthView.HeaderView> </calendar:CalendarMonthView.HeaderView>
</calendar:CalendarMonthView> </calendar:CalendarMonthView>
</calendar:SfCalendar.MonthView> </calendar:SfCalendar.MonthView>
</calendar:SfCalendar> </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"> <Grid Grid.Row="3">
<FlexLayout x:Name="flexLayout" Wrap="Wrap" <FlexLayout x:Name="flexLayout" Wrap="Wrap"
JustifyContent="SpaceAround" AlignItems="Center" VerticalOptions="Center" HorizontalOptions="Center"> JustifyContent="SpaceAround" AlignItems="Center" VerticalOptions="Center" HorizontalOptions="Center">
<FlexLayout.Resources> <FlexLayout.Resources>
<Style TargetType="Button"> <Style TargetType="Button">
<Setter Property="TextColor" Value="Black"/> <Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource TextColourLight}, Dark={StaticResource TextColour}}"/>
<Setter Property="BackgroundColor" Value="White"/> <Setter Property="BackgroundColor" Value="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}"/>
</Style> </Style>
</FlexLayout.Resources> </FlexLayout.Resources>
<Button Text="09:00 AM" Clicked="SlotBooking_Changed"/> <Button Text="09:00 AM" Clicked="SlotBooking_Changed"/>
@ -52,13 +53,13 @@
</FlexLayout> </FlexLayout>
</Grid> </Grid>
<Grid Grid.Row="4"> <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>
</Grid> </Grid>
</Frame> </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"> <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="#f5eeff"> <Grid Background="{AppThemeBinding Light={StaticResource BlackOverlaySelectedLight}, Dark={StaticResource BlackOverlaySelected}}">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="0.1*"/> <RowDefinition Height="0.1*"/>
<RowDefinition Height="0.35*"/> <RowDefinition Height="0.35*"/>
@ -66,27 +67,27 @@
<RowDefinition Height="0.35*"/> <RowDefinition Height="0.35*"/>
<RowDefinition Height="0.1*"/> <RowDefinition Height="0.1*"/>
</Grid.RowDefinitions> </Grid.RowDefinitions>
<Label Grid.Row="0" HorizontalTextAlignment="Center" VerticalTextAlignment="Center" FontSize="20" BackgroundColor="White" TextColor="Black" Text="Book an Appointment"/> <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="White" NavigationDirection="Horizontal"> <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:SfCalendar.HeaderView>
<calendar:CalendarHeaderView Background="#f5eeff"/> <calendar:CalendarHeaderView Background="{AppThemeBinding Light={StaticResource BlackOverlaySelectedLight}, Dark={StaticResource BlackOverlaySelected}}"/>
</calendar:SfCalendar.HeaderView> </calendar:SfCalendar.HeaderView>
<calendar:SfCalendar.MonthView> <calendar:SfCalendar.MonthView>
<calendar:CalendarMonthView NumberOfVisibleWeeks="2"> <calendar:CalendarMonthView NumberOfVisibleWeeks="2">
<calendar:CalendarMonthView.HeaderView> <calendar:CalendarMonthView.HeaderView>
<calendar:CalendarMonthHeaderView Background="#f5eeff"/> <calendar:CalendarMonthHeaderView Background="{AppThemeBinding Light={StaticResource BlackOverlaySelectedLight}, Dark={StaticResource BlackOverlaySelected}}"/>
</calendar:CalendarMonthView.HeaderView> </calendar:CalendarMonthView.HeaderView>
</calendar:CalendarMonthView> </calendar:CalendarMonthView>
</calendar:SfCalendar.MonthView> </calendar:SfCalendar.MonthView>
</calendar:SfCalendar> </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"> <Grid Grid.Row="3">
<FlexLayout x:Name="flexLayout1" Wrap="Wrap" <FlexLayout x:Name="flexLayout1" Wrap="Wrap"
JustifyContent="SpaceAround" AlignItems="Center" VerticalOptions="Center" HorizontalOptions="Center"> JustifyContent="SpaceAround" AlignItems="Center" VerticalOptions="Center" HorizontalOptions="Center">
<FlexLayout.Resources> <FlexLayout.Resources>
<Style TargetType="Button"> <Style TargetType="Button">
<Setter Property="TextColor" Value="Black"/> <Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource TextColourLight}, Dark={StaticResource TextColour}}"/>
<Setter Property="BackgroundColor" Value="White"/> <Setter Property="BackgroundColor" Value="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}"/>
</Style> </Style>
</FlexLayout.Resources> </FlexLayout.Resources>
<Button Text="09:00 AM" Clicked="SlotBooking_Changed"/> <Button Text="09:00 AM" Clicked="SlotBooking_Changed"/>
@ -104,39 +105,39 @@
</FlexLayout> </FlexLayout>
</Grid> </Grid>
<Grid Grid.Row="4"> <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>
</Grid> </Grid>
</Border> </Border>
</Grid> </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> <Grid.RowDefinitions>
<RowDefinition Height="0.25*"/> <RowDefinition Height="0.25*"/>
<RowDefinition Height="0.10*"/> <RowDefinition Height="0.10*"/>
<RowDefinition Height="0.25*"/> <RowDefinition Height="0.25*"/>
<RowDefinition Height="0.40*"/> <RowDefinition Height="0.40*"/>
</Grid.RowDefinitions> </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:SfCalendar.HeaderView>
<calendar:CalendarHeaderView Background="#f5eeff"/> <calendar:CalendarHeaderView Background="{AppThemeBinding Light={StaticResource BlackOverlaySelectedLight}, Dark={StaticResource BlackOverlaySelected}}"/>
</calendar:SfCalendar.HeaderView> </calendar:SfCalendar.HeaderView>
<calendar:SfCalendar.MonthView> <calendar:SfCalendar.MonthView>
<calendar:CalendarMonthView NumberOfVisibleWeeks="2"> <calendar:CalendarMonthView NumberOfVisibleWeeks="2">
<calendar:CalendarMonthView.HeaderView> <calendar:CalendarMonthView.HeaderView>
<calendar:CalendarMonthHeaderView Background="#f5eeff"/> <calendar:CalendarMonthHeaderView Background="{AppThemeBinding Light={StaticResource BlackOverlaySelectedLight}, Dark={StaticResource BlackOverlaySelected}}"/>
</calendar:CalendarMonthView.HeaderView> </calendar:CalendarMonthView.HeaderView>
</calendar:CalendarMonthView> </calendar:CalendarMonthView>
</calendar:SfCalendar.MonthView> </calendar:SfCalendar.MonthView>
</calendar:SfCalendar> </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"> <Grid Grid.Row="2">
<FlexLayout x:Name="mobileFlexLayout" Wrap="Wrap" <FlexLayout x:Name="mobileFlexLayout" Wrap="Wrap"
JustifyContent="SpaceAround" AlignItems="Center" VerticalOptions="Center" HorizontalOptions="Center"> JustifyContent="SpaceAround" AlignItems="Center" VerticalOptions="Center" HorizontalOptions="Center">
<FlexLayout.Resources> <FlexLayout.Resources>
<Style TargetType="Button"> <Style TargetType="Button">
<Setter Property="TextColor" Value="Black"/> <Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource TextColourLight}, Dark={StaticResource TextColour}}"/>
<Setter Property="Background" Value="White"/> <Setter Property="Background" Value="{AppThemeBinding Light={StaticResource BackgroundLight}, Dark={StaticResource BackgroundDark}}"/>
</Style> </Style>
</FlexLayout.Resources> </FlexLayout.Resources>
<Button Text="09:00 AM" Clicked="SlotBooking_Changed"/> <Button Text="09:00 AM" Clicked="SlotBooking_Changed"/>
@ -154,7 +155,12 @@
</FlexLayout> </FlexLayout>
</Grid> </Grid>
<Grid Grid.Row="3" HorizontalOptions="Center" Padding="0,0,0,30"> <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> </Grid>
</Grid> </Grid>

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

@ -8,6 +8,7 @@
using SampleBrowser.Maui.Base; using SampleBrowser.Maui.Base;
using System.Drawing; using System.Drawing;
using System.Globalization; using System.Globalization;
using Syncfusion.Maui.Popup;
using Color = Microsoft.Maui.Graphics.Color; using Color = Microsoft.Maui.Graphics.Color;
namespace SampleBrowser.Maui.Calendar.SfCalendar namespace SampleBrowser.Maui.Calendar.SfCalendar
@ -23,6 +24,11 @@ namespace SampleBrowser.Maui.Calendar.SfCalendar
/// </summary> /// </summary>
private string timeSlot = string.Empty; private string timeSlot = string.Empty;
/// <summary>
/// Check the application theme is light or dark.
/// </summary>
private bool isLightTheme = Application.Current?.RequestedTheme == AppTheme.Light;
/// <summary> /// <summary>
/// Initializes a new instance of the <see cref="Year" /> class. /// Initializes a new instance of the <see cref="Year" /> class.
/// </summary> /// </summary>
@ -30,19 +36,25 @@ namespace SampleBrowser.Maui.Calendar.SfCalendar
{ {
InitializeComponent(); InitializeComponent();
if (this.popUp != null)
{
popUp.FooterTemplate = this.GetFooterTemplate(popUp);
popUp.ContentTemplate = this.GetContentTemplate(popUp);
}
#if MACCATALYST #if MACCATALYST
this.border.IsVisible = true; 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); this.InitializeCalendar(this.appointmentBooking1, this.deskTop);
#elif !ANDROID && !IOS #elif !ANDROID && !IOS
this.frame.IsVisible = true; 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); this.InitializeCalendar(this.appointmentBooking, this.deskTop);
#else #else
if (DeviceInfo.Idiom == DeviceIdiom.Tablet) if (DeviceInfo.Idiom == DeviceIdiom.Tablet)
{ {
this.border.IsVisible = true; 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); this.InitializeCalendar(this.appointmentBooking1, this.deskTop);
} }
else else
@ -52,6 +64,127 @@ namespace SampleBrowser.Maui.Calendar.SfCalendar
#endif #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> /// <summary>
/// Initialize the calendar. /// Initialize the calendar.
/// </summary> /// </summary>
@ -113,8 +246,8 @@ namespace SampleBrowser.Maui.Calendar.SfCalendar
foreach (Button child in buttonLayout.Children) foreach (Button child in buttonLayout.Children)
{ {
Button button = (Button)child; Button button = (Button)child;
button.TextColor = Colors.Black; button.TextColor = isLightTheme ? Colors.Black : Colors.White;
button.Background = 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> /// <param name="e">Event arguments.</param>
private void AppointmentanBooking(object sender, EventArgs e) private void AppointmentanBooking(object sender, EventArgs e)
{ {
if (this.popUp == null)
{
return;
}
#if MACCATALYST #if MACCATALYST
this.BookAppointment(this.appointmentBooking1, this.flexLayout1); this.BookAppointment(this.appointmentBooking1, this.flexLayout1);
#elif !ANDROID && !IOS #elif !ANDROID && !IOS
@ -139,6 +277,8 @@ namespace SampleBrowser.Maui.Calendar.SfCalendar
this.BookAppointment(this.mobileAppointmentBooking, this.mobileFlexLayout); this.BookAppointment(this.mobileAppointmentBooking, this.mobileFlexLayout);
} }
#endif #endif
this.popUp.Show();
} }
/// <summary> /// <summary>
@ -148,30 +288,37 @@ namespace SampleBrowser.Maui.Calendar.SfCalendar
/// <param name="buttonLayout">Time slot button layout.</param> /// <param name="buttonLayout">Time slot button layout.</param>
private void BookAppointment(Syncfusion.Maui.Calendar.SfCalendar calendar, FlexLayout buttonLayout) private void BookAppointment(Syncfusion.Maui.Calendar.SfCalendar calendar, FlexLayout buttonLayout)
{ {
if (this.popUp == null)
{
return;
}
if (calendar.SelectedDate == null) 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; return;
} }
if (this.timeSlot == string.Empty) 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; return;
} }
this.popUp.HeaderTitle = "Confirmation";
DateTime dateTime = calendar.SelectedDate.Value; DateTime dateTime = calendar.SelectedDate.Value;
string dayText = dateTime.ToString("MMMM" + " " + dateTime.Day.ToString() + ", " + dateTime.ToString("yyyy"), CultureInfo.CurrentUICulture); string dayText = dateTime.ToString("MMMM" + " " + dateTime.Day.ToString() + ", " + dateTime.ToString("yyyy"), CultureInfo.CurrentUICulture);
string text = "Appointment booked for " + dayText + " " + timeSlot; this.popUp.Message = "Appointment booked for " + dayText + " " + timeSlot;
Application.Current?.MainPage?.DisplayAlert("Confirmation", text, "Ok");
calendar.SelectedDate = DateTime.Now.Date; calendar.SelectedDate = DateTime.Now.Date;
calendar.DisplayDate = DateTime.Now.Date; calendar.DisplayDate = DateTime.Now.Date;
this.timeSlot = string.Empty; this.timeSlot = string.Empty;
foreach (Button child in buttonLayout.Children) foreach (Button child in buttonLayout.Children)
{ {
Button button = (Button)child; Button button = (Button)child;
button.TextColor = Colors.Black; button.TextColor = isLightTheme ? Colors.Black : Colors.White;
button.Background = Colors.White; button.Background = isLightTheme ? Colors.White : Color.FromRgba("#1C1B1F");
} }
} }
@ -208,7 +355,9 @@ namespace SampleBrowser.Maui.Calendar.SfCalendar
{ {
if (calendar.SelectedDate == null) 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; return;
} }
@ -223,8 +372,8 @@ namespace SampleBrowser.Maui.Calendar.SfCalendar
continue; continue;
} }
unPressedbutton.TextColor = Colors.Black; unPressedbutton.TextColor = isLightTheme ? Colors.Black : Colors.White;
unPressedbutton.Background = Colors.White; unPressedbutton.Background = isLightTheme ? Colors.White : Color.FromRgba("#1C1B1F");
} }
} }
} }

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

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

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

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

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

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

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

@ -4,10 +4,10 @@
xmlns:local="clr-namespace:SampleBrowser.Maui.Calendar.SfCalendar" xmlns:local="clr-namespace:SampleBrowser.Maui.Calendar.SfCalendar"
xmlns:calendar="clr-namespace:Syncfusion.Maui.Calendar;assembly=Syncfusion.Maui.Calendar" 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"
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> <localCore:SampleView.Content>
<Grid WidthRequest="350" HeightRequest="500"> <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>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="1*"/> <RowDefinition Height="1*"/>
@ -15,14 +15,14 @@
<RowDefinition Height="0.5"/> <RowDefinition Height="0.5"/>
<RowDefinition Height="7*"/> <RowDefinition Height="7*"/>
</Grid.RowDefinitions> </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" /> <Label Grid.Row="1" x:Name="label" FontSize="30" Margin="20,0,0,0" VerticalTextAlignment="Center" VerticalOptions="Center" />
<Line Grid.Row="2" BackgroundColor="LightGrey"/> <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"/> <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> </Grid>
</Frame> </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>
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="1*"/> <RowDefinition Height="1*"/>
@ -53,10 +53,11 @@
FontSize="14" FontSize="14"
VerticalOptions="Center" VerticalOptions="Center"
HorizontalOptions="Start" 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" Margin="5,15,0,0" VerticalOptions="Center"
TextColor="{AppThemeBinding Light={StaticResource PlaceholderTextColourLight}, Dark={StaticResource PlaceholderTextColour}}"
HorizontalOptions="End"/> HorizontalOptions="End"/>
</Grid> </Grid>
</StackLayout> </StackLayout>

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

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

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

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

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

@ -5,14 +5,14 @@
xmlns:thickness ="clr-namespace:Microsoft.Maui;assembly=Microsoft.Maui" xmlns:thickness ="clr-namespace:Microsoft.Maui;assembly=Microsoft.Maui"
xmlns:editors="clr-namespace:Syncfusion.Maui.Inputs;assembly=Syncfusion.Maui.Inputs" xmlns:editors="clr-namespace:Syncfusion.Maui.Inputs;assembly=Syncfusion.Maui.Inputs"
xmlns:calendar="clr-namespace:Syncfusion.Maui.Calendar;assembly=Syncfusion.Maui.Calendar" 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> <localCore:SampleView.Content>
<Grid WidthRequest="350" HeightRequest="400" Padding="0"> <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"/> <calendar:SfCalendar x:Name="HighlightCalendar" AllowViewNavigation="False"/>
</Frame> </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"/> <calendar:SfCalendar x:Name="HighlightCalendar1" AllowViewNavigation="False"/>
</Border> </Border>
</Grid> </Grid>
@ -32,10 +32,10 @@
FontSize="14" FontSize="14"
VerticalOptions="Center" VerticalOptions="Center"
HorizontalOptions="Start" 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" Margin="5,15,0,0" VerticalOptions="Center" TextColor="{AppThemeBinding Light={StaticResource PlaceholderTextColourLight}, Dark={StaticResource PlaceholderTextColour}}"
HorizontalOptions="End" SelectionChanged="comboBox_SelectionChanged"/> HorizontalOptions="End" SelectionChanged="comboBox_SelectionChanged"/>
</Grid> </Grid>
</StackLayout> </StackLayout>

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

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

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

@ -6,11 +6,11 @@
<localCore:SampleView.Content> <localCore:SampleView.Content>
<Grid WidthRequest="{OnPlatform Android=330, Default=350}" HeightRequest="{OnPlatform Android=370, Default=400}" Padding="0"> <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"> <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> </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"> <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> </Border>
</Grid> </Grid>
</localCore:SampleView.Content> </localCore:SampleView.Content>

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

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

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

@ -6,11 +6,11 @@
<localCore:SampleView.Content> <localCore:SampleView.Content>
<Grid WidthRequest="{OnPlatform Android=330, Default=350}" HeightRequest="{OnPlatform Android=370, Default=400}" Padding="0"> <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"> <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> </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"> <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> </Border>
</Grid> </Grid>
</localCore:SampleView.Content> </localCore:SampleView.Content>

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

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

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

@ -2,15 +2,15 @@
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="SampleBrowser.Maui.Calendar.SfCalendar.Month" x:Class="SampleBrowser.Maui.Calendar.SfCalendar.Month"
xmlns:calendar="clr-namespace:Syncfusion.Maui.Calendar;assembly=Syncfusion.Maui.Calendar" 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> <localCore:SampleView.Content>
<Grid WidthRequest="{OnPlatform Android=330, Default=350}" HeightRequest="{OnPlatform Android=370, Default=400}" Padding="0"> <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"> <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> </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"> <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> </Border>
</Grid> </Grid>
</localCore:SampleView.Content> </localCore:SampleView.Content>

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

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

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

@ -6,11 +6,11 @@
<localCore:SampleView.Content> <localCore:SampleView.Content>
<Grid WidthRequest="{OnPlatform Android=330, Default=350}" HeightRequest="{OnPlatform Android=370, Default=400}" Padding="0"> <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"> <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> </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"> <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> </Border>
</Grid> </Grid>

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

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

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

@ -3,11 +3,13 @@
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:SampleBrowser.Maui.Cards" xmlns:local="clr-namespace:SampleBrowser.Maui.Cards"
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"
x:Class="SampleBrowser.Maui.Cards.App"> x:Class="SampleBrowser.Maui.Cards.App">
<Application.Resources> <Application.Resources>
<ResourceDictionary> <ResourceDictionary>
<ResourceDictionary.MergedDictionaries> <ResourceDictionary.MergedDictionaries>
<base:SampleBrowserStyles/> <base:SampleBrowserStyles/>
<syncTheme:SyncfusionThemeResourceDictionary />
</ResourceDictionary.MergedDictionaries> </ResourceDictionary.MergedDictionaries>
</ResourceDictionary> </ResourceDictionary>
</Application.Resources> </Application.Resources>

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

@ -3,11 +3,9 @@
<ControlCategory Name="Layouts"> <ControlCategory Name="Layouts">
<Control Title="Cards" <Control Title="Cards"
Image="cards.png" Image="cards.png"
StatusTag="New" IsPreview="true"
ControlName="SfCards" 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 view" SampleName="CardView" CodeViewerPath="Cards/GettingStarted/"/>
<Sample Title="Card manager" SampleName="CreditCard" CodeViewerPath="Cards/CardManager/"/>
</Control> </Control>
</ControlCategory> </ControlCategory>
</SyncfusionControls> </SyncfusionControls>

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

@ -71,9 +71,11 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="SampleBrowser.Maui.Base" version="24.2.3" /> <PackageReference Include="SampleBrowser.Maui.Base" version="25.1.35" />
<PackageReference Include="Syncfusion.Maui.Cards" version="24.2.3" /> <PackageReference Include="Syncfusion.Maui.Cards" version="25.1.35" />
<PackageReference Include="Syncfusion.Maui.Core" version="24.2.3" /> <PackageReference Include="Syncfusion.Maui.Core" version="25.1.35" />
<PackageReference Include="Syncfusion.Maui.TabView" version="24.2.3" /> <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> </ItemGroup>
</Project> </Project>

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

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

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