v24.1.41
This commit is contained in:
Родитель
efdf267538
Коммит
bfee662e8e
|
@ -28,23 +28,23 @@ public partial class App : MauiWinUIApplication
|
|||
|
||||
protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
|
||||
|
||||
protected override void OnLaunched(LaunchActivatedEventArgs args)
|
||||
{
|
||||
base.OnLaunched(args);
|
||||
protected override void OnLaunched(LaunchActivatedEventArgs args)
|
||||
{
|
||||
base.OnLaunched(args);
|
||||
|
||||
if (IPlatformApplication.Current != null)
|
||||
{
|
||||
foreach (var item in IPlatformApplication.Current.Application.Windows)
|
||||
{
|
||||
var platformWindow = (item?.Handler?.PlatformView as Microsoft.UI.Xaml.Window);
|
||||
if (IPlatformApplication.Current != null)
|
||||
{
|
||||
foreach (var item in IPlatformApplication.Current.Application.Windows)
|
||||
{
|
||||
var platformWindow = (item?.Handler?.PlatformView as Microsoft.UI.Xaml.Window);
|
||||
|
||||
if (platformWindow != null)
|
||||
{
|
||||
platformWindow.ExtendsContentIntoTitleBar = false;
|
||||
platformWindow.Title = ".NET MAUI Accordion Demo";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (platformWindow != null)
|
||||
{
|
||||
platformWindow.ExtendsContentIntoTitleBar = false;
|
||||
platformWindow.Title = ".NET MAUI Accordion Demo";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -89,10 +89,10 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Syncfusion.Maui.Core" version="23.2.4" />
|
||||
<PackageReference Include="Syncfusion.Maui.Expander" version="23.2.4" />
|
||||
<PackageReference Include="Syncfusion.Maui.TabView" version="23.2.4" />
|
||||
<PackageReference Include="SampleBrowser.Maui.Base" version="23.2.4" />
|
||||
<PackageReference Include="Syncfusion.Maui.Core" version="24.1.41" />
|
||||
<PackageReference Include="Syncfusion.Maui.Expander" version="24.1.41" />
|
||||
<PackageReference Include="Syncfusion.Maui.TabView" version="24.1.41" />
|
||||
<PackageReference Include="SampleBrowser.Maui.Base" version="24.1.41" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
@ -83,9 +83,9 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="SampleBrowser.Maui.Base" version="23.2.4" />
|
||||
<PackageReference Include="Syncfusion.Maui.Core" version="23.2.4" />
|
||||
<PackageReference Include="Syncfusion.Maui.TabView" version="23.2.4" />
|
||||
<PackageReference Include="SampleBrowser.Maui.Base" version="24.1.41" />
|
||||
<PackageReference Include="Syncfusion.Maui.Core" version="24.1.41" />
|
||||
<PackageReference Include="Syncfusion.Maui.TabView" version="24.1.41" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
@ -51,7 +51,7 @@
|
|||
<syncfusion:SfAvatarView HorizontalOptions="Start" VerticalOptions="Start" Style="{StaticResource MainAvatarStyle}"/>
|
||||
</syncfusion:SfBadgeView.Content>
|
||||
<syncfusion:SfBadgeView.BadgeSettings>
|
||||
<syncfusion:BadgeSettings Offset="-12,-12"
|
||||
<syncfusion:BadgeSettings Offset="-6,-6"
|
||||
Animation="Scale"
|
||||
Position="BottomRight"
|
||||
Type="Success"
|
||||
|
@ -59,7 +59,7 @@
|
|||
</syncfusion:SfBadgeView.BadgeSettings>
|
||||
</syncfusion:SfBadgeView>
|
||||
<Grid Grid.Row="1" >
|
||||
<VerticalStackLayout Spacing="40" HorizontalOptions="Center" WidthRequest="{OnPlatform iOS='350',MacCatalyst='400',Android='350',WinUI='400'}">
|
||||
<VerticalStackLayout Spacing="40" HorizontalOptions="Center" WidthRequest="{OnPlatform iOS='350',MacCatalyst='400',Android='340',WinUI='400'}">
|
||||
<StackLayout IsVisible="{Binding EditionIsVisible}">
|
||||
<Grid ColumnSpacing="20" RowSpacing="0">
|
||||
<Grid.ColumnDefinitions>
|
||||
|
|
|
@ -78,10 +78,10 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Syncfusion.Maui.Core" version="23.2.4" />
|
||||
<PackageReference Include="SampleBrowser.Maui.Base" version="23.2.4" />
|
||||
<PackageReference Include="Syncfusion.Maui.Sliders" version="23.2.4" />
|
||||
<PackageReference Include="Syncfusion.Maui.TabView" version="23.2.4" />
|
||||
<PackageReference Include="Syncfusion.Maui.Backdrop" version="23.2.4" />
|
||||
<PackageReference Include="Syncfusion.Maui.Core" version="24.1.41" />
|
||||
<PackageReference Include="SampleBrowser.Maui.Base" version="24.1.41" />
|
||||
<PackageReference Include="Syncfusion.Maui.Sliders" version="24.1.41" />
|
||||
<PackageReference Include="Syncfusion.Maui.TabView" version="24.1.41" />
|
||||
<PackageReference Include="Syncfusion.Maui.Backdrop" version="24.1.41" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
|
@ -79,9 +79,9 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="SampleBrowser.Maui.Base" version="23.2.4" />
|
||||
<PackageReference Include="Syncfusion.Maui.Core" version="23.2.4" />
|
||||
<PackageReference Include="Syncfusion.Maui.TabView" version="23.2.4" />
|
||||
<PackageReference Include="SampleBrowser.Maui.Base" version="24.1.41" />
|
||||
<PackageReference Include="Syncfusion.Maui.Core" version="24.1.41" />
|
||||
<PackageReference Include="Syncfusion.Maui.TabView" version="24.1.41" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
@ -78,10 +78,10 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="SampleBrowser.Maui.Base" version="23.2.4" />
|
||||
<PackageReference Include="Syncfusion.Maui.Core" version="23.2.4" />
|
||||
<PackageReference Include="Syncfusion.Maui.TabView" version="23.2.4" />
|
||||
<PackageReference Include="Syncfusion.Maui.Barcode" version="23.2.4" />
|
||||
<PackageReference Include="SampleBrowser.Maui.Base" version="24.1.41" />
|
||||
<PackageReference Include="Syncfusion.Maui.Core" version="24.1.41" />
|
||||
<PackageReference Include="Syncfusion.Maui.TabView" version="24.1.41" />
|
||||
<PackageReference Include="Syncfusion.Maui.Barcode" version="24.1.41" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
@ -78,10 +78,10 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="SampleBrowser.Maui.Base" version="23.2.4" />
|
||||
<PackageReference Include="Syncfusion.Maui.Core" version="23.2.4" />
|
||||
<PackageReference Include="Syncfusion.Maui.TabView" version="23.2.4" />
|
||||
<PackageReference Include="Syncfusion.Maui.Gauges" version="23.2.4" />
|
||||
<PackageReference Include="SampleBrowser.Maui.Base" version="24.1.41" />
|
||||
<PackageReference Include="Syncfusion.Maui.Core" version="24.1.41" />
|
||||
<PackageReference Include="Syncfusion.Maui.TabView" version="24.1.41" />
|
||||
<PackageReference Include="Syncfusion.Maui.Gauges" version="24.1.41" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
@ -84,10 +84,10 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="SampleBrowser.Maui.Base" version="23.2.4" />
|
||||
<PackageReference Include="Syncfusion.Maui.Core" version="23.2.4" />
|
||||
<PackageReference Include="Syncfusion.Maui.Charts" version="23.2.4" />
|
||||
<PackageReference Include="Syncfusion.Maui.TabView" version="23.2.4" />
|
||||
<PackageReference Include="SampleBrowser.Maui.Base" version="24.1.41" />
|
||||
<PackageReference Include="Syncfusion.Maui.Core" version="24.1.41" />
|
||||
<PackageReference Include="Syncfusion.Maui.Charts" version="24.1.41" />
|
||||
<PackageReference Include="Syncfusion.Maui.TabView" version="24.1.41" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
<?xml version = "1.0" encoding = "UTF-8" ?>
|
||||
<Application xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
xmlns:local="clr-namespace:SampleBrowser.Maui.Buttons"
|
||||
xmlns:base="clr-namespace:SampleBrowser.Maui.Base;assembly=SampleBrowser.Maui.Base"
|
||||
x:Class="SampleBrowser.Maui.Buttons.App">
|
||||
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<Application
|
||||
x:Class="SampleBrowser.Maui.Buttons.App"
|
||||
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
xmlns:base="clr-namespace:SampleBrowser.Maui.Base;assembly=SampleBrowser.Maui.Base"
|
||||
xmlns:local="clr-namespace:SampleBrowser.Maui.Buttons">
|
||||
|
||||
<Application.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
|
|
|
@ -5,20 +5,18 @@
|
|||
<Control ControlName="Button"
|
||||
Title="Button"
|
||||
Image="button.png"
|
||||
Description="A button is a UI element for user interaction, representing a one-click or tap action."
|
||||
StatusTag="New"
|
||||
IsPreview="True">
|
||||
Description="A button is a UI element for user interaction, representing a one-click or tap action." >
|
||||
<Sample SampleName="GettingStarted"
|
||||
Title="Getting Started"
|
||||
SearchTags="PrimaryButton, SfButton, Buttons, FlatButton, IconButton, OutlineButton, CircleButton"
|
||||
CodeViewerPath="Button/GettingStarted/"
|
||||
VideoLink=""/>
|
||||
VideoLink="https://www.youtube.com/watch?v=KTGkYShi1YE"/>
|
||||
<Sample SampleName="Customizations"
|
||||
Title="Customizations"
|
||||
IsGettingStarted="True"
|
||||
SearchTags="Button, SfButton, Buttons"
|
||||
CodeViewerPath="Button/Customizations/"
|
||||
VideoLink=""/>
|
||||
VideoLink="https://www.youtube.com/watch?v=KTGkYShi1YE"/>
|
||||
|
||||
|
||||
</Control>
|
||||
|
@ -27,50 +25,64 @@
|
|||
ControlName="SfSegmentedControl"
|
||||
Image="segmentedcontrol.png"
|
||||
Description="Offer choices from a linear set of segments, each as an independent button."
|
||||
SearchTags="SfSegmentedControl,segmented buttons,segment,seg"
|
||||
StatusTag="New"
|
||||
IsPreview="True">
|
||||
SearchTags="SfSegmentedControl,segmented buttons,segment,seg">
|
||||
|
||||
<Sample Title="Getting Started"
|
||||
SampleName="GettingStarted"
|
||||
CodeViewerPath="SegmentedControl/GettingStarted/"/>
|
||||
</Control>
|
||||
|
||||
<Control ControlName="Switch"
|
||||
Title="Switch"
|
||||
Image="switch.png"
|
||||
StatusTag="New"
|
||||
IsPreview="True"
|
||||
Description="The switch is a UI element that allows users to turn an item on and off, and provides an optional indeterminate state." >
|
||||
<Sample SampleName="GettingStarted"
|
||||
Title="Getting Started"
|
||||
SearchTags="switch, threestate, button"
|
||||
StatusTag="New"
|
||||
CodeViewerPath="Switch/GettingStarted/"
|
||||
VideoLink=""/>
|
||||
<Sample SampleName="Features"
|
||||
Title="Features"
|
||||
SearchTags="switch, threestate, button, switchfeatures"
|
||||
StatusTag="New"
|
||||
CodeViewerPath="Switch/Features/"
|
||||
VideoLink=""/>
|
||||
</Control>
|
||||
|
||||
<Control ControlName="CheckBox"
|
||||
Title="CheckBox"
|
||||
Image="checkbox.png"
|
||||
Description="A checkbox allows toggling between two states, useful for binary or multi-choice."
|
||||
StatusTag="New"
|
||||
IsPreview="True">
|
||||
Description="A checkbox is a UI element for toggling between two states, often used for binary choices or multi-selection options." >
|
||||
<Sample SampleName="GettingStarted"
|
||||
Title="Getting Started"
|
||||
SearchTags="checkbox, selection, threestates"
|
||||
CodeViewerPath="CheckBox/GettingStarted/"
|
||||
VideoLink=""/>
|
||||
VideoLink="https://www.youtube.com/watch?v=dgekGX8eYMo"/>
|
||||
<Sample SampleName="Customizations"
|
||||
Title="Customizations"
|
||||
IsGettingStarted="True"
|
||||
SearchTags="checkbox, selection, threestates"
|
||||
CodeViewerPath="CheckBox/Customizations/"
|
||||
VideoLink=""/>
|
||||
VideoLink="https://www.youtube.com/watch?v=dgekGX8eYMo"/>
|
||||
</Control>
|
||||
<Control ControlName="RadioButton"
|
||||
Title="Radio Button"
|
||||
Image="radiobutton.png"
|
||||
Description="A radio button is a user interface element for selecting one exclusive option from a list."
|
||||
StatusTag="New"
|
||||
IsPreview="True">
|
||||
Description="A radio button is a UI element that allows users to select a single option from a list of mutually exclusive choices." >
|
||||
<Sample SampleName="GettingStarted"
|
||||
Title="Getting Started"
|
||||
SearchTags="radiobutton, twostate, button"
|
||||
CodeViewerPath="RadioButton/GettingStarted/"
|
||||
VideoLink=""/>
|
||||
VideoLink="https://www.youtube.com/watch?v=z5EwGpw0KTI"/>
|
||||
<Sample SampleName="Customizations"
|
||||
Title="Customizations"
|
||||
IsGettingStarted="True"
|
||||
SearchTags="radiobutton, twostate, button"
|
||||
CodeViewerPath="RadioButton/Customizations/"
|
||||
VideoLink=""/>
|
||||
VideoLink="https://www.youtube.com/watch?v=z5EwGpw0KTI"/>
|
||||
</Control>
|
||||
</ControlCategory>
|
||||
</SyncfusionControls>
|
||||
|
|
|
@ -88,13 +88,11 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="SampleBrowser.Maui.Base" version="23.2.4" />
|
||||
<PackageReference Include="Syncfusion.Maui.Buttons" version="23.2.4" />
|
||||
<PackageReference Include="Syncfusion.Maui.ListView" version="23.2.4" />
|
||||
<PackageReference Include="Syncfusion.Maui.DataSource" version="23.2.4" />
|
||||
<PackageReference Include="Syncfusion.Maui.GridCommon" version="23.2.4" />
|
||||
<PackageReference Include="Syncfusion.Maui.TabView" version="23.2.4" />
|
||||
<PackageReference Include="Syncfusion.Maui.Core" version="23.2.4" />
|
||||
<PackageReference Include="Syncfusion.Maui.Sliders" version="23.2.4" />
|
||||
<PackageReference Include="SampleBrowser.Maui.Base" version="24.1.41" />
|
||||
<PackageReference Include="Syncfusion.Maui.Buttons" version="24.1.41" />
|
||||
<PackageReference Include="Syncfusion.Maui.ListView" version="24.1.41" />
|
||||
<PackageReference Include="Syncfusion.Maui.TabView" version="24.1.41" />
|
||||
<PackageReference Include="Syncfusion.Maui.Core" version="24.1.41" />
|
||||
<PackageReference Include="Syncfusion.Maui.Sliders" version="24.1.41" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
|
@ -127,7 +127,37 @@
|
|||
<Compile Include="$(MSBuildThisFileDirectory)\Samples\Button\Customizations\ViewModel\ViewModel.cs">
|
||||
<Link>Samples\Button\Customizations\ViewModel\ViewModel.cs</Link>
|
||||
</Compile>
|
||||
|
||||
|
||||
<Compile Include="$(MSBuildThisFileDirectory)\Samples\Switch\GettingStarted\GettingStarted.xaml.cs">
|
||||
<Link>Samples\Switch\GettingStarted\GettingStarted.xaml.cs</Link>
|
||||
<DependentUpon>GettingStarted.xaml</DependentUpon>
|
||||
</Compile>
|
||||
|
||||
<Compile Include="$(MSBuildThisFileDirectory)\Samples\Switch\GettingStarted\GettingStartedDesktop.xaml.cs">
|
||||
<Link>Samples\Switch\GettingStarted\GettingStartedDesktop.xaml.cs</Link>
|
||||
<DependentUpon>GettingStartedDesktop.xaml</DependentUpon>
|
||||
</Compile>
|
||||
|
||||
<Compile Include="$(MSBuildThisFileDirectory)\Samples\Switch\GettingStarted\GettingStartedMobile.xaml.cs">
|
||||
<Link>Samples\Switch\GettingStarted\GettingStartedMobile.xaml.cs</Link>
|
||||
<DependentUpon>GettingStartedMobile.xaml</DependentUpon>
|
||||
</Compile>
|
||||
|
||||
<Compile Include="$(MSBuildThisFileDirectory)\Samples\Switch\Features\Features.xaml.cs">
|
||||
<Link>Samples\Switch\Features\Features.xaml.cs</Link>
|
||||
<DependentUpon>Features.xaml</DependentUpon>
|
||||
</Compile>
|
||||
|
||||
<Compile Include="$(MSBuildThisFileDirectory)\Samples\Switch\Features\FeaturesDesktop.xaml.cs">
|
||||
<Link>Samples\Switch\Features\FeaturesDesktop.xaml.cs</Link>
|
||||
<DependentUpon>FeaturesDesktop.xaml</DependentUpon>
|
||||
</Compile>
|
||||
|
||||
<Compile Include="$(MSBuildThisFileDirectory)\Samples\Switch\Features\FeaturesMobile.xaml.cs">
|
||||
<Link>Samples\Switch\Features\FeaturesMobile.xaml.cs</Link>
|
||||
<DependentUpon>FeaturesMobile.xaml</DependentUpon>
|
||||
</Compile>
|
||||
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
@ -262,4 +292,40 @@
|
|||
<Link>Samples\Button\Customizations\View\CustomizationsMobile.xaml</Link>
|
||||
</MauiXaml>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<MauiXaml Include="$(MSBuildThisFileDirectory)\Samples\Switch\GettingStarted\GettingStarted.xaml">
|
||||
<Link>Samples\Switch\GettingStarted\GettingStarted.xaml</Link>
|
||||
</MauiXaml>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<MauiXaml Include="$(MSBuildThisFileDirectory)\Samples\Switch\GettingStarted\GettingStartedDesktop.xaml">
|
||||
<Link>Samples\Switch\GettingStarted\GettingStartedDesktop.xaml</Link>
|
||||
</MauiXaml>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<MauiXaml Include="$(MSBuildThisFileDirectory)\Samples\Switch\GettingStarted\GettingStartedMobile.xaml">
|
||||
<Link>Samples\Switch\GettingStarted\GettingStartedMobile.xaml</Link>
|
||||
</MauiXaml>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<MauiXaml Include="$(MSBuildThisFileDirectory)\Samples\Switch\Features\Features.xaml">
|
||||
<Link>Samples\Switch\Features\Features.xaml</Link>
|
||||
</MauiXaml>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<MauiXaml Include="$(MSBuildThisFileDirectory)\Samples\Switch\Features\FeaturesDesktop.xaml">
|
||||
<Link>Samples\Switch\Features\FeaturesDesktop.xaml</Link>
|
||||
</MauiXaml>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<MauiXaml Include="$(MSBuildThisFileDirectory)\Samples\Switch\Features\FeaturesMobile.xaml">
|
||||
<Link>Samples\Switch\Features\FeaturesMobile.xaml</Link>
|
||||
</MauiXaml>
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -176,7 +176,7 @@
|
|||
|
||||
</button:SfButton>
|
||||
<button:SfButton Grid.Row="2" Grid.Column="0" Text="Linear Gradient" TextColor="White" CornerRadius="25,50,25,50" Style="{StaticResource linearVisualStyle}"/>
|
||||
<button:SfButton Grid.Row="0" Grid.Column="1" Text="Normal Button" Background="#D8D6D7" Style="{StaticResource sfButtonStyle}"/>
|
||||
<button:SfButton Grid.Row="0" Grid.Column="1" Text="Normal Button" Background="#D8D6D7" TextColor="Black" Style="{StaticResource sfButtonStyle}"/>
|
||||
<button:SfButton Grid.Row="0" Grid.Column="2" Text="Outline Button" TextColor="Blue" CornerRadius="0" Background="White" Stroke="Blue" StrokeThickness="2" Style="{StaticResource sfButtonStyle}"/>
|
||||
<button:SfButton Grid.Row="1" Grid.Column="2" Style="{StaticResource sfButtonStyle}">
|
||||
<button:SfButton.Content>
|
||||
|
|
|
@ -175,7 +175,7 @@
|
|||
|
||||
</button:SfButton>
|
||||
<button:SfButton Grid.Row="4" Grid.Column="0" Text="Linear Gradient" TextColor="White" CornerRadius="25,50,25,50" Style="{StaticResource linearVisualStyle}"/>
|
||||
<button:SfButton Grid.Row="0" Grid.Column="1" Text="Normal Button" Background="#D8D6D7" Style="{StaticResource sfButtonStyle}"/>
|
||||
<button:SfButton Grid.Row="0" Grid.Column="1" Text="Normal Button" Background="#D8D6D7" TextColor="Black" Style="{StaticResource sfButtonStyle}"/>
|
||||
<button:SfButton Grid.Row="1" Grid.Column="1" Text="Outline Button" TextColor="Blue" CornerRadius="0" Background="White" Stroke="Blue" StrokeThickness="2" Style="{StaticResource sfButtonStyle}"/>
|
||||
<button:SfButton Grid.Row="2" Grid.Column="1" Style="{StaticResource sfButtonStyle}">
|
||||
<button:SfButton.Content>
|
||||
|
|
|
@ -86,6 +86,7 @@
|
|||
Stroke="Transparent"
|
||||
SegmentWidth="38"
|
||||
HorizontalOptions="Start"
|
||||
Margin="-2,-2,0,0"
|
||||
WidthRequest="210"
|
||||
SegmentHeight="36"
|
||||
CornerRadius="36"
|
||||
|
@ -97,12 +98,6 @@
|
|||
<buttons:SelectionIndicatorSettings SelectionIndicatorPlacement="Border"
|
||||
Background="#6200EE" />
|
||||
</buttons:SfSegmentedControl.SelectionIndicatorSettings>
|
||||
<buttons:SfSegmentedControl.Margin>
|
||||
<OnPlatform x:TypeArguments="thickness:Thickness">
|
||||
<On Platform="MacCatalyst" Value="-2,-2,0,0"/>
|
||||
<On Platform="WinUI" Value="-4,-4,0,0"/>
|
||||
</OnPlatform>
|
||||
</buttons:SfSegmentedControl.Margin>
|
||||
</buttons:SfSegmentedControl>
|
||||
</StackLayout>
|
||||
|
||||
|
@ -115,7 +110,7 @@
|
|||
<buttons:SfSegmentedControl x:Name="segmentedControlWarrantyOption"
|
||||
SegmentHeight="38"
|
||||
VerticalOptions="FillAndExpand"
|
||||
Margin="0,5,0,0"
|
||||
Margin="2,5,0,0"
|
||||
HorizontalOptions="Start"
|
||||
WidthRequest="312"
|
||||
SegmentWidth="103"
|
||||
|
@ -146,8 +141,8 @@
|
|||
<buttons:SfSegmentedControl x:Name="segmentedControlDeliveryOption"
|
||||
StrokeThickness="10"
|
||||
SegmentCornerRadius="30"
|
||||
Margin="-12,-10,0,0"
|
||||
SegmentHeight="30"
|
||||
Margin="-6,0,0,0"
|
||||
CornerRadius="30"
|
||||
HeightRequest="50"
|
||||
WidthRequest="330"
|
||||
|
@ -163,12 +158,6 @@
|
|||
<buttons:SfSegmentedControl.SelectionIndicatorSettings>
|
||||
<buttons:SelectionIndicatorSettings Background="#6200EE" />
|
||||
</buttons:SfSegmentedControl.SelectionIndicatorSettings>
|
||||
<buttons:SfSegmentedControl.Margin>
|
||||
<OnPlatform x:TypeArguments="thickness:Thickness">
|
||||
<On Platform="MacCatalyst" Value="-8,0,0,0"/>
|
||||
<On Platform="WinUI" Value="-12,0,0,0"/>
|
||||
</OnPlatform>
|
||||
</buttons:SfSegmentedControl.Margin>
|
||||
</buttons:SfSegmentedControl>
|
||||
</HorizontalStackLayout>
|
||||
</StackLayout>
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
Text="Pick a Color"
|
||||
Margin="2,0,0,0"/>
|
||||
<buttons:SfSegmentedControl x:Name="segmentedControlColorOption"
|
||||
StrokeThickness="{OnPlatform Android=3,iOS=2}"
|
||||
StrokeThickness="3"
|
||||
Stroke="Transparent"
|
||||
SegmentWidth="{OnPlatform Android=35,iOS=36}"
|
||||
HorizontalOptions="Start"
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<localcore:SampleView
|
||||
x:Class="SampleBrowser.Maui.Buttons.Switch.Features"
|
||||
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
xmlns:button="clr-namespace:Syncfusion.Maui.Buttons;assembly=Syncfusion.Maui.Buttons"
|
||||
xmlns:ev="clr-namespace:Syncfusion.Maui.Core;assembly=Syncfusion.Maui.Core"
|
||||
xmlns:local="clr-namespace:SampleBrowser.Maui.Buttons.Switch"
|
||||
xmlns:localcore="clr-namespace:SampleBrowser.Maui.Base;assembly=SampleBrowser.Maui.Base"
|
||||
Background="White" />
|
|
@ -0,0 +1,25 @@
|
|||
#region Copyright Syncfusion Inc. 2001-2023.
|
||||
// Copyright Syncfusion Inc. 2001-2023. All rights reserved.
|
||||
// Use of this code is subject to the terms of our license.
|
||||
// A copy of the current license can be obtained at any time by e-mailing
|
||||
// licensing@syncfusion.com. Any infringement will be prosecuted under
|
||||
// applicable laws.
|
||||
#endregion
|
||||
using SampleBrowser.Maui.Base;
|
||||
|
||||
namespace SampleBrowser.Maui.Buttons.Switch
|
||||
{
|
||||
public partial class Features : SampleView
|
||||
{
|
||||
public Features()
|
||||
{
|
||||
InitializeComponent();
|
||||
#if ANDROID || IOS
|
||||
this.Content = new FeaturesDesktop();
|
||||
#elif WINDOWS || MACCATALYST
|
||||
this.Content = new FeaturesDesktop();
|
||||
#endif
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,568 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<localcore:SampleView
|
||||
x:Class="SampleBrowser.Maui.Buttons.Switch.FeaturesDesktop"
|
||||
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
xmlns:ev="clr-namespace:Syncfusion.Maui.Core;assembly=Syncfusion.Maui.Core"
|
||||
xmlns:local="clr-namespace:SampleBrowser.Maui.Buttons.Switch"
|
||||
xmlns:localcore="clr-namespace:SampleBrowser.Maui.Base;assembly=SampleBrowser.Maui.Base"
|
||||
xmlns:syncfusion="clr-namespace:Syncfusion.Maui.Buttons;assembly=Syncfusion.Maui.Buttons">
|
||||
|
||||
<localcore:SampleView.Resources>
|
||||
|
||||
<Style x:Key="AndroidStyle" TargetType="syncfusion:SfSwitch">
|
||||
<Setter Property="VisualStateManager.VisualStateGroups">
|
||||
<Setter.Value>
|
||||
<VisualStateGroupList>
|
||||
<VisualStateGroup x:Name="CommonStates">
|
||||
<VisualState x:Name="On">
|
||||
<VisualState.Setters>
|
||||
<Setter Property="SwitchSettings">
|
||||
<Setter.Value>
|
||||
<syncfusion:SwitchSettings
|
||||
ThumbBackground="#005FB8"
|
||||
ThumbCornerRadius="15"
|
||||
ThumbHeightRequest="30"
|
||||
ThumbStroke="#005FB8"
|
||||
ThumbStrokeThickness="1"
|
||||
ThumbWidthRequest="30"
|
||||
TrackBackground="#91caff"
|
||||
TrackHeightRequest="22"
|
||||
TrackStroke="#91caff"
|
||||
TrackStrokeThickness="0"
|
||||
TrackWidthRequest="52" />
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
<VisualState x:Name="Off">
|
||||
<VisualState.Setters>
|
||||
<Setter Property="SwitchSettings">
|
||||
<Setter.Value>
|
||||
<syncfusion:SwitchSettings
|
||||
ThumbBackground="White"
|
||||
ThumbCornerRadius="15"
|
||||
ThumbHeightRequest="30"
|
||||
ThumbStroke="Gray"
|
||||
ThumbStrokeThickness="1"
|
||||
ThumbWidthRequest="30"
|
||||
TrackBackground="DimGray"
|
||||
TrackHeightRequest="22"
|
||||
TrackStroke="Black"
|
||||
TrackStrokeThickness="0"
|
||||
TrackWidthRequest="52" />
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
</VisualStateGroup>
|
||||
</VisualStateGroupList>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="WindowsStyle" TargetType="syncfusion:SfSwitch">
|
||||
<Setter Property="VisualStateManager.VisualStateGroups">
|
||||
<Setter.Value>
|
||||
<VisualStateGroupList>
|
||||
<VisualStateGroup x:Name="CommonStates">
|
||||
<VisualState x:Name="Off">
|
||||
<VisualState.Setters>
|
||||
<Setter Property="SwitchSettings">
|
||||
<Setter.Value>
|
||||
<syncfusion:SwitchSettings
|
||||
ThumbBackground="#606060"
|
||||
ThumbCornerRadius="6"
|
||||
ThumbHeightRequest="11"
|
||||
ThumbStroke="#606060"
|
||||
ThumbWidthRequest="11"
|
||||
TrackBackground="White"
|
||||
TrackHeightRequest="19"
|
||||
TrackStroke="#79747E"
|
||||
ThumbStrokeThickness="1"
|
||||
TrackStrokeThickness="1"
|
||||
TrackWidthRequest="39" />
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
<VisualState x:Name="OffPressed">
|
||||
<VisualState.Setters>
|
||||
<Setter Property="SwitchSettings">
|
||||
<Setter.Value>
|
||||
<syncfusion:SwitchSettings
|
||||
ThumbBackground="#606060"
|
||||
ThumbCornerRadius="7"
|
||||
ThumbHeightRequest="13"
|
||||
ThumbStroke="#606060"
|
||||
ThumbWidthRequest="13"
|
||||
TrackBackground="White"
|
||||
TrackHeightRequest="19"
|
||||
TrackStroke="#79747E"
|
||||
ThumbStrokeThickness="1"
|
||||
TrackStrokeThickness="1"
|
||||
TrackWidthRequest="39" />
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
<VisualState x:Name="OffHovered">
|
||||
<VisualState.Setters>
|
||||
<Setter Property="SwitchSettings">
|
||||
<Setter.Value>
|
||||
<syncfusion:SwitchSettings
|
||||
ThumbBackground="#606060"
|
||||
ThumbCornerRadius="7"
|
||||
ThumbHeightRequest="13"
|
||||
ThumbStroke="#606060"
|
||||
ThumbWidthRequest="13"
|
||||
TrackBackground="White"
|
||||
TrackHeightRequest="19"
|
||||
TrackStroke="#79747E"
|
||||
ThumbStrokeThickness="1"
|
||||
TrackStrokeThickness="1"
|
||||
TrackWidthRequest="39" />
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
<VisualState x:Name="On">
|
||||
<VisualState.Setters>
|
||||
<Setter Property="SwitchSettings">
|
||||
<Setter.Value>
|
||||
<syncfusion:SwitchSettings
|
||||
ThumbBackground="White"
|
||||
ThumbCornerRadius="6"
|
||||
ThumbHeightRequest="11"
|
||||
ThumbStroke="White"
|
||||
ThumbWidthRequest="11"
|
||||
TrackBackground="#0559A6"
|
||||
TrackHeightRequest="19"
|
||||
TrackStroke="#0559A6"
|
||||
ThumbStrokeThickness="1"
|
||||
TrackStrokeThickness="1"
|
||||
TrackWidthRequest="39" />
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
<VisualState x:Name="OnPressed">
|
||||
<VisualState.Setters>
|
||||
<Setter Property="SwitchSettings">
|
||||
<Setter.Value>
|
||||
<syncfusion:SwitchSettings
|
||||
ThumbBackground="White"
|
||||
ThumbCornerRadius="7"
|
||||
ThumbHeightRequest="13"
|
||||
ThumbStroke="White"
|
||||
ThumbWidthRequest="13"
|
||||
TrackBackground="#1C6BB3"
|
||||
TrackHeightRequest="19"
|
||||
TrackStroke="#1C6BB3"
|
||||
ThumbStrokeThickness="1"
|
||||
TrackStrokeThickness="1"
|
||||
TrackWidthRequest="39" />
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
<VisualState x:Name="OnHovered">
|
||||
<VisualState.Setters>
|
||||
<Setter Property="SwitchSettings">
|
||||
<Setter.Value>
|
||||
<syncfusion:SwitchSettings
|
||||
ThumbBackground="White"
|
||||
ThumbCornerRadius="7"
|
||||
ThumbHeightRequest="13"
|
||||
ThumbStroke="White"
|
||||
ThumbWidthRequest="13"
|
||||
TrackBackground="#1C6BB3"
|
||||
TrackHeightRequest="19"
|
||||
TrackStroke="#1C6BB3"
|
||||
ThumbStrokeThickness="1"
|
||||
TrackStrokeThickness="1"
|
||||
TrackWidthRequest="39" />
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
</VisualStateGroup>
|
||||
</VisualStateGroupList>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="iOSStyle" TargetType="syncfusion:SfSwitch">
|
||||
<Setter Property="VisualStateManager.VisualStateGroups">
|
||||
<Setter.Value>
|
||||
<VisualStateGroupList>
|
||||
<VisualStateGroup x:Name="CommonStates">
|
||||
<VisualState x:Name="On">
|
||||
<VisualState.Setters>
|
||||
<Setter Property="SwitchSettings">
|
||||
<Setter.Value>
|
||||
<syncfusion:SwitchSettings
|
||||
ThumbBackground="White"
|
||||
ThumbCornerRadius="15"
|
||||
ThumbHeightRequest="26"
|
||||
ThumbStroke="White"
|
||||
ThumbStrokeThickness="1"
|
||||
ThumbWidthRequest="26"
|
||||
TrackBackground="#0559A6"
|
||||
TrackHeightRequest="28"
|
||||
TrackStroke="#0559A6"
|
||||
TrackStrokeThickness="1.5"
|
||||
TrackWidthRequest="48" />
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
<VisualState x:Name="Off">
|
||||
<VisualState.Setters>
|
||||
<Setter Property="SwitchSettings">
|
||||
<Setter.Value>
|
||||
<syncfusion:SwitchSettings
|
||||
ThumbBackground="White"
|
||||
ThumbCornerRadius="15"
|
||||
ThumbHeightRequest="26"
|
||||
ThumbStroke="#D2D2D1"
|
||||
ThumbStrokeThickness="1"
|
||||
ThumbWidthRequest="26"
|
||||
TrackBackground="White"
|
||||
TrackHeightRequest="28"
|
||||
TrackStroke="#D2D2D1"
|
||||
TrackStrokeThickness="1.5"
|
||||
TrackWidthRequest="48" />
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
</VisualStateGroup>
|
||||
</VisualStateGroupList>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="SolidStyle" TargetType="syncfusion:SfSwitch">
|
||||
<Setter Property="VisualStateManager.VisualStateGroups">
|
||||
<Setter.Value>
|
||||
<VisualStateGroupList>
|
||||
<VisualStateGroup x:Name="CommonStates">
|
||||
<VisualState x:Name="On">
|
||||
<VisualState.Setters>
|
||||
<Setter Property="SwitchSettings">
|
||||
<Setter.Value>
|
||||
<syncfusion:SwitchSettings
|
||||
ThumbBackground="#FF029BFF"
|
||||
ThumbHeightRequest="24"
|
||||
ThumbStroke="#FF029BFF"
|
||||
ThumbStrokeThickness="0.5"
|
||||
ThumbWidthRequest="24"
|
||||
TrackBackground="#22029BFF"
|
||||
TrackStroke="#22029BFF"
|
||||
TrackStrokeThickness="0.5" />
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
<VisualState x:Name="Off">
|
||||
<VisualState.Setters>
|
||||
<Setter Property="SwitchSettings">
|
||||
<Setter.Value>
|
||||
<syncfusion:SwitchSettings
|
||||
ThumbBackground="#FFFF0199"
|
||||
ThumbStroke="#FFFF0199"
|
||||
ThumbStrokeThickness="0.5"
|
||||
TrackBackground="#22FF0199"
|
||||
TrackStroke="#22FF0199"
|
||||
TrackStrokeThickness="0.5" />
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
<VisualState x:Name="Indeterminate">
|
||||
<VisualState.Setters>
|
||||
<Setter Property="SwitchSettings">
|
||||
<Setter.Value>
|
||||
<syncfusion:SwitchSettings
|
||||
ThumbHeightRequest="20"
|
||||
ThumbWidthRequest="20"
|
||||
ThumbBackground="#9ACB0D"
|
||||
ThumbStroke="#9ACB0D"
|
||||
ThumbStrokeThickness="0.5"
|
||||
TrackBackground="#D2F768"
|
||||
TrackStroke="#D2F768"
|
||||
TrackStrokeThickness="0.5" />
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
|
||||
</VisualStateGroup>
|
||||
</VisualStateGroupList>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
|
||||
</localcore:SampleView.Resources>
|
||||
|
||||
|
||||
<localcore:SampleView.Content>
|
||||
<ScrollView x:Name="scrollView" HorizontalScrollBarVisibility="Never">
|
||||
<ScrollView.Resources>
|
||||
<ResourceDictionary>
|
||||
<Style TargetType="Label">
|
||||
<Setter Property="Margin" Value="15,0" />
|
||||
<Setter Property="FontFamily" Value="Roboto" />
|
||||
<Setter Property="TextColor" Value="#1C1B1F" />
|
||||
<Setter Property="VerticalOptions" Value="Center" />
|
||||
<Setter Property="HorizontalOptions" Value="Center" />
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
</ScrollView.Resources>
|
||||
<VerticalStackLayout
|
||||
x:Name="mainStack"
|
||||
HorizontalOptions="Start"
|
||||
WidthRequest="350">
|
||||
<Label
|
||||
FontSize="16"
|
||||
Margin="30,10,10,0"
|
||||
HorizontalOptions="Start"
|
||||
Text="Visual Types"
|
||||
VerticalOptions="Center" />
|
||||
|
||||
<Grid Margin="0,10,10,10"
|
||||
HeightRequest="75">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<syncfusion:SfSwitch
|
||||
Grid.Row="0"
|
||||
Grid.Column="0"
|
||||
AllowIndeterminateState="False"
|
||||
IsOn="True"/>
|
||||
<syncfusion:SfSwitch
|
||||
Grid.Row="0"
|
||||
Grid.Column="1"
|
||||
AllowIndeterminateState="False"
|
||||
IsOn="True"
|
||||
Style="{StaticResource iOSStyle}" />
|
||||
<syncfusion:SfSwitch
|
||||
Grid.Row="0"
|
||||
Grid.Column="2"
|
||||
AllowIndeterminateState="False"
|
||||
IsOn="True"
|
||||
Style="{StaticResource WindowsStyle}" />
|
||||
<Label
|
||||
Grid.Row="1"
|
||||
Grid.Column="0"
|
||||
FontSize="12"
|
||||
Text="Material 3"/>
|
||||
<Label
|
||||
Grid.Row="1"
|
||||
Grid.Column="1"
|
||||
FontSize="12"
|
||||
Text="Cupertino" />
|
||||
<Label
|
||||
Grid.Row="1"
|
||||
Grid.Column="2"
|
||||
FontSize="12"
|
||||
Text="Fluent"/>
|
||||
</Grid>
|
||||
|
||||
<Grid HeightRequest="10" />
|
||||
<Label
|
||||
FontSize="16"
|
||||
Margin="30,0,10,0"
|
||||
HorizontalOptions="Start"
|
||||
Text="Enabled States" />
|
||||
|
||||
<Grid
|
||||
Margin="0,10,10,10"
|
||||
BackgroundColor="White"
|
||||
HeightRequest="75">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<syncfusion:SfSwitch
|
||||
x:Name="OnStateSwitch"
|
||||
Grid.Row="0"
|
||||
Grid.Column="0"
|
||||
AllowIndeterminateState="True"
|
||||
IsOn="False"
|
||||
StateChanged="SfSwitch_StateChanged" />
|
||||
<syncfusion:SfSwitch
|
||||
x:Name="IndeterminateStateSwitch"
|
||||
Grid.Row="0"
|
||||
Grid.Column="1"
|
||||
AllowIndeterminateState="True"
|
||||
IsOn="{x:Null}"
|
||||
StateChanged="SfSwitch_StateChanged_1" />
|
||||
<syncfusion:SfSwitch
|
||||
x:Name="OffStateSwitch"
|
||||
Grid.Row="0"
|
||||
Grid.Column="2"
|
||||
AllowIndeterminateState="True"
|
||||
IsOn="True"
|
||||
StateChanged="SfSwitch_StateChanged_2" />
|
||||
<Label
|
||||
x:Name="OnStateLabel"
|
||||
Grid.Row="1"
|
||||
Grid.Column="0"
|
||||
FontSize="12"
|
||||
Text="Off" />
|
||||
<Label
|
||||
x:Name="IndeterminateStateLabel"
|
||||
Grid.Row="1"
|
||||
Grid.Column="1"
|
||||
FontSize="12"
|
||||
Text="Indeterminate" />
|
||||
<Label
|
||||
x:Name="OffStateLabel"
|
||||
Grid.Row="1"
|
||||
Grid.Column="2"
|
||||
FontSize="12"
|
||||
Text="On" />
|
||||
</Grid>
|
||||
<Grid HeightRequest="10" />
|
||||
|
||||
<Label
|
||||
FontSize="16"
|
||||
Margin="30,0,10,0"
|
||||
HorizontalOptions="Start"
|
||||
Text="Disabled States"/>
|
||||
|
||||
<Grid
|
||||
Margin="0,10,10,10"
|
||||
BackgroundColor="White"
|
||||
HeightRequest="70">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<syncfusion:SfSwitch
|
||||
Grid.Row="0"
|
||||
Grid.Column="0"
|
||||
AllowIndeterminateState="True"
|
||||
IsEnabled="False"
|
||||
IsOn="False" />
|
||||
<syncfusion:SfSwitch
|
||||
Grid.Row="0"
|
||||
Grid.Column="1"
|
||||
AllowIndeterminateState="True"
|
||||
IsEnabled="False"
|
||||
IsOn="{x:Null}" />
|
||||
<syncfusion:SfSwitch
|
||||
Grid.Row="0"
|
||||
Grid.Column="2"
|
||||
AllowIndeterminateState="True"
|
||||
IsEnabled="False"
|
||||
IsOn="True" />
|
||||
<Label
|
||||
Grid.Row="1"
|
||||
Grid.Column="0"
|
||||
FontSize="12"
|
||||
Text="Off" />
|
||||
<Label
|
||||
Grid.Row="1"
|
||||
Grid.Column="1"
|
||||
FontSize="12"
|
||||
Text="Indeterminate" />
|
||||
<Label
|
||||
Grid.Row="1"
|
||||
Grid.Column="2"
|
||||
FontSize="12"
|
||||
Text="On"/>
|
||||
</Grid>
|
||||
|
||||
<Grid HeightRequest="10" />
|
||||
|
||||
<Label
|
||||
FontSize="16"
|
||||
Margin="30,0,10,0"
|
||||
HorizontalOptions="Start"
|
||||
Text="Colors"/>
|
||||
|
||||
|
||||
<Grid
|
||||
Margin="0,10,10,10"
|
||||
BackgroundColor="White"
|
||||
HeightRequest="70">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
<RowDefinition Height="*" />
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="*" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<syncfusion:SfSwitch Style="{StaticResource SolidStyle}"
|
||||
x:Name="solidOnSwitch"
|
||||
Grid.Row="0"
|
||||
Grid.Column="0"
|
||||
AllowIndeterminateState="True"
|
||||
IsOn="False"
|
||||
StateChanged="SolidSfSwitch_StateChanged" />
|
||||
|
||||
<syncfusion:SfSwitch Style="{StaticResource SolidStyle}"
|
||||
x:Name="solidIndeterminateSwitch"
|
||||
Grid.Row="0"
|
||||
Grid.Column="1"
|
||||
AllowIndeterminateState="True"
|
||||
IsOn="{x:Null}"
|
||||
StateChanged="SolidSfSwitch_StateChanged_1"/>
|
||||
|
||||
<syncfusion:SfSwitch Style="{StaticResource SolidStyle}"
|
||||
x:Name="solidOffSwitch"
|
||||
Grid.Row="0"
|
||||
Grid.Column="2"
|
||||
AllowIndeterminateState="True"
|
||||
IsOn="True"
|
||||
StateChanged="SolidSfSwitch_StateChanged_2" />
|
||||
|
||||
<Label x:Name="solidOnLabel"
|
||||
Grid.Row="1"
|
||||
Grid.Column="0"
|
||||
FontSize="12"
|
||||
Text="Off" />
|
||||
<Label x:Name="solidIndeterminateLabel"
|
||||
Grid.Row="1"
|
||||
Grid.Column="1"
|
||||
FontSize="12"
|
||||
Text="Indeterminate"/>
|
||||
|
||||
<Label x:Name="solidOffLabel"
|
||||
Grid.Row="1"
|
||||
Grid.Column="3"
|
||||
FontSize="12"
|
||||
Text="On"/>
|
||||
|
||||
</Grid>
|
||||
|
||||
<Grid HeightRequest="10" />
|
||||
|
||||
|
||||
</VerticalStackLayout>
|
||||
</ScrollView>
|
||||
</localcore:SampleView.Content>
|
||||
|
||||
</localcore:SampleView>
|
|
@ -0,0 +1,230 @@
|
|||
#region Copyright Syncfusion Inc. 2001-2023.
|
||||
// Copyright Syncfusion Inc. 2001-2023. All rights reserved.
|
||||
// Use of this code is subject to the terms of our license.
|
||||
// A copy of the current license can be obtained at any time by e-mailing
|
||||
// licensing@syncfusion.com. Any infringement will be prosecuted under
|
||||
// applicable laws.
|
||||
#endregion
|
||||
using SampleBrowser.Maui.Base;
|
||||
using Syncfusion.Maui.Buttons;
|
||||
|
||||
namespace SampleBrowser.Maui.Buttons.Switch;
|
||||
public partial class FeaturesDesktop : SampleView
|
||||
{
|
||||
public FeaturesDesktop()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
|
||||
bool setState = false;
|
||||
bool setSolidState = false;
|
||||
|
||||
private void SfSwitch_StateChanged(object sender, SwitchStateChangedEventArgs e)
|
||||
{
|
||||
if (this.OnStateLabel != null && this.OnStateSwitch != null)
|
||||
{
|
||||
this.OnStateLabel.Text = GetLabel(this.OnStateSwitch.IsOn);
|
||||
setStates(true, this.OnStateSwitch.IsOn);
|
||||
}
|
||||
}
|
||||
|
||||
private void SfSwitch_StateChanged_1(object sender, SwitchStateChangedEventArgs e)
|
||||
{
|
||||
if (this.IndeterminateStateLabel != null && this.IndeterminateStateSwitch != null)
|
||||
{
|
||||
|
||||
this.IndeterminateStateLabel.Text = GetLabel(this.IndeterminateStateSwitch.IsOn);
|
||||
setStates(null, this.IndeterminateStateSwitch.IsOn);
|
||||
}
|
||||
}
|
||||
|
||||
private void SfSwitch_StateChanged_2(object sender, SwitchStateChangedEventArgs e)
|
||||
{
|
||||
if (this.OffStateLabel != null && this.OffStateSwitch != null)
|
||||
{
|
||||
this.OffStateLabel.Text = GetLabel(this.OffStateSwitch.IsOn);
|
||||
setStates(false, this.OffStateSwitch.IsOn);
|
||||
}
|
||||
}
|
||||
|
||||
private string GetLabel(bool? value)
|
||||
{
|
||||
if (value == true)
|
||||
return "On";
|
||||
else if (value == false)
|
||||
return "Off";
|
||||
else
|
||||
return "Indeterminate";
|
||||
}
|
||||
|
||||
private async void setStates(bool? value, bool? state)
|
||||
{
|
||||
if (setState)
|
||||
return;
|
||||
setState = true;
|
||||
|
||||
if (value == true)
|
||||
{
|
||||
if (state == true)
|
||||
{
|
||||
this.IndeterminateStateSwitch.IsOn = null;
|
||||
this.OffStateSwitch.IsOn = false;
|
||||
}
|
||||
else if (state == false)
|
||||
{
|
||||
this.IndeterminateStateSwitch.IsOn = null;
|
||||
this.OffStateSwitch.IsOn = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.IndeterminateStateSwitch.IsOn = false;
|
||||
this.OffStateSwitch.IsOn = true;
|
||||
}
|
||||
|
||||
}
|
||||
else if (value == false)
|
||||
{
|
||||
if (state == true)
|
||||
{
|
||||
this.IndeterminateStateSwitch.IsOn = null;
|
||||
this.OnStateSwitch.IsOn = false;
|
||||
}
|
||||
else if (state == false)
|
||||
{
|
||||
this.IndeterminateStateSwitch.IsOn = null;
|
||||
this.OnStateSwitch.IsOn = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.IndeterminateStateSwitch.IsOn = false;
|
||||
this.OnStateSwitch.IsOn = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (state == true)
|
||||
{
|
||||
this.OnStateSwitch.IsOn = null;
|
||||
this.OffStateSwitch.IsOn = false;
|
||||
}
|
||||
else if (state == false)
|
||||
{
|
||||
this.OnStateSwitch.IsOn = true;
|
||||
this.OffStateSwitch.IsOn = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.OnStateSwitch.IsOn = true;
|
||||
this.OffStateSwitch.IsOn = false;
|
||||
}
|
||||
}
|
||||
|
||||
await Task.Delay(100);
|
||||
setState = false;
|
||||
}
|
||||
|
||||
private void SolidSfSwitch_StateChanged(object sender, SwitchStateChangedEventArgs e)
|
||||
{
|
||||
if (this.solidOnLabel != null && this.solidOnSwitch != null)
|
||||
{
|
||||
this.solidOnLabel.Text = GetSolidLabel(this.solidOnSwitch.IsOn);
|
||||
setSolidStates(true, this.solidOnSwitch.IsOn);
|
||||
}
|
||||
}
|
||||
|
||||
private void SolidSfSwitch_StateChanged_1(object sender, SwitchStateChangedEventArgs e)
|
||||
{
|
||||
if (this.solidIndeterminateLabel != null && this.solidIndeterminateSwitch != null)
|
||||
{
|
||||
|
||||
this.solidIndeterminateLabel.Text = GetSolidLabel(this.solidIndeterminateSwitch.IsOn);
|
||||
setSolidStates(null, this.solidIndeterminateSwitch.IsOn);
|
||||
}
|
||||
}
|
||||
|
||||
private void SolidSfSwitch_StateChanged_2(object sender, SwitchStateChangedEventArgs e)
|
||||
{
|
||||
if (this.solidOffLabel != null && this.solidOffSwitch != null)
|
||||
{
|
||||
this.solidOffLabel.Text = GetSolidLabel(this.solidOffSwitch.IsOn);
|
||||
setSolidStates(false, this.solidOffSwitch.IsOn);
|
||||
}
|
||||
}
|
||||
|
||||
private string GetSolidLabel(bool? value)
|
||||
{
|
||||
if (value == true)
|
||||
return "On";
|
||||
else if (value == false)
|
||||
return "Off";
|
||||
else
|
||||
return "Indeterminate";
|
||||
}
|
||||
|
||||
private async void setSolidStates(bool? value, bool? state)
|
||||
{
|
||||
if (setSolidState)
|
||||
return;
|
||||
setSolidState = true;
|
||||
|
||||
if (value == true)
|
||||
{
|
||||
if (state == true)
|
||||
{
|
||||
this.solidIndeterminateSwitch.IsOn = null;
|
||||
this.solidOffSwitch.IsOn = false;
|
||||
}
|
||||
else if (state == false)
|
||||
{
|
||||
this.solidIndeterminateSwitch.IsOn = null;
|
||||
this.solidOffSwitch.IsOn = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.solidIndeterminateSwitch.IsOn = false;
|
||||
this.solidOffSwitch.IsOn = true;
|
||||
}
|
||||
|
||||
}
|
||||
else if (value == false)
|
||||
{
|
||||
if (state == true)
|
||||
{
|
||||
this.solidIndeterminateSwitch.IsOn = null;
|
||||
this.solidOnSwitch.IsOn = false;
|
||||
}
|
||||
else if (state == false)
|
||||
{
|
||||
this.solidIndeterminateSwitch.IsOn = null;
|
||||
this.solidOnSwitch.IsOn = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.solidIndeterminateSwitch.IsOn = false;
|
||||
this.solidOnSwitch.IsOn = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (state == true)
|
||||
{
|
||||
this.solidOnSwitch.IsOn = null;
|
||||
this.solidOffSwitch.IsOn = false;
|
||||
}
|
||||
else if (state == false)
|
||||
{
|
||||
this.solidOnSwitch.IsOn = true;
|
||||
this.solidOffSwitch.IsOn = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.solidOnSwitch.IsOn = true;
|
||||
this.solidOffSwitch.IsOn = false;
|
||||
}
|
||||
}
|
||||
|
||||
await Task.Delay(100);
|
||||
setSolidState = false;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<localcore:SampleView
|
||||
x:Class="SampleBrowser.Maui.Buttons.Switch.FeaturesMobile"
|
||||
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
xmlns:button="clr-namespace:Syncfusion.Maui.Buttons;assembly=Syncfusion.Maui.Buttons"
|
||||
xmlns:ev="clr-namespace:Syncfusion.Maui.Core;assembly=Syncfusion.Maui.Core"
|
||||
xmlns:local="clr-namespace:SampleBrowser.Maui.Buttons.Switch"
|
||||
xmlns:localcore="clr-namespace:SampleBrowser.Maui.Base;assembly=SampleBrowser.Maui.Base">
|
||||
|
||||
<localcore:SampleView.Content>
|
||||
<Grid>
|
||||
<button:SfSwitch />
|
||||
</Grid>
|
||||
</localcore:SampleView.Content>
|
||||
</localcore:SampleView>
|
|
@ -0,0 +1,19 @@
|
|||
#region Copyright Syncfusion Inc. 2001-2023.
|
||||
// Copyright Syncfusion Inc. 2001-2023. All rights reserved.
|
||||
// Use of this code is subject to the terms of our license.
|
||||
// A copy of the current license can be obtained at any time by e-mailing
|
||||
// licensing@syncfusion.com. Any infringement will be prosecuted under
|
||||
// applicable laws.
|
||||
#endregion
|
||||
using SampleBrowser.Maui.Base;
|
||||
|
||||
namespace SampleBrowser.Maui.Buttons.Switch;
|
||||
|
||||
public partial class FeaturesMobile : SampleView
|
||||
{
|
||||
public FeaturesMobile()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<localcore:SampleView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
xmlns:localcore="clr-namespace:SampleBrowser.Maui.Base;assembly=SampleBrowser.Maui.Base"
|
||||
xmlns:ev="clr-namespace:Syncfusion.Maui.Core;assembly=Syncfusion.Maui.Core"
|
||||
xmlns:button="clr-namespace:Syncfusion.Maui.Buttons;assembly=Syncfusion.Maui.Buttons"
|
||||
xmlns:local="clr-namespace:SampleBrowser.Maui.Buttons.Switch"
|
||||
x:Class="SampleBrowser.Maui.Buttons.Switch.GettingStarted"
|
||||
Background="White">
|
||||
|
||||
|
||||
</localcore:SampleView>
|
|
@ -0,0 +1,25 @@
|
|||
#region Copyright Syncfusion Inc. 2001-2023.
|
||||
// Copyright Syncfusion Inc. 2001-2023. All rights reserved.
|
||||
// Use of this code is subject to the terms of our license.
|
||||
// A copy of the current license can be obtained at any time by e-mailing
|
||||
// licensing@syncfusion.com. Any infringement will be prosecuted under
|
||||
// applicable laws.
|
||||
#endregion
|
||||
using SampleBrowser.Maui.Base;
|
||||
|
||||
namespace SampleBrowser.Maui.Buttons.Switch
|
||||
{
|
||||
public partial class GettingStarted : SampleView
|
||||
{
|
||||
public GettingStarted()
|
||||
{
|
||||
InitializeComponent();
|
||||
#if ANDROID || IOS
|
||||
this.Content = new GettingStartedDesktop();
|
||||
#elif WINDOWS || MACCATALYST
|
||||
this.Content = new GettingStartedDesktop();
|
||||
#endif
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,103 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<localcore:SampleView
|
||||
x:Class="SampleBrowser.Maui.Buttons.Switch.GettingStartedDesktop"
|
||||
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
xmlns:buttons="clr-namespace:Syncfusion.Maui.Buttons;assembly=Syncfusion.Maui.Buttons"
|
||||
xmlns:ev="clr-namespace:Syncfusion.Maui.Core;assembly=Syncfusion.Maui.Core"
|
||||
xmlns:imageExtension="clr-namespace:SampleBrowser.Maui.Base.Converters;assembly=SampleBrowser.Maui.Base"
|
||||
xmlns:local="clr-namespace:SampleBrowser.Maui.Buttons.Switch"
|
||||
xmlns:localcore="clr-namespace:SampleBrowser.Maui.Base;assembly=SampleBrowser.Maui.Base">
|
||||
|
||||
<localcore:SampleView.Resources>
|
||||
<imageExtension:SfImageSourceConverter x:Key="imageconverter" />
|
||||
<Style TargetType="Label">
|
||||
<Setter Property="TextColor" Value="#1C1B1F" />
|
||||
<Setter Property="FontFamily" Value="Roboto" />
|
||||
<Setter Property="VerticalOptions" Value="Center" />
|
||||
</Style>
|
||||
|
||||
</localcore:SampleView.Resources>
|
||||
|
||||
|
||||
<localcore:SampleView.Content>
|
||||
<Grid x:Name="mainGrid">
|
||||
<ScrollView VerticalScrollBarVisibility="Never">
|
||||
<Border
|
||||
Stroke="#CAC4D0"
|
||||
VerticalOptions="Center"
|
||||
WidthRequest="{OnPlatform Android=356,
|
||||
iOS=356,
|
||||
MacCatalyst=386,
|
||||
WinUI=386}">
|
||||
<Border.StrokeShape>
|
||||
<RoundRectangle CornerRadius="28" />
|
||||
</Border.StrokeShape>
|
||||
<Grid Margin="0,15">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="56" />
|
||||
<RowDefinition Height="336" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
|
||||
<Grid x:Name="allAppsGrid" Grid.Row="0">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="{OnPlatform Android=60, iOS=60, MacCatalyst=70, WinUI=70}" />
|
||||
</Grid.ColumnDefinitions>
|
||||
<Label
|
||||
FontSize="16"
|
||||
HorizontalOptions="Start"
|
||||
Text="All Apps"/>
|
||||
|
||||
<buttons:SfSwitch
|
||||
x:Name="allAppSwitch"
|
||||
Grid.Column="1"
|
||||
AllowIndeterminateState="True"
|
||||
IsOn="True"
|
||||
StateChanged="AllAppSwitch_StateChanged" />
|
||||
</Grid>
|
||||
|
||||
<VerticalStackLayout Grid.Row="1" BindableLayout.ItemsSource="{Binding ListCollection}">
|
||||
<BindableLayout.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Grid HeightRequest="56">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="62" />
|
||||
<ColumnDefinition Width="*" />
|
||||
<ColumnDefinition Width="{OnPlatform Android=60, iOS=60, MacCatalyst=70, WinUI=70}" />
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Image
|
||||
Grid.Column="0"
|
||||
HeightRequest="30"
|
||||
HorizontalOptions="Center"
|
||||
Source="{Binding ImageName, Converter={StaticResource imageconverter}}"
|
||||
VerticalOptions="Center"
|
||||
WidthRequest="30" />
|
||||
|
||||
<Grid Grid.Column="1">
|
||||
<Label
|
||||
Margin="5,0,5,0"
|
||||
FontSize="16"
|
||||
HorizontalOptions="Start"
|
||||
Text="{Binding Name}" />
|
||||
</Grid>
|
||||
<Grid Grid.Column="2" Margin="0,0,10,0">
|
||||
<buttons:SfSwitch
|
||||
AllowIndeterminateState="False"
|
||||
HorizontalOptions="End"
|
||||
IsOn="{Binding CanNotify, Mode=TwoWay}"
|
||||
StateChanged="SfSwitch_StateChanged" />
|
||||
</Grid>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</BindableLayout.ItemTemplate>
|
||||
</VerticalStackLayout>
|
||||
</Grid>
|
||||
</Border>
|
||||
</ScrollView>
|
||||
</Grid>
|
||||
</localcore:SampleView.Content>
|
||||
|
||||
</localcore:SampleView>
|
|
@ -0,0 +1,354 @@
|
|||
#region Copyright Syncfusion Inc. 2001-2023.
|
||||
// Copyright Syncfusion Inc. 2001-2023. All rights reserved.
|
||||
// Use of this code is subject to the terms of our license.
|
||||
// A copy of the current license can be obtained at any time by e-mailing
|
||||
// licensing@syncfusion.com. Any infringement will be prosecuted under
|
||||
// applicable laws.
|
||||
#endregion
|
||||
using Microsoft.Maui.Controls.Shapes;
|
||||
using SampleBrowser.Maui.Base;
|
||||
using Syncfusion.Maui.Buttons;
|
||||
using Syncfusion.Maui.Core;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace SampleBrowser.Maui.Buttons.Switch;
|
||||
|
||||
public partial class GettingStartedDesktop : SampleView
|
||||
{
|
||||
public GettingStartedDesktop()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
#if ANDROID || IOS
|
||||
allAppsGrid.Margin = new(15,0,10,0);
|
||||
#else
|
||||
allAppsGrid.Margin = new(15, 0, 5, 0);
|
||||
#endif
|
||||
|
||||
|
||||
ListCollection.Add(new AppModel(this)
|
||||
{
|
||||
Name = "Twitter",
|
||||
IconColor = Color.FromArgb("#1DA1F2"),
|
||||
ImageName = "X.png",
|
||||
CanNotify = true
|
||||
});
|
||||
ListCollection.Add(new AppModel(this)
|
||||
{
|
||||
Name = "YouTube",
|
||||
IconColor = Color.FromArgb("#1DA1F2"),
|
||||
ImageName = "Youtube.png",
|
||||
CanNotify = true
|
||||
});
|
||||
ListCollection.Add(new AppModel(this)
|
||||
{
|
||||
Name = "Instagram",
|
||||
IconColor = Color.FromArgb("#1DA1F2"),
|
||||
ImageName = "InstagramIcon.png",
|
||||
CanNotify = true
|
||||
});
|
||||
ListCollection.Add(new AppModel(this)
|
||||
{
|
||||
Name = "Gmail",
|
||||
IconColor = Color.FromArgb("#1DA1F2"),
|
||||
ImageName = "Gmail.png",
|
||||
CanNotify = true
|
||||
});
|
||||
ListCollection.Add(new AppModel(this)
|
||||
{
|
||||
Name = "LinkedIn",
|
||||
IconColor = Color.FromArgb("#1DA1F2"),
|
||||
ImageName = "Linked In.png",
|
||||
CanNotify = true
|
||||
});
|
||||
ListCollection.Add(new AppModel(this)
|
||||
{
|
||||
Name = "Skype",
|
||||
IconColor = Color.FromArgb("#1DA1F2"),
|
||||
ImageName = "Skype.png",
|
||||
CanNotify = true
|
||||
});
|
||||
|
||||
this.BindingContext = this;
|
||||
}
|
||||
|
||||
#region Members
|
||||
|
||||
private ObservableCollection<AppModel> listCollection = new ObservableCollection<AppModel>();
|
||||
|
||||
private bool canNotify;
|
||||
|
||||
#endregion
|
||||
|
||||
#region properties
|
||||
|
||||
/// <summary>
|
||||
/// Collection which contains the items that will be enabled and disabled by the segment control to display on the main segment control.
|
||||
/// </summary>
|
||||
public ObservableCollection<AppModel> ListCollection
|
||||
{
|
||||
get
|
||||
{
|
||||
return listCollection;
|
||||
}
|
||||
set
|
||||
{
|
||||
listCollection = value;
|
||||
}
|
||||
}
|
||||
|
||||
public bool CanNotify
|
||||
{
|
||||
get
|
||||
{
|
||||
return canNotify;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (canNotify != value)
|
||||
{
|
||||
canNotify = value;
|
||||
raisePropertyChanged("CanNotify");
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
#region Methods
|
||||
|
||||
/// <summary>
|
||||
/// Handles the item tapped.
|
||||
/// </summary>
|
||||
/// <param name="sender">Sender.</param>
|
||||
/// <param name="e">E.</param>
|
||||
private void Handle_ItemTapped(object sender, ItemTappedEventArgs e)
|
||||
{
|
||||
Microsoft.Maui.Controls.ListView? listView = sender as Microsoft.Maui.Controls.ListView;
|
||||
if (listView != null)
|
||||
{
|
||||
listView.SelectedItem = null;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region PropertyChanged
|
||||
public event PropertyChangedEventHandler? propertyChanged;
|
||||
private void raisePropertyChanged(string property)
|
||||
{
|
||||
if (propertyChanged != null)
|
||||
{
|
||||
propertyChanged(this, new PropertyChangedEventArgs(property));
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Dispose
|
||||
/// <summary>
|
||||
/// Dispose method
|
||||
/// </summary>
|
||||
public void Dispose()
|
||||
{
|
||||
}
|
||||
#endregion
|
||||
|
||||
bool? oldValue = null;
|
||||
|
||||
private async void AllAppSwitch_StateChanged(object sender, SwitchStateChangedEventArgs e)
|
||||
{
|
||||
if (!setAllAppsSwitchState)
|
||||
{
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (allAppSwitch.IsOn == null)
|
||||
{
|
||||
allAppSwitch.IsOn = oldValue;
|
||||
}
|
||||
}
|
||||
await Task.Delay(1);
|
||||
if (this.allAppSwitch.IsOn == true)
|
||||
{
|
||||
foreach (var appModel in this.ListCollection)
|
||||
{
|
||||
appModel.CanNotify = true;
|
||||
}
|
||||
}
|
||||
else if (this.allAppSwitch.IsOn == false)
|
||||
{
|
||||
foreach (var appModel in this.ListCollection)
|
||||
{
|
||||
appModel.CanNotify = false;
|
||||
}
|
||||
}
|
||||
oldValue = this.allAppSwitch.IsOn;
|
||||
}
|
||||
|
||||
bool setAllAppsSwitchState = true;
|
||||
private async void SfSwitch_StateChanged(object sender, SwitchStateChangedEventArgs e)
|
||||
{
|
||||
setAllAppsSwitchState = false;
|
||||
bool hasTrue = false;
|
||||
|
||||
bool hasFalse = false;
|
||||
|
||||
foreach (var appModel in this.ListCollection)
|
||||
{
|
||||
if (appModel.CanNotify == true)
|
||||
{
|
||||
hasTrue = true;
|
||||
}
|
||||
if (appModel.CanNotify == false)
|
||||
{
|
||||
hasFalse = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (hasFalse && hasTrue)
|
||||
{
|
||||
this.allAppSwitch.AllowIndeterminateState = true;
|
||||
this.allAppSwitch.IsOn = null;
|
||||
}
|
||||
else if (hasFalse && !hasTrue)
|
||||
{
|
||||
this.allAppSwitch.AllowIndeterminateState = false;
|
||||
this.allAppSwitch.IsOn = false;
|
||||
}
|
||||
else if (!hasFalse && hasTrue)
|
||||
{
|
||||
this.allAppSwitch.AllowIndeterminateState = false;
|
||||
this.allAppSwitch.IsOn = true;
|
||||
}
|
||||
await Task.Delay(250);
|
||||
setAllAppsSwitchState = true;
|
||||
}
|
||||
|
||||
private void IconsView_ChildAdded(object sender, ElementEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Model class for the tokens
|
||||
/// </summary>
|
||||
public class AppModel : INotifyPropertyChanged
|
||||
{
|
||||
#region Members
|
||||
private bool? canNotify;
|
||||
private String? name;
|
||||
private String imageName = string.Empty;
|
||||
private Color? iconColor;
|
||||
private ObservableCollection<SfSegmentItem> dataCollection = new ObservableCollection<SfSegmentItem>();
|
||||
private GettingStartedDesktop? tokensObject;
|
||||
#endregion
|
||||
|
||||
#region Properties
|
||||
/// <summary>
|
||||
/// Get or set the name for the items present in the list.
|
||||
/// </summary>
|
||||
public String Name
|
||||
{
|
||||
get
|
||||
{
|
||||
return name!;
|
||||
}
|
||||
set
|
||||
{
|
||||
name = value;
|
||||
raisePropertyChanged("Name");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get or set the name for the items present in the list.
|
||||
/// </summary>
|
||||
public String ImageName
|
||||
{
|
||||
get
|
||||
{
|
||||
return imageName!;
|
||||
}
|
||||
set
|
||||
{
|
||||
imageName = value;
|
||||
raisePropertyChanged("ImageName");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get or set the color for the icons used inside the listView.
|
||||
/// </summary>
|
||||
public Color IconColor
|
||||
{
|
||||
get
|
||||
{
|
||||
return iconColor!;
|
||||
}
|
||||
set
|
||||
{
|
||||
iconColor = value;
|
||||
raisePropertyChanged("IconColor");
|
||||
}
|
||||
}
|
||||
|
||||
public bool? CanNotify
|
||||
{
|
||||
get
|
||||
{
|
||||
return canNotify;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (canNotify != value)
|
||||
{
|
||||
canNotify = value;
|
||||
raisePropertyChanged("CanNotify");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Data collection for the items used inside the listView
|
||||
/// </summary>
|
||||
public ObservableCollection<SfSegmentItem> DataCollection
|
||||
{
|
||||
get
|
||||
{
|
||||
return dataCollection;
|
||||
}
|
||||
set
|
||||
{
|
||||
dataCollection = value;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructor
|
||||
/// <summary>
|
||||
/// Constructor initializing for the App model class
|
||||
/// </summary>
|
||||
/// <param name="tokens"></param>
|
||||
public AppModel(GettingStartedDesktop tokens)
|
||||
{
|
||||
tokensObject = tokens;
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region PropertyChanged
|
||||
public event PropertyChangedEventHandler? PropertyChanged;
|
||||
private void raisePropertyChanged(string property)
|
||||
{
|
||||
if (PropertyChanged != null)
|
||||
{
|
||||
PropertyChanged(this, new PropertyChangedEventArgs(property));
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<localcore:SampleView
|
||||
x:Class="SampleBrowser.Maui.Buttons.Switch.GettingStartedMobile"
|
||||
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
xmlns:button="clr-namespace:Syncfusion.Maui.Buttons;assembly=Syncfusion.Maui.Buttons"
|
||||
xmlns:ev="clr-namespace:Syncfusion.Maui.Core;assembly=Syncfusion.Maui.Core"
|
||||
xmlns:local="clr-namespace:SampleBrowser.Maui.Buttons.Switch"
|
||||
xmlns:localcore="clr-namespace:SampleBrowser.Maui.Base;assembly=SampleBrowser.Maui.Base">
|
||||
|
||||
<localcore:SampleView.Content>
|
||||
<Grid>
|
||||
<button:SfSwitch />
|
||||
</Grid>
|
||||
</localcore:SampleView.Content>
|
||||
</localcore:SampleView>
|
|
@ -0,0 +1,19 @@
|
|||
#region Copyright Syncfusion Inc. 2001-2023.
|
||||
// Copyright Syncfusion Inc. 2001-2023. All rights reserved.
|
||||
// Use of this code is subject to the terms of our license.
|
||||
// A copy of the current license can be obtained at any time by e-mailing
|
||||
// licensing@syncfusion.com. Any infringement will be prosecuted under
|
||||
// applicable laws.
|
||||
#endregion
|
||||
using SampleBrowser.Maui.Base;
|
||||
|
||||
namespace SampleBrowser.Maui.Buttons.Switch;
|
||||
|
||||
public partial class GettingStartedMobile : SampleView
|
||||
{
|
||||
public GettingStartedMobile()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
}
|
||||
}
|
|
@ -3,10 +3,9 @@
|
|||
<ControlCategory Name="Calendar">
|
||||
<Control Title="Calendar"
|
||||
Image="calendar.png"
|
||||
StatusTag="Updated"
|
||||
ControlName="SfCalendar"
|
||||
Description="It is a lightweight control used to select a single, multiple, and a range of dates.">
|
||||
<Sample Title="Getting Started" SampleName="GettingStarted" StatusTag="Updated"
|
||||
<Sample Title="Getting Started" SampleName="GettingStarted"
|
||||
CodeViewerPath="Calendar/GettingStarted/" VideoLink="https://www.youtube.com/watch?v=kfQjKiD9Xas"/>
|
||||
<Category Title="Views">
|
||||
<CardLayout>
|
||||
|
|
|
@ -82,13 +82,13 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="SampleBrowser.Maui.Base" version="23.2.4" />
|
||||
<PackageReference Include="Syncfusion.Maui.Core" version="23.2.4" />
|
||||
<PackageReference Include="Syncfusion.Maui.Inputs" version="23.2.4" />
|
||||
<PackageReference Include="Syncfusion.Maui.TabView" version="23.2.4" />
|
||||
<PackageReference Include="Syncfusion.Maui.DataSource" version="23.2.4" />
|
||||
<PackageReference Include="Syncfusion.Maui.GridCommon" version="23.2.4" />
|
||||
<PackageReference Include="Syncfusion.Maui.ListView" version="23.2.4" />
|
||||
<PackageReference Include="Syncfusion.Maui.Calendar" version="23.2.4" />
|
||||
<PackageReference Include="SampleBrowser.Maui.Base" version="24.1.41" />
|
||||
<PackageReference Include="Syncfusion.Maui.Core" version="24.1.41" />
|
||||
<PackageReference Include="Syncfusion.Maui.Inputs" version="24.1.41" />
|
||||
<PackageReference Include="Syncfusion.Maui.TabView" version="24.1.41" />
|
||||
<PackageReference Include="Syncfusion.Maui.DataSource" version="24.1.41" />
|
||||
<PackageReference Include="Syncfusion.Maui.GridCommon" version="24.1.41" />
|
||||
<PackageReference Include="Syncfusion.Maui.ListView" version="24.1.41" />
|
||||
<PackageReference Include="Syncfusion.Maui.Calendar" version="24.1.41" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
|
@ -80,9 +80,9 @@ namespace SampleBrowser.Maui.Calendar.SfCalendar
|
|||
/// <param name="e">Event Arguments</param>
|
||||
private void ComboBox_SelectionChanged(object? sender, Syncfusion.Maui.Inputs.SelectionChangedEventArgs e)
|
||||
{
|
||||
if (this.calendar != null && e.CurrentSelection != null)
|
||||
if (this.calendar != null && e.AddedItems != null)
|
||||
{
|
||||
string? selectionShape = e.CurrentSelection[0].ToString();
|
||||
string? selectionShape = e.AddedItems[0].ToString();
|
||||
if (this.calendar.BindingContext is AppearanceViewModel)
|
||||
{
|
||||
AppearanceViewModel appearanceViewModel = (AppearanceViewModel)this.calendar.BindingContext;
|
||||
|
|
|
@ -135,9 +135,9 @@ namespace SampleBrowser.Maui.Calendar.SfCalendar
|
|||
/// <param name="e">Event Arguments</param>
|
||||
private void ComboBox_SelectionChanged(object? sender, Syncfusion.Maui.Inputs.SelectionChangedEventArgs e)
|
||||
{
|
||||
if (calendar != null && e.CurrentSelection != null)
|
||||
if (calendar != null && e.AddedItems != null)
|
||||
{
|
||||
string? selectionMode = e.CurrentSelection[0].ToString();
|
||||
string? selectionMode = e.AddedItems[0].ToString();
|
||||
if (selectionMode != null)
|
||||
{
|
||||
calendar.SelectionMode = selectionMode == "Date" ? CalendarSelectionMode.Single : CalendarSelectionMode.Range;
|
||||
|
|
|
@ -235,9 +235,9 @@ namespace SampleBrowser.Maui.Calendar.SfCalendar
|
|||
/// <param name="e">Event Arguments</param>
|
||||
private void DirectionComboBox_SelectionChanged(object? sender, Syncfusion.Maui.Inputs.SelectionChangedEventArgs e)
|
||||
{
|
||||
if (calendar != null && e.CurrentSelection != null)
|
||||
if (calendar != null && e.AddedItems != null)
|
||||
{
|
||||
string? selectionDirection = e.CurrentSelection[0].ToString();
|
||||
string? selectionDirection = e.AddedItems[0].ToString();
|
||||
if (selectionDirection != null)
|
||||
calendar.RangeSelectionDirection = Enum.Parse<CalendarRangeSelectionDirection>(selectionDirection);
|
||||
}
|
||||
|
@ -297,9 +297,9 @@ namespace SampleBrowser.Maui.Calendar.SfCalendar
|
|||
/// <param name="e">Event Arguments</param>
|
||||
private void ComboBox_SelectionTypeChanged(object? sender, Syncfusion.Maui.Inputs.SelectionChangedEventArgs e)
|
||||
{
|
||||
if (calendar != null && e.CurrentSelection != null)
|
||||
if (calendar != null && e.AddedItems != null)
|
||||
{
|
||||
string? selection = e.CurrentSelection[0].ToString();
|
||||
string? selection = e.AddedItems[0].ToString();
|
||||
if (selection != null)
|
||||
calendar.SelectionMode = Enum.Parse<CalendarSelectionMode>(selection);
|
||||
|
||||
|
@ -349,9 +349,9 @@ namespace SampleBrowser.Maui.Calendar.SfCalendar
|
|||
/// <param name="e">Event Arguments</param>
|
||||
private void ComboBox_SelectionShapeChanged(object? sender, Syncfusion.Maui.Inputs.SelectionChangedEventArgs e)
|
||||
{
|
||||
if (calendar != null && e.CurrentSelection != null)
|
||||
if (calendar != null && e.AddedItems != null)
|
||||
{
|
||||
string? shape = e.CurrentSelection[0].ToString();
|
||||
string? shape = e.AddedItems[0].ToString();
|
||||
if (shape != null)
|
||||
calendar.SelectionShape = Enum.Parse<CalendarSelectionShape>(shape);
|
||||
}
|
||||
|
@ -364,9 +364,9 @@ namespace SampleBrowser.Maui.Calendar.SfCalendar
|
|||
/// <param name="e">Event Arguments</param>
|
||||
private void ComboBox_SelectionChanged(object? sender, Syncfusion.Maui.Inputs.SelectionChangedEventArgs e)
|
||||
{
|
||||
if (calendar != null && e.CurrentSelection != null)
|
||||
if (calendar != null && e.AddedItems != null)
|
||||
{
|
||||
string? view = e.CurrentSelection[0].ToString();
|
||||
string? view = e.AddedItems[0].ToString();
|
||||
if (view != null)
|
||||
calendar.View = Enum.Parse<CalendarView>(view);
|
||||
|
||||
|
|
|
@ -96,9 +96,9 @@ namespace SampleBrowser.Maui.Calendar.SfCalendar
|
|||
|
||||
private void comboBox_SelectionChanged(object sender, Syncfusion.Maui.Inputs.SelectionChangedEventArgs e)
|
||||
{
|
||||
if (e.CurrentSelection != null)
|
||||
if (e.AddedItems != null)
|
||||
{
|
||||
string? theme = e.CurrentSelection[0].ToString();
|
||||
string? theme = e.AddedItems[0].ToString();
|
||||
if (theme == null)
|
||||
{
|
||||
return;
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
<configuration>
|
||||
<packageRestore>
|
||||
<add key="enabled" value="True" />
|
||||
<add key="automatic" value="True" />
|
||||
</packageRestore>
|
||||
<packageSources>
|
||||
|
||||
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
|
||||
</packageSources>
|
||||
<activePackageSource>
|
||||
|
||||
</activePackageSource>
|
||||
<bindingRedirects>
|
||||
<add key="skip" value="False" />
|
||||
</bindingRedirects>
|
||||
</configuration>
|
|
@ -0,0 +1,31 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.8.34309.116
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SampleBrowser.Maui.Cards", "SampleBrowser.Maui.Cards\SampleBrowser.Maui.Cards.csproj", "{EFE9A172-97F7-4966-BA71-B75FF30691A6}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
Release-Xml|Any CPU = Release-Xml|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{EFE9A172-97F7-4966-BA71-B75FF30691A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{EFE9A172-97F7-4966-BA71-B75FF30691A6}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{EFE9A172-97F7-4966-BA71-B75FF30691A6}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
|
||||
{EFE9A172-97F7-4966-BA71-B75FF30691A6}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{EFE9A172-97F7-4966-BA71-B75FF30691A6}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{EFE9A172-97F7-4966-BA71-B75FF30691A6}.Release|Any CPU.Deploy.0 = Release|Any CPU
|
||||
{EFE9A172-97F7-4966-BA71-B75FF30691A6}.Release-Xml|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{EFE9A172-97F7-4966-BA71-B75FF30691A6}.Release-Xml|Any CPU.Build.0 = Release|Any CPU
|
||||
{EFE9A172-97F7-4966-BA71-B75FF30691A6}.Release-Xml|Any CPU.Deploy.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {C1B95682-8E5B-402C-ADE8-52C25EB977C5}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version = "1.0" encoding = "UTF-8" ?>
|
||||
<Application xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
xmlns:local="clr-namespace:SampleBrowser.Maui.Cards"
|
||||
xmlns:base="clr-namespace:SampleBrowser.Maui.Base;assembly=SampleBrowser.Maui.Base"
|
||||
x:Class="SampleBrowser.Maui.Cards.App">
|
||||
<Application.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<base:SampleBrowserStyles/>
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</Application.Resources>
|
||||
</Application>
|
|
@ -0,0 +1,25 @@
|
|||
#region Copyright Syncfusion Inc. 2001-2023.
|
||||
// Copyright Syncfusion Inc. 2001-2023. All rights reserved.
|
||||
// Use of this code is subject to the terms of our license.
|
||||
// A copy of the current license can be obtained at any time by e-mailing
|
||||
// licensing@syncfusion.com. Any infringement will be prosecuted under
|
||||
// applicable laws.
|
||||
#endregion
|
||||
using System.Reflection;
|
||||
|
||||
namespace SampleBrowser.Maui.Cards
|
||||
{
|
||||
public partial class App : Application
|
||||
{
|
||||
public App()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
this.UserAppTheme = AppTheme.Light;
|
||||
|
||||
var appInfo = typeof(App).GetTypeInfo().Assembly;
|
||||
SampleBrowser.Maui.Base.BaseConfig.IsIndividualSB = true;
|
||||
MainPage = SampleBrowser.Maui.Base.BaseConfig.MainPageInit(appInfo);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<SyncfusionControls>
|
||||
<ControlCategory Name="Layouts">
|
||||
<Control Title="Cards"
|
||||
Image="cards.png"
|
||||
StatusTag="New" IsPreview="true"
|
||||
ControlName="SfCards"
|
||||
Description="The Cards control allows you to create a dismissible card or a stack of cards where one card is visible at a time until you swipe to see the next card.">
|
||||
<Sample Title="Card view" SampleName="CardView" CodeViewerPath="Cards/GettingStarted/"/>
|
||||
</Control>
|
||||
</ControlCategory>
|
||||
</SyncfusionControls>
|
|
@ -0,0 +1,14 @@
|
|||
#region Copyright Syncfusion Inc. 2001-2022.
|
||||
// Copyright Syncfusion Inc. 2001-2022. All rights reserved.
|
||||
// Use of this code is subject to the terms of our license.
|
||||
// A copy of the current license can be obtained at any time by e-mailing
|
||||
// licensing@syncfusion.com. Any infringement will be prosecuted under
|
||||
// applicable laws.
|
||||
#endregion
|
||||
namespace SampleBrowser.Maui.Cards
|
||||
{
|
||||
// All the code in this file is included in all platforms.
|
||||
public class ControlConfig
|
||||
{
|
||||
}
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<SampleBrowser>
|
||||
<Assemblies Prefix="SampleBrowser.Maui.Cards"
|
||||
QualifiedInfo="Version=1.0.0.0, Culture=neutral, PublicKeyToken=null">
|
||||
<Assembly Name="Cards" />
|
||||
</Assemblies>
|
||||
</SampleBrowser>
|
|
@ -0,0 +1,31 @@
|
|||
#region Copyright Syncfusion Inc. 2001-2023.
|
||||
// Copyright Syncfusion Inc. 2001-2023. All rights reserved.
|
||||
// Use of this code is subject to the terms of our license.
|
||||
// A copy of the current license can be obtained at any time by e-mailing
|
||||
// licensing@syncfusion.com. Any infringement will be prosecuted under
|
||||
// applicable laws.
|
||||
#endregion
|
||||
using SampleBrowser.Maui.Base.Hosting;
|
||||
using SampleBrowser.Maui.Cards;
|
||||
using Syncfusion.Maui.Core.Hosting;
|
||||
|
||||
public static class MauiProgram
|
||||
{
|
||||
public static MauiApp CreateMauiApp()
|
||||
{
|
||||
var builder = MauiApp.CreateBuilder();
|
||||
builder
|
||||
.UseMauiApp<App>()
|
||||
.ConfigureSyncfusionCore()
|
||||
.ConfigureFonts(fonts =>
|
||||
{
|
||||
fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
|
||||
fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");
|
||||
fonts.AddFont("Roboto-Regular.ttf", "Roboto-Regular");
|
||||
fonts.AddFont("Roboto-Medium.ttf", "Roboto-Medium");
|
||||
});
|
||||
|
||||
builder.ConfigureSampleBrowserBase();
|
||||
return builder.Build();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<application android:allowBackup="true" android:icon="@mipmap/appicon" android:roundIcon="@mipmap/appicon_round" android:supportsRtl="true"></application>
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
</manifest>
|
|
@ -0,0 +1,18 @@
|
|||
#region Copyright Syncfusion Inc. 2001-2023.
|
||||
// Copyright Syncfusion Inc. 2001-2023. All rights reserved.
|
||||
// Use of this code is subject to the terms of our license.
|
||||
// A copy of the current license can be obtained at any time by e-mailing
|
||||
// licensing@syncfusion.com. Any infringement will be prosecuted under
|
||||
// applicable laws.
|
||||
#endregion
|
||||
using Android.App;
|
||||
using Android.Content.PM;
|
||||
using Android.OS;
|
||||
|
||||
namespace SampleBrowser.Maui.Cards
|
||||
{
|
||||
[Activity(Theme = "@style/Maui.SplashTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize | ConfigChanges.Density)]
|
||||
public class MainActivity : MauiAppCompatActivity
|
||||
{
|
||||
}
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
#region Copyright Syncfusion Inc. 2001-2023.
|
||||
// Copyright Syncfusion Inc. 2001-2023. All rights reserved.
|
||||
// Use of this code is subject to the terms of our license.
|
||||
// A copy of the current license can be obtained at any time by e-mailing
|
||||
// licensing@syncfusion.com. Any infringement will be prosecuted under
|
||||
// applicable laws.
|
||||
#endregion
|
||||
using Android.App;
|
||||
using Android.Runtime;
|
||||
|
||||
namespace SampleBrowser.Maui.Cards
|
||||
{
|
||||
[Application]
|
||||
public class MainApplication : MauiApplication
|
||||
{
|
||||
public MainApplication(IntPtr handle, JniHandleOwnership ownership)
|
||||
: base(handle, ownership)
|
||||
{
|
||||
}
|
||||
|
||||
protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="colorPrimary">#512BD4</color>
|
||||
<color name="colorPrimaryDark">#2B0B98</color>
|
||||
<color name="colorAccent">#2B0B98</color>
|
||||
</resources>
|
|
@ -0,0 +1,17 @@
|
|||
#region Copyright Syncfusion Inc. 2001-2023.
|
||||
// Copyright Syncfusion Inc. 2001-2023. All rights reserved.
|
||||
// Use of this code is subject to the terms of our license.
|
||||
// A copy of the current license can be obtained at any time by e-mailing
|
||||
// licensing@syncfusion.com. Any infringement will be prosecuted under
|
||||
// applicable laws.
|
||||
#endregion
|
||||
using Foundation;
|
||||
|
||||
namespace SampleBrowser.Maui.Cards
|
||||
{
|
||||
[Register("AppDelegate")]
|
||||
public class AppDelegate : MauiUIApplicationDelegate
|
||||
{
|
||||
protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<!-- See https://aka.ms/maui-publish-app-store#add-entitlements for more information about adding entitlements.-->
|
||||
<dict>
|
||||
<!-- App Sandbox must be enabled to distribute a MacCatalyst app through the Mac App Store. -->
|
||||
<key>com.apple.security.app-sandbox</key>
|
||||
<true/>
|
||||
<!-- When App Sandbox is enabled, this value is required to open outgoing network connections. -->
|
||||
<key>com.apple.security.network.client</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<!-- The Mac App Store requires you specify if the app uses encryption. -->
|
||||
<!-- Please consult https://developer.apple.com/documentation/bundleresources/information_property_list/itsappusesnonexemptencryption -->
|
||||
<!-- <key>ITSAppUsesNonExemptEncryption</key> -->
|
||||
<!-- Please indicate <true/> or <false/> here. -->
|
||||
|
||||
<!-- Specify the category for your app here. -->
|
||||
<!-- Please consult https://developer.apple.com/documentation/bundleresources/information_property_list/lsapplicationcategorytype -->
|
||||
<!-- <key>LSApplicationCategoryType</key> -->
|
||||
<!-- <string>public.app-category.YOUR-CATEGORY-HERE</string> -->
|
||||
<key>UIDeviceFamily</key>
|
||||
<array>
|
||||
<integer>2</integer>
|
||||
</array>
|
||||
<key>UIRequiredDeviceCapabilities</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations~ipad</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>XSAppIconAssets</key>
|
||||
<string>Assets.xcassets/appicon.appiconset</string>
|
||||
</dict>
|
||||
</plist>
|
|
@ -0,0 +1,23 @@
|
|||
#region Copyright Syncfusion Inc. 2001-2023.
|
||||
// Copyright Syncfusion Inc. 2001-2023. All rights reserved.
|
||||
// Use of this code is subject to the terms of our license.
|
||||
// A copy of the current license can be obtained at any time by e-mailing
|
||||
// licensing@syncfusion.com. Any infringement will be prosecuted under
|
||||
// applicable laws.
|
||||
#endregion
|
||||
using ObjCRuntime;
|
||||
using UIKit;
|
||||
|
||||
namespace SampleBrowser.Maui.Cards
|
||||
{
|
||||
public class Program
|
||||
{
|
||||
// This is the main entry point of the application.
|
||||
static void Main(string[] args)
|
||||
{
|
||||
// if you want to use a different Application Delegate class from "AppDelegate"
|
||||
// you can specify it here.
|
||||
UIApplication.Main(args, null, typeof(AppDelegate));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
#region Copyright Syncfusion Inc. 2001-2023.
|
||||
// Copyright Syncfusion Inc. 2001-2023. All rights reserved.
|
||||
// Use of this code is subject to the terms of our license.
|
||||
// A copy of the current license can be obtained at any time by e-mailing
|
||||
// licensing@syncfusion.com. Any infringement will be prosecuted under
|
||||
// applicable laws.
|
||||
#endregion
|
||||
using Microsoft.Maui;
|
||||
using Microsoft.Maui.Hosting;
|
||||
using System;
|
||||
|
||||
namespace SampleBrowser.Maui.Cards
|
||||
{
|
||||
internal class Program : MauiApplication
|
||||
{
|
||||
protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
|
||||
|
||||
static void Main(string[] args)
|
||||
{
|
||||
var app = new Program();
|
||||
app.Run(args);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest package="maui-application-id-placeholder" version="0.0.0" api-version="7" xmlns="http://tizen.org/ns/packages">
|
||||
<profile name="common" />
|
||||
<ui-application appid="maui-application-id-placeholder" exec="SampleBrowser.Maui.Cards.dll" multiple="false" nodisplay="false" taskmanage="true" type="dotnet" launch_mode="single">
|
||||
<label>maui-application-title-placeholder</label>
|
||||
<icon>maui-appicon-placeholder</icon>
|
||||
<metadata key="http://tizen.org/metadata/prefer_dotnet_aot" value="true" />
|
||||
</ui-application>
|
||||
<shortcut-list />
|
||||
<privileges>
|
||||
<privilege>http://tizen.org/privilege/internet</privilege>
|
||||
</privileges>
|
||||
<dependencies />
|
||||
<provides-appdefined-privileges />
|
||||
</manifest>
|
|
@ -0,0 +1,8 @@
|
|||
<maui:MauiWinUIApplication
|
||||
x:Class="SampleBrowser.Maui.Cards.WinUI.App"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:maui="using:Microsoft.Maui"
|
||||
xmlns:local="using:SampleBrowser.Maui.Cards.WinUI">
|
||||
|
||||
</maui:MauiWinUIApplication>
|
|
@ -0,0 +1,32 @@
|
|||
#region Copyright Syncfusion Inc. 2001-2023.
|
||||
// Copyright Syncfusion Inc. 2001-2023. All rights reserved.
|
||||
// Use of this code is subject to the terms of our license.
|
||||
// A copy of the current license can be obtained at any time by e-mailing
|
||||
// licensing@syncfusion.com. Any infringement will be prosecuted under
|
||||
// applicable laws.
|
||||
#endregion
|
||||
using Microsoft.UI.Xaml;
|
||||
|
||||
// To learn more about WinUI, the WinUI project structure,
|
||||
// and more about our project templates, see: http://aka.ms/winui-project-info.
|
||||
|
||||
namespace SampleBrowser.Maui.Cards.WinUI
|
||||
{
|
||||
/// <summary>
|
||||
/// Provides application-specific behavior to supplement the default Application class.
|
||||
/// </summary>
|
||||
public partial class App : MauiWinUIApplication
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes the singleton application object. This is the first line of authored code
|
||||
/// executed, and as such is the logical equivalent of main() or WinMain().
|
||||
/// </summary>
|
||||
public App()
|
||||
{
|
||||
this.InitializeComponent();
|
||||
}
|
||||
|
||||
protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,46 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Package
|
||||
xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
|
||||
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
|
||||
xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest"
|
||||
xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
|
||||
IgnorableNamespaces="uap rescap">
|
||||
|
||||
<Identity Name="maui-package-name-placeholder" Publisher="CN=User Name" Version="0.0.0.0" />
|
||||
|
||||
<mp:PhoneIdentity PhoneProductId="B11403B3-C9D1-4625-9549-A3308382B69D" PhonePublisherId="00000000-0000-0000-0000-000000000000"/>
|
||||
|
||||
<Properties>
|
||||
<DisplayName>$placeholder$</DisplayName>
|
||||
<PublisherDisplayName>User Name</PublisherDisplayName>
|
||||
<Logo>$placeholder$.png</Logo>
|
||||
</Properties>
|
||||
|
||||
<Dependencies>
|
||||
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.17763.0" MaxVersionTested="10.0.19041.0" />
|
||||
<TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.17763.0" MaxVersionTested="10.0.19041.0" />
|
||||
</Dependencies>
|
||||
|
||||
<Resources>
|
||||
<Resource Language="x-generate" />
|
||||
</Resources>
|
||||
|
||||
<Applications>
|
||||
<Application Id="App" Executable="$targetnametoken$.exe" EntryPoint="$targetentrypoint$">
|
||||
<uap:VisualElements
|
||||
DisplayName="$placeholder$"
|
||||
Description="$placeholder$"
|
||||
Square150x150Logo="$placeholder$.png"
|
||||
Square44x44Logo="$placeholder$.png"
|
||||
BackgroundColor="transparent">
|
||||
<uap:DefaultTile Square71x71Logo="$placeholder$.png" Wide310x150Logo="$placeholder$.png" Square310x310Logo="$placeholder$.png" />
|
||||
<uap:SplashScreen Image="$placeholder$.png" />
|
||||
</uap:VisualElements>
|
||||
</Application>
|
||||
</Applications>
|
||||
|
||||
<Capabilities>
|
||||
<rescap:Capability Name="runFullTrust" />
|
||||
</Capabilities>
|
||||
|
||||
</Package>
|
|
@ -0,0 +1,15 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<assemblyIdentity version="1.0.0.0" name="SampleBrowser.Maui.Cards.WinUI.app"/>
|
||||
|
||||
<application xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<windowsSettings>
|
||||
<!-- The combination of below two tags have the following effect:
|
||||
1) Per-Monitor for >= Windows 10 Anniversary Update
|
||||
2) System < Windows 10 Anniversary Update
|
||||
-->
|
||||
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true/PM</dpiAware>
|
||||
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitorV2, PerMonitor</dpiAwareness>
|
||||
</windowsSettings>
|
||||
</application>
|
||||
</assembly>
|
|
@ -0,0 +1,17 @@
|
|||
#region Copyright Syncfusion Inc. 2001-2023.
|
||||
// Copyright Syncfusion Inc. 2001-2023. All rights reserved.
|
||||
// Use of this code is subject to the terms of our license.
|
||||
// A copy of the current license can be obtained at any time by e-mailing
|
||||
// licensing@syncfusion.com. Any infringement will be prosecuted under
|
||||
// applicable laws.
|
||||
#endregion
|
||||
using Foundation;
|
||||
|
||||
namespace SampleBrowser.Maui.Cards
|
||||
{
|
||||
[Register("AppDelegate")]
|
||||
public class AppDelegate : MauiUIApplicationDelegate
|
||||
{
|
||||
protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>UIDeviceFamily</key>
|
||||
<array>
|
||||
<integer>1</integer>
|
||||
<integer>2</integer>
|
||||
</array>
|
||||
<key>UIRequiredDeviceCapabilities</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations~ipad</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>XSAppIconAssets</key>
|
||||
<string>Assets.xcassets/appicon.appiconset</string>
|
||||
</dict>
|
||||
</plist>
|
|
@ -0,0 +1,23 @@
|
|||
#region Copyright Syncfusion Inc. 2001-2023.
|
||||
// Copyright Syncfusion Inc. 2001-2023. All rights reserved.
|
||||
// Use of this code is subject to the terms of our license.
|
||||
// A copy of the current license can be obtained at any time by e-mailing
|
||||
// licensing@syncfusion.com. Any infringement will be prosecuted under
|
||||
// applicable laws.
|
||||
#endregion
|
||||
using ObjCRuntime;
|
||||
using UIKit;
|
||||
|
||||
namespace SampleBrowser.Maui.Cards
|
||||
{
|
||||
public class Program
|
||||
{
|
||||
// This is the main entry point of the application.
|
||||
static void Main(string[] args)
|
||||
{
|
||||
// if you want to use a different Application Delegate class from "AppDelegate"
|
||||
// you can specify it here.
|
||||
UIApplication.Main(args, null, typeof(AppDelegate));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"profiles": {
|
||||
"Windows Machine": {
|
||||
"commandName": "MsixPackage",
|
||||
"nativeDebugging": false
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
<svg width="456" height="456" viewBox="0 0 456 456" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M456 0H0V456H456V0Z" fill="#4822E3"/>
|
||||
</svg>
|
После Ширина: | Высота: | Размер: 154 B |
|
@ -0,0 +1,14 @@
|
|||
<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M48 0H0V48H48V0Z" fill="#4822E3"/>
|
||||
<g opacity="0.9">
|
||||
<rect x="15" y="17.3984" width="4.8406" height="4.80195" fill="white"/>
|
||||
<rect x="15" y="22.8086" width="4.8406" height="4.80195" fill="white"/>
|
||||
<rect x="15" y="28.1992" width="4.8406" height="4.80195" fill="white"/>
|
||||
<rect x="20.4473" y="17.3984" width="4.8406" height="4.80195" fill="white"/>
|
||||
<rect x="20.4473" y="22.8086" width="4.8406" height="4.80195" fill="white"/>
|
||||
<rect x="20.4473" y="28.1992" width="4.8406" height="4.80195" fill="white"/>
|
||||
<rect width="4.82131" height="4.82131" transform="matrix(0.709935 0.704267 -0.709935 0.704267 30.5234 15)" fill="white"/>
|
||||
<rect x="25.8906" y="22.8086" width="4.8406" height="4.80195" fill="white"/>
|
||||
<rect x="25.8906" y="28.1992" width="4.8406" height="4.80195" fill="white"/>
|
||||
</g>
|
||||
</svg>
|
После Ширина: | Высота: | Размер: 893 B |
Двоичные данные
MAUI/Cards/SampleBrowser.Maui.Cards/Resources/Fonts/OpenSans-Regular.ttf
Normal file
Двоичные данные
MAUI/Cards/SampleBrowser.Maui.Cards/Resources/Fonts/OpenSans-Regular.ttf
Normal file
Двоичный файл не отображается.
Двоичные данные
MAUI/Cards/SampleBrowser.Maui.Cards/Resources/Fonts/OpenSans-Semibold.ttf
Normal file
Двоичные данные
MAUI/Cards/SampleBrowser.Maui.Cards/Resources/Fonts/OpenSans-Semibold.ttf
Normal file
Двоичный файл не отображается.
Двоичный файл не отображается.
Двоичный файл не отображается.
|
@ -0,0 +1,15 @@
|
|||
Any raw assets you want to be deployed with your application can be placed in
|
||||
this directory (and child directories). Deployment of the asset to your application
|
||||
is automatically handled by the following `MauiAsset` Build Action within your `.csproj`.
|
||||
|
||||
<MauiAsset Include="Resources\Raw\**" LogicalName="%(RecursiveDir)%(Filename)%(Extension)" />
|
||||
|
||||
These files will be deployed with you package and will be accessible using Essentials:
|
||||
|
||||
async Task LoadMauiAsset()
|
||||
{
|
||||
using var stream = await FileSystem.OpenAppPackageFileAsync("AboutAssets.txt");
|
||||
using var reader = new StreamReader(stream);
|
||||
|
||||
var contents = reader.ReadToEnd();
|
||||
}
|
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
После Ширина: | Высота: | Размер: 17 KiB |
|
@ -0,0 +1,45 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<?xaml-comp compile="true" ?>
|
||||
<ResourceDictionary
|
||||
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml">
|
||||
|
||||
<!-- Note: For Android please see also Platforms\Android\Resources\values\colors.xml -->
|
||||
|
||||
<Color x:Key="Primary">#512BD4</Color>
|
||||
<Color x:Key="PrimaryDark">#ac99ea</Color>
|
||||
<Color x:Key="PrimaryDarkText">#242424</Color>
|
||||
<Color x:Key="Secondary">#DFD8F7</Color>
|
||||
<Color x:Key="SecondaryDarkText">#9880e5</Color>
|
||||
<Color x:Key="Tertiary">#2B0B98</Color>
|
||||
|
||||
<Color x:Key="White">White</Color>
|
||||
<Color x:Key="Black">Black</Color>
|
||||
<Color x:Key="Magenta">#D600AA</Color>
|
||||
<Color x:Key="MidnightBlue">#190649</Color>
|
||||
<Color x:Key="OffBlack">#1f1f1f</Color>
|
||||
|
||||
<Color x:Key="Gray100">#E1E1E1</Color>
|
||||
<Color x:Key="Gray200">#C8C8C8</Color>
|
||||
<Color x:Key="Gray300">#ACACAC</Color>
|
||||
<Color x:Key="Gray400">#919191</Color>
|
||||
<Color x:Key="Gray500">#6E6E6E</Color>
|
||||
<Color x:Key="Gray600">#404040</Color>
|
||||
<Color x:Key="Gray900">#212121</Color>
|
||||
<Color x:Key="Gray950">#141414</Color>
|
||||
|
||||
<SolidColorBrush x:Key="PrimaryBrush" Color="{StaticResource Primary}"/>
|
||||
<SolidColorBrush x:Key="SecondaryBrush" Color="{StaticResource Secondary}"/>
|
||||
<SolidColorBrush x:Key="TertiaryBrush" Color="{StaticResource Tertiary}"/>
|
||||
<SolidColorBrush x:Key="WhiteBrush" Color="{StaticResource White}"/>
|
||||
<SolidColorBrush x:Key="BlackBrush" Color="{StaticResource Black}"/>
|
||||
|
||||
<SolidColorBrush x:Key="Gray100Brush" Color="{StaticResource Gray100}"/>
|
||||
<SolidColorBrush x:Key="Gray200Brush" Color="{StaticResource Gray200}"/>
|
||||
<SolidColorBrush x:Key="Gray300Brush" Color="{StaticResource Gray300}"/>
|
||||
<SolidColorBrush x:Key="Gray400Brush" Color="{StaticResource Gray400}"/>
|
||||
<SolidColorBrush x:Key="Gray500Brush" Color="{StaticResource Gray500}"/>
|
||||
<SolidColorBrush x:Key="Gray600Brush" Color="{StaticResource Gray600}"/>
|
||||
<SolidColorBrush x:Key="Gray900Brush" Color="{StaticResource Gray900}"/>
|
||||
<SolidColorBrush x:Key="Gray950Brush" Color="{StaticResource Gray950}"/>
|
||||
</ResourceDictionary>
|
|
@ -0,0 +1,426 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<?xaml-comp compile="true" ?>
|
||||
<ResourceDictionary
|
||||
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml">
|
||||
|
||||
<Style TargetType="ActivityIndicator">
|
||||
<Setter Property="Color" Value="{AppThemeBinding Light={StaticResource Primary}, Dark={StaticResource White}}" />
|
||||
</Style>
|
||||
|
||||
<Style TargetType="IndicatorView">
|
||||
<Setter Property="IndicatorColor" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource Gray500}}"/>
|
||||
<Setter Property="SelectedIndicatorColor" Value="{AppThemeBinding Light={StaticResource Gray950}, Dark={StaticResource Gray100}}"/>
|
||||
</Style>
|
||||
|
||||
<Style TargetType="Border">
|
||||
<Setter Property="Stroke" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource Gray500}}" />
|
||||
<Setter Property="StrokeShape" Value="Rectangle"/>
|
||||
<Setter Property="StrokeThickness" Value="1"/>
|
||||
</Style>
|
||||
|
||||
<Style TargetType="BoxView">
|
||||
<Setter Property="BackgroundColor" Value="{AppThemeBinding Light={StaticResource Gray950}, Dark={StaticResource Gray200}}" />
|
||||
</Style>
|
||||
|
||||
<Style TargetType="Button">
|
||||
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource White}, Dark={StaticResource PrimaryDarkText}}" />
|
||||
<Setter Property="BackgroundColor" Value="{AppThemeBinding Light={StaticResource Primary}, Dark={StaticResource PrimaryDark}}" />
|
||||
<Setter Property="FontFamily" Value="OpenSansRegular"/>
|
||||
<Setter Property="FontSize" Value="14"/>
|
||||
<Setter Property="BorderWidth" Value="0"/>
|
||||
<Setter Property="CornerRadius" Value="8"/>
|
||||
<Setter Property="Padding" Value="14,10"/>
|
||||
<Setter Property="MinimumHeightRequest" Value="44"/>
|
||||
<Setter Property="MinimumWidthRequest" Value="44"/>
|
||||
<Setter Property="VisualStateManager.VisualStateGroups">
|
||||
<VisualStateGroupList>
|
||||
<VisualStateGroup x:Name="CommonStates">
|
||||
<VisualState x:Name="Normal" />
|
||||
<VisualState x:Name="Disabled">
|
||||
<VisualState.Setters>
|
||||
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Gray950}, Dark={StaticResource Gray200}}" />
|
||||
<Setter Property="BackgroundColor" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource Gray600}}" />
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
<VisualState x:Name="PointerOver" />
|
||||
</VisualStateGroup>
|
||||
</VisualStateGroupList>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style TargetType="CheckBox">
|
||||
<Setter Property="Color" Value="{AppThemeBinding Light={StaticResource Primary}, Dark={StaticResource White}}" />
|
||||
<Setter Property="MinimumHeightRequest" Value="44"/>
|
||||
<Setter Property="MinimumWidthRequest" Value="44"/>
|
||||
<Setter Property="VisualStateManager.VisualStateGroups">
|
||||
<VisualStateGroupList>
|
||||
<VisualStateGroup x:Name="CommonStates">
|
||||
<VisualState x:Name="Normal" />
|
||||
<VisualState x:Name="Disabled">
|
||||
<VisualState.Setters>
|
||||
<Setter Property="Color" Value="{AppThemeBinding Light={StaticResource Gray300}, Dark={StaticResource Gray600}}" />
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
</VisualStateGroup>
|
||||
</VisualStateGroupList>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style TargetType="DatePicker">
|
||||
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Gray900}, Dark={StaticResource White}}" />
|
||||
<Setter Property="BackgroundColor" Value="Transparent" />
|
||||
<Setter Property="FontFamily" Value="OpenSansRegular"/>
|
||||
<Setter Property="FontSize" Value="14"/>
|
||||
<Setter Property="MinimumHeightRequest" Value="44"/>
|
||||
<Setter Property="MinimumWidthRequest" Value="44"/>
|
||||
<Setter Property="VisualStateManager.VisualStateGroups">
|
||||
<VisualStateGroupList>
|
||||
<VisualStateGroup x:Name="CommonStates">
|
||||
<VisualState x:Name="Normal" />
|
||||
<VisualState x:Name="Disabled">
|
||||
<VisualState.Setters>
|
||||
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource Gray500}}" />
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
</VisualStateGroup>
|
||||
</VisualStateGroupList>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style TargetType="Editor">
|
||||
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Black}, Dark={StaticResource White}}" />
|
||||
<Setter Property="BackgroundColor" Value="Transparent" />
|
||||
<Setter Property="FontFamily" Value="OpenSansRegular"/>
|
||||
<Setter Property="FontSize" Value="14" />
|
||||
<Setter Property="PlaceholderColor" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource Gray500}}" />
|
||||
<Setter Property="MinimumHeightRequest" Value="44"/>
|
||||
<Setter Property="MinimumWidthRequest" Value="44"/>
|
||||
<Setter Property="VisualStateManager.VisualStateGroups">
|
||||
<VisualStateGroupList>
|
||||
<VisualStateGroup x:Name="CommonStates">
|
||||
<VisualState x:Name="Normal" />
|
||||
<VisualState x:Name="Disabled">
|
||||
<VisualState.Setters>
|
||||
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Gray300}, Dark={StaticResource Gray600}}" />
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
</VisualStateGroup>
|
||||
</VisualStateGroupList>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style TargetType="Entry">
|
||||
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Black}, Dark={StaticResource White}}" />
|
||||
<Setter Property="BackgroundColor" Value="Transparent" />
|
||||
<Setter Property="FontFamily" Value="OpenSansRegular"/>
|
||||
<Setter Property="FontSize" Value="14" />
|
||||
<Setter Property="PlaceholderColor" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource Gray500}}" />
|
||||
<Setter Property="MinimumHeightRequest" Value="44"/>
|
||||
<Setter Property="MinimumWidthRequest" Value="44"/>
|
||||
<Setter Property="VisualStateManager.VisualStateGroups">
|
||||
<VisualStateGroupList>
|
||||
<VisualStateGroup x:Name="CommonStates">
|
||||
<VisualState x:Name="Normal" />
|
||||
<VisualState x:Name="Disabled">
|
||||
<VisualState.Setters>
|
||||
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Gray300}, Dark={StaticResource Gray600}}" />
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
</VisualStateGroup>
|
||||
</VisualStateGroupList>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style TargetType="Frame">
|
||||
<Setter Property="HasShadow" Value="False" />
|
||||
<Setter Property="BorderColor" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource Gray950}}" />
|
||||
<Setter Property="CornerRadius" Value="8" />
|
||||
</Style>
|
||||
|
||||
<Style TargetType="ImageButton">
|
||||
<Setter Property="Opacity" Value="1" />
|
||||
<Setter Property="BorderColor" Value="Transparent"/>
|
||||
<Setter Property="BorderWidth" Value="0"/>
|
||||
<Setter Property="CornerRadius" Value="0"/>
|
||||
<Setter Property="MinimumHeightRequest" Value="44"/>
|
||||
<Setter Property="MinimumWidthRequest" Value="44"/>
|
||||
<Setter Property="VisualStateManager.VisualStateGroups">
|
||||
<VisualStateGroupList>
|
||||
<VisualStateGroup x:Name="CommonStates">
|
||||
<VisualState x:Name="Normal" />
|
||||
<VisualState x:Name="Disabled">
|
||||
<VisualState.Setters>
|
||||
<Setter Property="Opacity" Value="0.5" />
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
<VisualState x:Name="PointerOver" />
|
||||
</VisualStateGroup>
|
||||
</VisualStateGroupList>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style TargetType="Label">
|
||||
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Black}, Dark={StaticResource White}}" />
|
||||
<Setter Property="BackgroundColor" Value="Transparent" />
|
||||
<Setter Property="FontFamily" Value="OpenSansRegular" />
|
||||
<Setter Property="FontSize" Value="14" />
|
||||
<Setter Property="VisualStateManager.VisualStateGroups">
|
||||
<VisualStateGroupList>
|
||||
<VisualStateGroup x:Name="CommonStates">
|
||||
<VisualState x:Name="Normal" />
|
||||
<VisualState x:Name="Disabled">
|
||||
<VisualState.Setters>
|
||||
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Gray300}, Dark={StaticResource Gray600}}" />
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
</VisualStateGroup>
|
||||
</VisualStateGroupList>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style TargetType="Span">
|
||||
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Black}, Dark={StaticResource White}}" />
|
||||
</Style>
|
||||
|
||||
<Style TargetType="Label" x:Key="Headline">
|
||||
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource MidnightBlue}, Dark={StaticResource White}}" />
|
||||
<Setter Property="FontSize" Value="32" />
|
||||
<Setter Property="HorizontalOptions" Value="Center" />
|
||||
<Setter Property="HorizontalTextAlignment" Value="Center" />
|
||||
</Style>
|
||||
|
||||
<Style TargetType="Label" x:Key="SubHeadline">
|
||||
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource MidnightBlue}, Dark={StaticResource White}}" />
|
||||
<Setter Property="FontSize" Value="24" />
|
||||
<Setter Property="HorizontalOptions" Value="Center" />
|
||||
<Setter Property="HorizontalTextAlignment" Value="Center" />
|
||||
</Style>
|
||||
|
||||
<Style TargetType="ListView">
|
||||
<Setter Property="SeparatorColor" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource Gray500}}" />
|
||||
<Setter Property="RefreshControlColor" Value="{AppThemeBinding Light={StaticResource Gray900}, Dark={StaticResource Gray200}}" />
|
||||
</Style>
|
||||
|
||||
<Style TargetType="Picker">
|
||||
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Gray900}, Dark={StaticResource White}}" />
|
||||
<Setter Property="TitleColor" Value="{AppThemeBinding Light={StaticResource Gray900}, Dark={StaticResource Gray200}}" />
|
||||
<Setter Property="BackgroundColor" Value="Transparent" />
|
||||
<Setter Property="FontFamily" Value="OpenSansRegular"/>
|
||||
<Setter Property="FontSize" Value="14"/>
|
||||
<Setter Property="MinimumHeightRequest" Value="44"/>
|
||||
<Setter Property="MinimumWidthRequest" Value="44"/>
|
||||
<Setter Property="VisualStateManager.VisualStateGroups">
|
||||
<VisualStateGroupList>
|
||||
<VisualStateGroup x:Name="CommonStates">
|
||||
<VisualState x:Name="Normal" />
|
||||
<VisualState x:Name="Disabled">
|
||||
<VisualState.Setters>
|
||||
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Gray300}, Dark={StaticResource Gray600}}" />
|
||||
<Setter Property="TitleColor" Value="{AppThemeBinding Light={StaticResource Gray300}, Dark={StaticResource Gray600}}" />
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
</VisualStateGroup>
|
||||
</VisualStateGroupList>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style TargetType="ProgressBar">
|
||||
<Setter Property="ProgressColor" Value="{AppThemeBinding Light={StaticResource Primary}, Dark={StaticResource White}}" />
|
||||
<Setter Property="VisualStateManager.VisualStateGroups">
|
||||
<VisualStateGroupList>
|
||||
<VisualStateGroup x:Name="CommonStates">
|
||||
<VisualState x:Name="Normal" />
|
||||
<VisualState x:Name="Disabled">
|
||||
<VisualState.Setters>
|
||||
<Setter Property="ProgressColor" Value="{AppThemeBinding Light={StaticResource Gray300}, Dark={StaticResource Gray600}}" />
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
</VisualStateGroup>
|
||||
</VisualStateGroupList>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style TargetType="RadioButton">
|
||||
<Setter Property="BackgroundColor" Value="Transparent"/>
|
||||
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Black}, Dark={StaticResource White}}" />
|
||||
<Setter Property="FontFamily" Value="OpenSansRegular"/>
|
||||
<Setter Property="FontSize" Value="14"/>
|
||||
<Setter Property="MinimumHeightRequest" Value="44"/>
|
||||
<Setter Property="MinimumWidthRequest" Value="44"/>
|
||||
<Setter Property="VisualStateManager.VisualStateGroups">
|
||||
<VisualStateGroupList>
|
||||
<VisualStateGroup x:Name="CommonStates">
|
||||
<VisualState x:Name="Normal" />
|
||||
<VisualState x:Name="Disabled">
|
||||
<VisualState.Setters>
|
||||
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Gray300}, Dark={StaticResource Gray600}}" />
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
</VisualStateGroup>
|
||||
</VisualStateGroupList>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style TargetType="RefreshView">
|
||||
<Setter Property="RefreshColor" Value="{AppThemeBinding Light={StaticResource Gray900}, Dark={StaticResource Gray200}}" />
|
||||
</Style>
|
||||
|
||||
<Style TargetType="SearchBar">
|
||||
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Gray900}, Dark={StaticResource White}}" />
|
||||
<Setter Property="PlaceholderColor" Value="{StaticResource Gray500}" />
|
||||
<Setter Property="CancelButtonColor" Value="{StaticResource Gray500}" />
|
||||
<Setter Property="BackgroundColor" Value="Transparent" />
|
||||
<Setter Property="FontFamily" Value="OpenSansRegular" />
|
||||
<Setter Property="FontSize" Value="14" />
|
||||
<Setter Property="MinimumHeightRequest" Value="44"/>
|
||||
<Setter Property="MinimumWidthRequest" Value="44"/>
|
||||
<Setter Property="VisualStateManager.VisualStateGroups">
|
||||
<VisualStateGroupList>
|
||||
<VisualStateGroup x:Name="CommonStates">
|
||||
<VisualState x:Name="Normal" />
|
||||
<VisualState x:Name="Disabled">
|
||||
<VisualState.Setters>
|
||||
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Gray300}, Dark={StaticResource Gray600}}" />
|
||||
<Setter Property="PlaceholderColor" Value="{AppThemeBinding Light={StaticResource Gray300}, Dark={StaticResource Gray600}}" />
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
</VisualStateGroup>
|
||||
</VisualStateGroupList>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style TargetType="SearchHandler">
|
||||
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Gray900}, Dark={StaticResource White}}" />
|
||||
<Setter Property="PlaceholderColor" Value="{StaticResource Gray500}" />
|
||||
<Setter Property="BackgroundColor" Value="Transparent" />
|
||||
<Setter Property="FontFamily" Value="OpenSansRegular" />
|
||||
<Setter Property="FontSize" Value="14" />
|
||||
<Setter Property="VisualStateManager.VisualStateGroups">
|
||||
<VisualStateGroupList>
|
||||
<VisualStateGroup x:Name="CommonStates">
|
||||
<VisualState x:Name="Normal" />
|
||||
<VisualState x:Name="Disabled">
|
||||
<VisualState.Setters>
|
||||
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Gray300}, Dark={StaticResource Gray600}}" />
|
||||
<Setter Property="PlaceholderColor" Value="{AppThemeBinding Light={StaticResource Gray300}, Dark={StaticResource Gray600}}" />
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
</VisualStateGroup>
|
||||
</VisualStateGroupList>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style TargetType="Shadow">
|
||||
<Setter Property="Radius" Value="15" />
|
||||
<Setter Property="Opacity" Value="0.5" />
|
||||
<Setter Property="Brush" Value="{AppThemeBinding Light={StaticResource White}, Dark={StaticResource White}}" />
|
||||
<Setter Property="Offset" Value="10,10" />
|
||||
</Style>
|
||||
|
||||
<Style TargetType="Slider">
|
||||
<Setter Property="MinimumTrackColor" Value="{AppThemeBinding Light={StaticResource Primary}, Dark={StaticResource White}}" />
|
||||
<Setter Property="MaximumTrackColor" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource Gray600}}" />
|
||||
<Setter Property="ThumbColor" Value="{AppThemeBinding Light={StaticResource Primary}, Dark={StaticResource White}}" />
|
||||
<Setter Property="VisualStateManager.VisualStateGroups">
|
||||
<VisualStateGroupList>
|
||||
<VisualStateGroup x:Name="CommonStates">
|
||||
<VisualState x:Name="Normal" />
|
||||
<VisualState x:Name="Disabled">
|
||||
<VisualState.Setters>
|
||||
<Setter Property="MinimumTrackColor" Value="{AppThemeBinding Light={StaticResource Gray300}, Dark={StaticResource Gray600}}"/>
|
||||
<Setter Property="MaximumTrackColor" Value="{AppThemeBinding Light={StaticResource Gray300}, Dark={StaticResource Gray600}}"/>
|
||||
<Setter Property="ThumbColor" Value="{AppThemeBinding Light={StaticResource Gray300}, Dark={StaticResource Gray600}}"/>
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
</VisualStateGroup>
|
||||
</VisualStateGroupList>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style TargetType="SwipeItem">
|
||||
<Setter Property="BackgroundColor" Value="{AppThemeBinding Light={StaticResource White}, Dark={StaticResource Black}}" />
|
||||
</Style>
|
||||
|
||||
<Style TargetType="Switch">
|
||||
<Setter Property="OnColor" Value="{AppThemeBinding Light={StaticResource Primary}, Dark={StaticResource White}}" />
|
||||
<Setter Property="ThumbColor" Value="{StaticResource White}" />
|
||||
<Setter Property="VisualStateManager.VisualStateGroups">
|
||||
<VisualStateGroupList>
|
||||
<VisualStateGroup x:Name="CommonStates">
|
||||
<VisualState x:Name="Normal" />
|
||||
<VisualState x:Name="Disabled">
|
||||
<VisualState.Setters>
|
||||
<Setter Property="OnColor" Value="{AppThemeBinding Light={StaticResource Gray300}, Dark={StaticResource Gray600}}" />
|
||||
<Setter Property="ThumbColor" Value="{AppThemeBinding Light={StaticResource Gray300}, Dark={StaticResource Gray600}}" />
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
<VisualState x:Name="On">
|
||||
<VisualState.Setters>
|
||||
<Setter Property="OnColor" Value="{AppThemeBinding Light={StaticResource Secondary}, Dark={StaticResource Gray200}}" />
|
||||
<Setter Property="ThumbColor" Value="{AppThemeBinding Light={StaticResource Primary}, Dark={StaticResource White}}" />
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
<VisualState x:Name="Off">
|
||||
<VisualState.Setters>
|
||||
<Setter Property="ThumbColor" Value="{AppThemeBinding Light={StaticResource Gray400}, Dark={StaticResource Gray500}}" />
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
</VisualStateGroup>
|
||||
</VisualStateGroupList>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style TargetType="TimePicker">
|
||||
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Gray900}, Dark={StaticResource White}}" />
|
||||
<Setter Property="BackgroundColor" Value="Transparent"/>
|
||||
<Setter Property="FontFamily" Value="OpenSansRegular"/>
|
||||
<Setter Property="FontSize" Value="14"/>
|
||||
<Setter Property="MinimumHeightRequest" Value="44"/>
|
||||
<Setter Property="MinimumWidthRequest" Value="44"/>
|
||||
<Setter Property="VisualStateManager.VisualStateGroups">
|
||||
<VisualStateGroupList>
|
||||
<VisualStateGroup x:Name="CommonStates">
|
||||
<VisualState x:Name="Normal" />
|
||||
<VisualState x:Name="Disabled">
|
||||
<VisualState.Setters>
|
||||
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Gray300}, Dark={StaticResource Gray600}}" />
|
||||
</VisualState.Setters>
|
||||
</VisualState>
|
||||
</VisualStateGroup>
|
||||
</VisualStateGroupList>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style TargetType="Page" ApplyToDerivedTypes="True">
|
||||
<Setter Property="Padding" Value="0"/>
|
||||
<Setter Property="BackgroundColor" Value="{AppThemeBinding Light={StaticResource White}, Dark={StaticResource OffBlack}}" />
|
||||
</Style>
|
||||
|
||||
<Style TargetType="Shell" ApplyToDerivedTypes="True">
|
||||
<Setter Property="Shell.BackgroundColor" Value="{AppThemeBinding Light={StaticResource White}, Dark={StaticResource OffBlack}}" />
|
||||
<Setter Property="Shell.ForegroundColor" Value="{OnPlatform WinUI={StaticResource Primary}, Default={StaticResource White}}" />
|
||||
<Setter Property="Shell.TitleColor" Value="{AppThemeBinding Light={StaticResource Black}, Dark={StaticResource SecondaryDarkText}}" />
|
||||
<Setter Property="Shell.DisabledColor" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource Gray950}}" />
|
||||
<Setter Property="Shell.UnselectedColor" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource Gray200}}" />
|
||||
<Setter Property="Shell.NavBarHasShadow" Value="False" />
|
||||
<Setter Property="Shell.TabBarBackgroundColor" Value="{AppThemeBinding Light={StaticResource White}, Dark={StaticResource Black}}" />
|
||||
<Setter Property="Shell.TabBarForegroundColor" Value="{AppThemeBinding Light={StaticResource Magenta}, Dark={StaticResource White}}" />
|
||||
<Setter Property="Shell.TabBarTitleColor" Value="{AppThemeBinding Light={StaticResource Magenta}, Dark={StaticResource White}}" />
|
||||
<Setter Property="Shell.TabBarUnselectedColor" Value="{AppThemeBinding Light={StaticResource Gray900}, Dark={StaticResource Gray200}}" />
|
||||
</Style>
|
||||
|
||||
<Style TargetType="NavigationPage">
|
||||
<Setter Property="BarBackgroundColor" Value="{AppThemeBinding Light={StaticResource White}, Dark={StaticResource OffBlack}}" />
|
||||
<Setter Property="BarTextColor" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource White}}" />
|
||||
<Setter Property="IconColor" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource White}}" />
|
||||
</Style>
|
||||
|
||||
<Style TargetType="TabbedPage">
|
||||
<Setter Property="BarBackgroundColor" Value="{AppThemeBinding Light={StaticResource White}, Dark={StaticResource Gray950}}" />
|
||||
<Setter Property="BarTextColor" Value="{AppThemeBinding Light={StaticResource Magenta}, Dark={StaticResource White}}" />
|
||||
<Setter Property="UnselectedTabColor" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource Gray950}}" />
|
||||
<Setter Property="SelectedTabColor" Value="{AppThemeBinding Light={StaticResource Gray950}, Dark={StaticResource Gray200}}" />
|
||||
</Style>
|
||||
|
||||
</ResourceDictionary>
|
|
@ -0,0 +1,79 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>net8.0-android;net8.0-ios;net8.0-maccatalyst</TargetFrameworks>
|
||||
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net8.0-windows10.0.19041.0</TargetFrameworks>
|
||||
<!-- Uncomment to also build the tizen app. You will need to install tizen by following this: https://github.com/Samsung/Tizen.NET -->
|
||||
<!-- <TargetFrameworks>$(TargetFrameworks);net8.0-tizen</TargetFrameworks> -->
|
||||
|
||||
<!-- Note for MacCatalyst:
|
||||
The default runtime is maccatalyst-x64, except in Release config, in which case the default is maccatalyst-x64;maccatalyst-arm64.
|
||||
When specifying both architectures, use the plural <RuntimeIdentifiers> instead of the singular <RuntimeIdentifier>.
|
||||
The Mac App Store will NOT accept apps with ONLY maccatalyst-arm64 indicated;
|
||||
either BOTH runtimes must be indicated or ONLY macatalyst-x64. -->
|
||||
<!-- For example: <RuntimeIdentifiers>maccatalyst-x64;maccatalyst-arm64</RuntimeIdentifiers> -->
|
||||
|
||||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>SampleBrowser.Maui.Cards</RootNamespace>
|
||||
<UseMaui>true</UseMaui>
|
||||
<SingleProject>true</SingleProject>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<NoWarn>$(NoWarn);NU1803</NoWarn>
|
||||
|
||||
<!-- Display name -->
|
||||
<ApplicationTitle>SampleBrowser.Maui.Cards</ApplicationTitle>
|
||||
|
||||
<!-- App Identifier -->
|
||||
<ApplicationId>com.companyname.samplebrowser.maui.cards</ApplicationId>
|
||||
|
||||
<!-- Versions -->
|
||||
<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
|
||||
<ApplicationVersion>1</ApplicationVersion>
|
||||
|
||||
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">11.0</SupportedOSPlatformVersion>
|
||||
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">13.1</SupportedOSPlatformVersion>
|
||||
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">21.0</SupportedOSPlatformVersion>
|
||||
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</SupportedOSPlatformVersion>
|
||||
<TargetPlatformMinVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</TargetPlatformMinVersion>
|
||||
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'tizen'">6.5</SupportedOSPlatformVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<!-- App Icon -->
|
||||
<MauiIcon Include="Resources\AppIcon\appicon.svg" ForegroundFile="Resources\AppIcon\appiconfg.svg" Color="#512BD4" />
|
||||
|
||||
<!-- Splash Screen -->
|
||||
<MauiSplashScreen Include="Resources\Splash\splash.svg" Color="#512BD4" BaseSize="128,128" />
|
||||
|
||||
<!-- Custom Fonts -->
|
||||
<MauiFont Include="Resources\Fonts\*" />
|
||||
|
||||
<!-- Raw Assets (also remove the "Resources\Raw" prefix) -->
|
||||
<MauiAsset Include="Resources\Raw\**" LogicalName="%(RecursiveDir)%(Filename)%(Extension)" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Remove="ControlList.xml" />
|
||||
<None Remove="CardsSamplesList.xml" />
|
||||
<None Remove="SyncfusionLicense.txt" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="ControlList.xml" />
|
||||
<EmbeddedResource Include="CardsSamplesList.xml" />
|
||||
<EmbeddedResource Include="SyncfusionLicense.txt" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiVersion)" />
|
||||
<PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="$(MauiVersion)" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="SampleBrowser.Maui.Base" version="24.1.41" />
|
||||
<PackageReference Include="Syncfusion.Maui.Cards" version="24.1.41" />
|
||||
<PackageReference Include="Syncfusion.Maui.Core" version="24.1.41" />
|
||||
<PackageReference Include="Syncfusion.Maui.TabView" version="24.1.41" />
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -0,0 +1,15 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
|
||||
<metadata>
|
||||
<id>SampleBrowser.Maui.Cards</id>
|
||||
<version>20.1.0.1</version>
|
||||
<authors>Syncfusion Inc.</authors>
|
||||
<owners>Syncfusion Inc.</owners>
|
||||
<requireLicenseAcceptance>true</requireLicenseAcceptance>
|
||||
<licenseUrl>http://www.syncfusion.com/nuget/license</licenseUrl>
|
||||
<projectUrl>http://www.syncfusion.com/</projectUrl>
|
||||
<iconUrl>http://www.syncfusion.com/content/images/nuget/sync_logo_icon.png</iconUrl>
|
||||
<description>Cards component for Syncfusion .NET MAUI</description>
|
||||
<copyright>Copyright 2001 - 2019 Syncfusion Inc.</copyright>
|
||||
</metadata>
|
||||
</package>
|
|
@ -0,0 +1,45 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Compile Include="$(MSBuildThisFileDirectory)\Samples\Cards\GettingStarted\View\CardView.xaml.cs">
|
||||
<Link>Samples\Cards\GettingStarted\View\CardView.xaml.cs</Link>
|
||||
<DependentUpon>CardView.xaml</DependentUpon>
|
||||
</Compile>
|
||||
|
||||
<Compile Include="$(MSBuildThisFileDirectory)\Samples\Cards\CardManager\View\CreditCard.xaml.cs">
|
||||
<Link>Samples\Cards\CardManager\View\CreditCard.xaml.cs</Link>
|
||||
<DependentUpon>CreditCard.xaml</DependentUpon>
|
||||
</Compile>
|
||||
|
||||
<Compile Include="$(MSBuildThisFileDirectory)\Samples\Cards\GettingStarted\Behavior\GettingStartedBehavior.cs">
|
||||
<Link>Samples\Cards\GettingStarted\Behavior\GettingStartedBehavior.cs</Link>
|
||||
</Compile>
|
||||
|
||||
<Compile Include="$(MSBuildThisFileDirectory)\Samples\Cards\CardManager\Behavior\CreditCardBehavior.cs">
|
||||
<Link>Samples\Cards\CardManager\Behavior\CreditCardBehavior.cs</Link>
|
||||
</Compile>
|
||||
|
||||
<Compile Include="$(MSBuildThisFileDirectory)\Samples\Cards\GettingStarted\ViewModel\ViewModel.cs">
|
||||
<Link>Samples\Cards\GettingStarted\ViewModel\ViewModel.cs</Link>
|
||||
</Compile>
|
||||
|
||||
<Compile Include="$(MSBuildThisFileDirectory)\Samples\Cards\CardManager\ViewModel\CreditCardViewModel.cs">
|
||||
<Link>Samples\Cards\CardManager\ViewModel\CreditCardViewModel.cs</Link>
|
||||
</Compile>
|
||||
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
<EmbeddedResource Include="$(MSBuildThisFileDirectory)\CardsSamplesList.xml" >
|
||||
<Link>CardsSamplesList.xml</Link>
|
||||
</EmbeddedResource>
|
||||
<MauiXaml Include="$(MSBuildThisFileDirectory)\Samples\Cards\GettingStarted\View\CardView.xaml">
|
||||
<Link>Samples\Cards\GettingStarted\View\CardView.xaml</Link>
|
||||
</MauiXaml>
|
||||
<MauiXaml Include="$(MSBuildThisFileDirectory)\Samples\Cards\CardManager\View\CreditCard.xaml">
|
||||
<Link>Samples\Cards\CardManager\View\CreditCard.xaml</Link>
|
||||
</MauiXaml>
|
||||
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -0,0 +1,83 @@
|
|||
#region Copyright Syncfusion Inc. 2001-2023.
|
||||
// Copyright Syncfusion Inc. 2001-2023. All rights reserved.
|
||||
// Use of this code is subject to the terms of our license.
|
||||
// A copy of the current license can be obtained at any time by e-mailing
|
||||
// licensing@syncfusion.com. Any infringement will be prosecuted under
|
||||
// applicable laws.
|
||||
#endregion
|
||||
using SampleBrowser.Maui.Base;
|
||||
using Syncfusion.Maui.Cards;
|
||||
|
||||
namespace SampleBrowser.Maui.Cards.SfCards
|
||||
{
|
||||
public class CreditCardBehavior : Behavior<SampleView>
|
||||
{
|
||||
private SfCardLayout? cardLayout;
|
||||
|
||||
private Grid? firstCardTransactionDetails, secondCardTransactionDetails, thirdCardTransactionDetails;
|
||||
|
||||
/// <summary>
|
||||
/// Begins when the behavior attached to the view
|
||||
/// </summary>
|
||||
/// <param name="sampleView">bindable value</param>
|
||||
protected override void OnAttachedTo(SampleView sampleView)
|
||||
{
|
||||
base.OnAttachedTo(sampleView);
|
||||
this.cardLayout = sampleView.Content.FindByName<SfCardLayout>("cardLayout");
|
||||
this.firstCardTransactionDetails = sampleView.Content.FindByName<Grid>("firstCardTransactionDetails");
|
||||
this.secondCardTransactionDetails = sampleView.Content.FindByName<Grid>("secondCardTransactionDetails");
|
||||
this.thirdCardTransactionDetails = sampleView.Content.FindByName<Grid>("thirdCardTransactionDetails");
|
||||
|
||||
if (this.cardLayout != null)
|
||||
{
|
||||
this.cardLayout.VisibleIndexChanged += this.CardLayout_VisibleIndexChanged;
|
||||
this.cardLayout.VisibleIndexChanging += this.CardLayout_VisibleIndexChanging;
|
||||
}
|
||||
}
|
||||
|
||||
private void CardLayout_VisibleIndexChanging(object? sender, CardVisibleIndexChangingEventArgs e)
|
||||
{
|
||||
if (e.NewIndex == null)
|
||||
{
|
||||
e.Cancel = true;
|
||||
}
|
||||
}
|
||||
|
||||
private void CardLayout_VisibleIndexChanged(object? sender, CardVisibleIndexChangedEventArgs e)
|
||||
{
|
||||
if (this.firstCardTransactionDetails != null && this.secondCardTransactionDetails != null && this.thirdCardTransactionDetails != null && e.NewIndex != null)
|
||||
{
|
||||
this.firstCardTransactionDetails.IsVisible = false;
|
||||
this.secondCardTransactionDetails.IsVisible = false;
|
||||
this.thirdCardTransactionDetails.IsVisible = false;
|
||||
|
||||
if (e.NewIndex == 0)
|
||||
{
|
||||
this.thirdCardTransactionDetails.IsVisible = true;
|
||||
}
|
||||
else if (e.NewIndex == 1)
|
||||
{
|
||||
this.secondCardTransactionDetails.IsVisible = true;
|
||||
}
|
||||
else if (e.NewIndex == 2)
|
||||
{
|
||||
this.firstCardTransactionDetails.IsVisible = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Begins when the behavior attached to the view
|
||||
/// </summary>
|
||||
/// <param name="sampleView">bindable value</param>
|
||||
protected override void OnDetachingFrom(SampleView sampleView)
|
||||
{
|
||||
base.OnDetachingFrom(sampleView);
|
||||
if (this.cardLayout != null)
|
||||
{
|
||||
this.cardLayout.VisibleIndexChanged -= this.CardLayout_VisibleIndexChanged;
|
||||
this.cardLayout.VisibleIndexChanging -= this.CardLayout_VisibleIndexChanging;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,412 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<localCore:SampleView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
x:Class="SampleBrowser.Maui.Cards.SfCards.CreditCard"
|
||||
xmlns:cards="clr-namespace:Syncfusion.Maui.Cards;assembly=Syncfusion.Maui.Cards"
|
||||
xmlns:localCore="clr-namespace:SampleBrowser.Maui.Base;assembly=SampleBrowser.Maui.Base"
|
||||
xmlns:imageExtention="clr-namespace:SampleBrowser.Maui.Base.Converters;assembly=SampleBrowser.Maui.Base"
|
||||
xmlns:thickness ="clr-namespace:Microsoft.Maui;assembly=Microsoft.Maui"
|
||||
xmlns:local="clr-namespace:SampleBrowser.Maui.Cards.SfCards"
|
||||
Background="WhiteSmoke">
|
||||
<localCore:SampleView.Content>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="0.4*"/>
|
||||
<ColumnDefinition Width="0.6*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<Grid IsClippedToBounds="True" IsVisible="{OnPlatform WinUI=True, MacCatalyst=True, Default=False}" RowDefinitions="40, 60, *"
|
||||
Margin="0,40" HeightRequest="{OnPlatform MacCatalyst=430}"
|
||||
VerticalOptions="{OnPlatform Default=Fill, WinUI=Center}">
|
||||
<Image Source="{imageExtention:SfImageResource creditcard.png}" Aspect="AspectFit" Margin="50, 0, 0, 0"
|
||||
VerticalOptions="{OnPlatform WinUI=Center}"
|
||||
Grid.Row="2"/>
|
||||
<Label Grid.Row="1" Margin="50, 0, 0, 30" Text="Pay and manage your cards." FontSize="16" TextColor="Black" FontFamily="Roboto-Medium"/>
|
||||
</Grid>
|
||||
|
||||
<Frame HasShadow="False"
|
||||
Grid.ColumnSpan="{OnPlatform Default=2, WinUI=1, MacCatalyst=1}" CornerRadius="10"
|
||||
Grid.Column="{OnPlatform Default=0, WinUI=1, MacCatalyst=1}"
|
||||
VerticalOptions="{OnPlatform Default=Center, WinUI=Center, MacCatalyst=Center}"
|
||||
WidthRequest="{OnPlatform WinUI=400, MacCatalyst=400, Default=350}"
|
||||
HorizontalOptions="{OnPlatform WinUI=Center, MacCatalyst=Center, Default=Fill}"
|
||||
HeightRequest="{OnPlatform MacCatalyst=650}">
|
||||
<Frame.Padding>
|
||||
<OnPlatform x:TypeArguments="thickness:Thickness">
|
||||
<On Platform="MacCatalyst" Value="5,20,5,20"/>
|
||||
</OnPlatform>
|
||||
</Frame.Padding>
|
||||
|
||||
<Grid Padding="0,10,0,0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Frame BorderColor="LightGray" CornerRadius="20" HasShadow="False" Padding="0" Margin="20,0,20,10">
|
||||
<Grid Padding="10">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="70"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Image Grid.RowSpan="2" Source="{imageExtention:SfImageResource ellipse633.png}" HeightRequest="50" HorizontalOptions="Center" VerticalOptions="Center"/>
|
||||
<Label Grid.Column="1" Grid.Row="0" Text="Hey Rick," FontSize="16" FontFamily="Roboto-Medium" HorizontalOptions="Start" VerticalOptions="Center" TextColor="#4F4E4E"/>
|
||||
<Label Grid.Column="1" Grid.Row="1" Text="You have some dues pending" FontSize="12" HorizontalOptions="Start" VerticalOptions="Center" FontFamily="Roboto-Regular" TextColor="Gray"/>
|
||||
</Grid>
|
||||
</Frame>
|
||||
|
||||
<cards:SfCardLayout x:Name="cardLayout" Grid.Row="1" HeightRequest="200" WidthRequest="{OnPlatform Android=340, iOS=340, Default=360}" HorizontalCardSpacing="10" VerticalCardSpacing="0" BackgroundColor="White">
|
||||
<cards:SfCardView>
|
||||
<Grid>
|
||||
<Image Source="{imageExtention:SfImageResource eyes.jpg}" Aspect="AspectFill"/>
|
||||
<Grid Padding="20" Background="#472902" Opacity="0.9">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Label Text="Wells Fargo" HorizontalOptions="Start" TextColor="White" FontSize="18" FontFamily="Roboto-Medium"/>
|
||||
<Grid Grid.Row="1" Padding="0,20,0,15">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="60"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="{imageExtention:SfImageResource cardchip.png}" WidthRequest="60" HeightRequest="40" HorizontalOptions="Center" VerticalOptions="Center"/>
|
||||
<Label Grid.Column="1" Text="Business Elite" TextColor="White" FontSize="15" HorizontalOptions="Start" VerticalOptions="Center" Padding="30,0,0,0" FontFamily="Roboto-Medium"/>
|
||||
</Grid>
|
||||
<Label Grid.Row="2" HorizontalOptions="Start" VerticalOptions="End" Text="Rick Sanchez" FontSize="16" TextColor="White" FontFamily="Roboto-Medium"/>
|
||||
<Label Grid.Row="3" HorizontalOptions="Start" VerticalOptions="End" Text="9 0 5 7 4 0 8 1 2 1 7 5 0 0 5 6" TextColor="White" Padding="0,10,0,0" FontFamily="Roboto-Regular"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
</cards:SfCardView>
|
||||
|
||||
<cards:SfCardView>
|
||||
<Grid>
|
||||
<Image Source="{imageExtention:SfImageResource coinslandscape.jpg}" Aspect="AspectFill"/>
|
||||
<Grid Padding="20" Background="#b03f2b" Opacity="0.9">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Label Text="Chase" HorizontalOptions="Start" TextColor="White" FontSize="18" FontFamily="Roboto-Medium"/>
|
||||
<Grid Grid.Row="1" Padding="0,20,0,15">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="60"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="{imageExtention:SfImageResource cardchip.png}" WidthRequest="60" HeightRequest="40" HorizontalOptions="Center" VerticalOptions="Center"/>
|
||||
<Label Grid.Column="1" Text="Freedom" TextColor="White" FontSize="15" HorizontalOptions="Start" VerticalOptions="Center" Padding="30,0,0,0" FontFamily="Roboto-Medium"/>
|
||||
</Grid>
|
||||
<Label Grid.Row="2" HorizontalOptions="Start" VerticalOptions="End" Text="Rick Sanchez" FontSize="16" TextColor="White" FontFamily="Roboto-Medium"/>
|
||||
<Label Grid.Row="3" HorizontalOptions="Start" VerticalOptions="End" Text="7 4 5 6 0 0 2 1 9 4 4 7 3 8 0 9" TextColor="White" Padding="0,10,0,0" FontFamily="Roboto-Regular"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
</cards:SfCardView>
|
||||
|
||||
<cards:SfCardView>
|
||||
<Grid>
|
||||
<Image Source="{imageExtention:SfImageResource buildinglandscape.jpg}" Aspect="AspectFill"/>
|
||||
<Grid Padding="20" Background="#343434" Opacity="0.9">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Label Text="Synchrony Financial" HorizontalOptions="Start" TextColor="White" FontSize="18" FontFamily="Roboto-Medium"/>
|
||||
<Grid Grid.Row="1" Padding="0,20,0,15">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="60"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Source="{imageExtention:SfImageResource cardchip.png}" WidthRequest="60" HeightRequest="40" HorizontalOptions="Center" VerticalOptions="Center"/>
|
||||
<Label Grid.Column="1" Text="Platinum" TextColor="White" FontSize="15" HorizontalOptions="Start" VerticalOptions="Center" Padding="30,0,0,0" FontFamily="Roboto-Medium"/>
|
||||
</Grid>
|
||||
<Label Grid.Row="2" HorizontalOptions="Start" VerticalOptions="End" Text="Rick Sanchez" FontSize="16" TextColor="White" FontFamily="Roboto-Medium"/>
|
||||
<Label Grid.Row="3" HorizontalOptions="Start" VerticalOptions="End" Text="5 9 0 1 8 0 2 3 7 1 9 2 3 3 0 4" TextColor="White" Padding="0,10,0,0" FontFamily="Roboto-Regular"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
</cards:SfCardView>
|
||||
</cards:SfCardLayout>
|
||||
|
||||
<Grid Grid.Row="2" x:Name="firstCardTransactionDetails" Padding="15,10,15,10" IsVisible="True">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Frame HeightRequest="50" BorderColor="LightGray" HasShadow="False" VerticalOptions="Center" Padding="0">
|
||||
<Grid>
|
||||
<Grid.Padding>
|
||||
<OnPlatform x:TypeArguments="thickness:Thickness">
|
||||
<On Platform="MacCatalyst" Value="10,0,5,0"/>
|
||||
<On Platform="iOS" Value="10,0,5,0"/>
|
||||
<On Platform="Android" Value="10,5,5,5"/>
|
||||
<On Platform="WinUI" Value="10,5,5,5"/>
|
||||
</OnPlatform>
|
||||
</Grid.Padding>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="100"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Label Text="Total Due" FontSize="10" HorizontalOptions="Start" VerticalOptions="Center" TextColor="#4F4E4E" FontFamily="Roboto-Regular"/>
|
||||
<Label Grid.Row="1" Text="{Binding FirstCardTransaction.DueAmount}" FontSize="16" FontFamily="Roboto-Medium" TextColor="#4F4E4E" HorizontalOptions="Start" VerticalOptions="Start"/>
|
||||
<Button Grid.Column="1" Grid.RowSpan="2" Text="Pay Now" FontSize="12" HeightRequest="35" BackgroundColor="Black" Padding="0" HorizontalOptions="End" VerticalOptions="Center" WidthRequest="70" FontFamily="Roboto-Medium"/>
|
||||
</Grid>
|
||||
</Frame>
|
||||
<Grid Grid.Row="1" Padding="0,10,0,0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="30"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Label Text="Recent Transactions" FontSize="18" FontFamily="Roboto-Medium" TextColor="#4F4E4E"/>
|
||||
<ScrollView Grid.Row="1" Orientation="Vertical" VerticalScrollBarVisibility="Never" HeightRequest="{OnPlatform WinUI=130}">
|
||||
<StackLayout Orientation="Vertical">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="50"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Grid.RowSpan="2" Source="{imageExtention:SfImageResource shoes.png}" WidthRequest="50" HeightRequest="50"/>
|
||||
<Label Grid.Column="1" Text="{Binding FirstCardTransaction.FirstTransaction}" Padding="10" TextColor="#4F4E4E" FontFamily="Roboto-Medium"/>
|
||||
<Label Grid.Column="1" Grid.Row="1" Text="{Binding FirstCardTransaction.FirstTransactionDate}" FontSize="12" TextColor="Gray" Padding="10,0,0,0" FontFamily="Roboto-Regular"/>
|
||||
<Label Grid.Column="2" Grid.RowSpan="2" Text="{Binding FirstCardTransaction.FirstTransactionAmount}" FontSize="16" HorizontalOptions="End" VerticalOptions="Center" FontFamily="Roboto-Medium" TextColor="#4F4E4E"/>
|
||||
</Grid>
|
||||
<Grid Padding="0,10,0,0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="50"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Grid.RowSpan="2" Source="{imageExtention:SfImageResource pasta.png}" WidthRequest="50" HeightRequest="50"/>
|
||||
<Label Grid.Column="1" Text="{Binding FirstCardTransaction.SecondTransaction}" Padding="10" TextColor="#4F4E4E" FontFamily="Roboto-Medium"/>
|
||||
<Label Grid.Row="1" Grid.Column="1" Text="{Binding FirstCardTransaction.SecondTransactionDate}" FontSize="12" TextColor="Gray" Padding="10,0,0,0" FontFamily="Roboto-Regular"/>
|
||||
<Label Grid.Column="2" Grid.RowSpan="2" Text="{Binding FirstCardTransaction.SecondTransactionAmount}" FontSize="16" HorizontalOptions="End" VerticalOptions="Center" FontFamily="Roboto-Medium" TextColor="#4F4E4E"/>
|
||||
</Grid>
|
||||
<Grid Padding="0,10,0,10">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="50"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Grid.RowSpan="2" Source="{imageExtention:SfImageResource music.png}" WidthRequest="50" HeightRequest="50"/>
|
||||
<Label Grid.Column="1" Text="{Binding FirstCardTransaction.ThirdTransaction}" Padding="10" TextColor="#4F4E4E" FontFamily="Roboto-Medium"/>
|
||||
<Label Grid.Row="1" Grid.Column="1" Text="{Binding FirstCardTransaction.ThirdTransactionDate}" FontSize="12" TextColor="Gray" Padding="10,0,0,0" FontFamily="Roboto-Regular"/>
|
||||
<Label Grid.Column="2" Grid.RowSpan="2" Text="{Binding FirstCardTransaction.ThirdTransactionAmount}" FontSize="16" HorizontalOptions="End" VerticalOptions="Center" FontFamily="Roboto-Medium" TextColor="#4F4E4E"/>
|
||||
</Grid>
|
||||
</StackLayout>
|
||||
</ScrollView>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Row="2" x:Name="secondCardTransactionDetails" Padding="15,10,15,10" IsVisible="False">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Frame HeightRequest="50" BorderColor="LightGray" HasShadow="False" VerticalOptions="Center" Padding="0" >
|
||||
<Grid>
|
||||
<Grid.Padding>
|
||||
<OnPlatform x:TypeArguments="thickness:Thickness">
|
||||
<On Platform="MacCatalyst" Value="10,0,5,0"/>
|
||||
<On Platform="iOS" Value="10,0,5,0"/>
|
||||
<On Platform="Android" Value="10,5,5,5"/>
|
||||
<On Platform="WinUI" Value="10,5,5,5"/>
|
||||
</OnPlatform>
|
||||
</Grid.Padding>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="100"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Label Text="Total Due" FontSize="10" HorizontalOptions="Start" VerticalOptions="Center" TextColor="#4F4E4E" FontFamily="Roboto-Regular"/>
|
||||
<Label Grid.Row="1" Text="{Binding SecondCardTransaction.DueAmount}" FontSize="16" FontFamily="Roboto-Medium" TextColor="#4F4E4E" HorizontalOptions="Start" VerticalOptions="Start"/>
|
||||
<Button Grid.Column="1" Grid.RowSpan="2" Text="Pay Now" FontSize="12" HeightRequest="35" BackgroundColor="Black" Padding="0" HorizontalOptions="End" VerticalOptions="Center" WidthRequest="70" FontFamily="Roboto-Medium"/>
|
||||
</Grid>
|
||||
</Frame>
|
||||
<Grid Grid.Row="1" Padding="0,10,0,0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="30"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Label Text="Recent Transactions" FontSize="18" FontAttributes="Bold" TextColor="#4F4E4E"/>
|
||||
<ScrollView Grid.Row="1" Orientation="Vertical" VerticalScrollBarVisibility="Never" HeightRequest="{OnPlatform WinUI=130}">
|
||||
<StackLayout Orientation="Vertical" HorizontalOptions="Fill" VerticalOptions="Fill">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="50"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Grid.RowSpan="2" Source="{imageExtention:SfImageResource driverslicense.png}" WidthRequest="50" HeightRequest="50"/>
|
||||
<Label Grid.Column="1" Text="{Binding SecondCardTransaction.FirstTransaction}" Padding="10" TextColor="#4F4E4E" FontFamily="Roboto-Medium"/>
|
||||
<Label Grid.Row="1" Grid.Column="1" Text="{Binding SecondCardTransaction.FirstTransactionDate}" FontSize="12" TextColor="Gray" Padding="10,0,0,0" FontFamily="Roboto-Regular"/>
|
||||
<Label Grid.Column="2" Grid.RowSpan="2" Text="{Binding SecondCardTransaction.FirstTransactionAmount}" FontSize="16" HorizontalOptions="End" VerticalOptions="Center" FontFamily="Roboto-Medium" TextColor="#4F4E4E"/>
|
||||
</Grid>
|
||||
<Grid Padding="0,10,0,0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="50"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Grid.RowSpan="2" Source="{imageExtention:SfImageResource SandalsSpeaker.png}" WidthRequest="50" HeightRequest="50"/>
|
||||
<Label Grid.Column="1" Text="{Binding SecondCardTransaction.SecondTransaction}" Padding="10" TextColor="#4F4E4E" FontFamily="Roboto-Medium"/>
|
||||
<Label Grid.Row="1" Grid.Column="1" Text="{Binding SecondCardTransaction.SecondTransactionDate}" FontSize="12" TextColor="Gray" Padding="10,0,0,0" FontFamily="Roboto-Regular"/>
|
||||
<Label Grid.Column="2" Grid.RowSpan="2" Text="{Binding SecondCardTransaction.SecondTransactionAmount}" FontSize="16" HorizontalOptions="End" VerticalOptions="Center" FontFamily="Roboto-Medium" TextColor="#4F4E4E"/>
|
||||
</Grid>
|
||||
<Grid Padding="0,10,0,10">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="50"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Grid.RowSpan="2" Source="{imageExtention:SfImageResource house.png}" WidthRequest="50" HeightRequest="50"/>
|
||||
<Label Grid.Column="1" Text="{Binding SecondCardTransaction.ThirdTransaction}" Padding="10" TextColor="#4F4E4E" FontFamily="Roboto-Medium"/>
|
||||
<Label Grid.Row="1" Grid.Column="1" Text="{Binding SecondCardTransaction.ThirdTransactionDate}" FontSize="12" TextColor="Gray" Padding="10,0,0,0" FontFamily="Roboto-Regular"/>
|
||||
<Label Grid.Column="2" Grid.RowSpan="2" Text="{Binding SecondCardTransaction.ThirdTransactionAmount}" FontSize="16" HorizontalOptions="End" VerticalOptions="Center" FontFamily="Roboto-Medium" TextColor="#4F4E4E"/>
|
||||
</Grid>
|
||||
</StackLayout>
|
||||
</ScrollView>
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
<Grid Grid.Row="2" x:Name="thirdCardTransactionDetails" Padding="15,10,15,10" IsVisible="False">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Frame HeightRequest="50" BorderColor="LightGray" HasShadow="False" VerticalOptions="Center" Padding="0" >
|
||||
<Grid>
|
||||
<Grid.Padding>
|
||||
<OnPlatform x:TypeArguments="thickness:Thickness">
|
||||
<On Platform="MacCatalyst" Value="10,0,5,0"/>
|
||||
<On Platform="iOS" Value="10,0,5,0"/>
|
||||
<On Platform="Android" Value="10,5,5,5"/>
|
||||
<On Platform="WinUI" Value="10,5,5,5"/>
|
||||
</OnPlatform>
|
||||
</Grid.Padding>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="100"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Label Text="Total Due" FontSize="10" HorizontalOptions="Start" VerticalOptions="Center" TextColor="#4F4E4E" FontFamily="Roboto-Regular"/>
|
||||
<Label Grid.Row="1" Text="{Binding ThirdCardTransaction.DueAmount}" FontSize="16" FontFamily="Roboto-Medium" TextColor="#4F4E4E" HorizontalOptions="Start" VerticalOptions="Start"/>
|
||||
<Button Grid.Column="1" Grid.RowSpan="2" Text="Pay Now" FontSize="12" HeightRequest="35" BackgroundColor="Black" Padding="0" HorizontalOptions="End" VerticalOptions="Center" WidthRequest="70" FontFamily="Roboto-Medium"/>
|
||||
</Grid>
|
||||
</Frame>
|
||||
<Grid Grid.Row="1" Padding="0,10,0,0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="30"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Label Text="Recent Transactions" FontSize="18" FontAttributes="Bold" TextColor="#4F4E4E"/>
|
||||
<ScrollView Grid.Row="1" Orientation="Vertical" VerticalScrollBarVisibility="Never" HeightRequest="{OnPlatform WinUI=130}">
|
||||
<StackLayout Orientation="Vertical">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="50"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Grid.RowSpan="2" Source="{imageExtention:SfImageResource watchimage.png}" WidthRequest="50" HeightRequest="50"/>
|
||||
<Label Grid.Column="1" Text="{Binding ThirdCardTransaction.FirstTransaction}" Padding="10" TextColor="#4F4E4E" FontFamily="Roboto-Medium"/>
|
||||
<Label Grid.Row="1" Grid.Column="1" Text="{Binding ThirdCardTransaction.FirstTransactionDate}" FontSize="12" TextColor="Gray" Padding="10,0,0,0" FontFamily="Roboto-Regular"/>
|
||||
<Label Grid.Column="2" Grid.RowSpan="2" Text="{Binding ThirdCardTransaction.FirstTransactionAmount}" FontSize="16" HorizontalOptions="End" VerticalOptions="Center" FontFamily="Roboto-Medium" TextColor="#4F4E4E"/>
|
||||
</Grid>
|
||||
<Grid Padding="0,10,0,0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="50"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Grid.RowSpan="2" Source="{imageExtention:SfImageResource pizza.png}" WidthRequest="50" HeightRequest="50"/>
|
||||
<Label Grid.Column="1" Text="{Binding ThirdCardTransaction.SecondTransaction}" Padding="10" TextColor="#4F4E4E" FontFamily="Roboto-Medium"/>
|
||||
<Label Grid.Row="1" Grid.Column="1" Text="{Binding ThirdCardTransaction.SecondTransactionDate}" FontSize="12" TextColor="Gray" Padding="10,0,0,0" FontFamily="Roboto-Regular"/>
|
||||
<Label Grid.Column="2" Grid.RowSpan="2" Text="{Binding ThirdCardTransaction.SecondTransactionAmount}" FontSize="16" HorizontalOptions="End" VerticalOptions="Center" FontFamily="Roboto-Medium" TextColor="#4F4E4E"/>
|
||||
</Grid>
|
||||
<Grid Padding="0,10,0,10">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="50"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Image Grid.RowSpan="2" Source="{imageExtention:SfImageResource musical.png}" WidthRequest="50" HeightRequest="50"/>
|
||||
<Label Grid.Column="1" Text="{Binding ThirdCardTransaction.ThirdTransaction}" Padding="10" TextColor="#4F4E4E" FontFamily="Roboto-Medium"/>
|
||||
<Label Grid.Row="1" Grid.Column="1" Text="{Binding ThirdCardTransaction.ThirdTransactionDate}" FontSize="12" TextColor="Gray" Padding="10,0,0,0" FontFamily="Roboto-Regular"/>
|
||||
<Label Grid.Column="2" Grid.RowSpan="2" Text="{Binding ThirdCardTransaction.ThirdTransactionAmount}" FontSize="16" HorizontalOptions="End" VerticalOptions="Center" FontFamily="Roboto-Medium" TextColor="#4F4E4E"/>
|
||||
</Grid>
|
||||
</StackLayout>
|
||||
</ScrollView>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Frame>
|
||||
</Grid>
|
||||
</localCore:SampleView.Content>
|
||||
|
||||
<localCore:SampleView.BindingContext>
|
||||
<local:CreditCardViewModel/>
|
||||
</localCore:SampleView.BindingContext>
|
||||
|
||||
<localCore:SampleView.Behaviors>
|
||||
<local:CreditCardBehavior/>
|
||||
</localCore:SampleView.Behaviors>
|
||||
|
||||
</localCore:SampleView>
|
|
@ -0,0 +1,18 @@
|
|||
#region Copyright Syncfusion Inc. 2001-2023.
|
||||
// Copyright Syncfusion Inc. 2001-2023. All rights reserved.
|
||||
// Use of this code is subject to the terms of our license.
|
||||
// A copy of the current license can be obtained at any time by e-mailing
|
||||
// licensing@syncfusion.com. Any infringement will be prosecuted under
|
||||
// applicable laws.
|
||||
#endregion
|
||||
using SampleBrowser.Maui.Base;
|
||||
|
||||
namespace SampleBrowser.Maui.Cards.SfCards;
|
||||
|
||||
public partial class CreditCard : SampleView
|
||||
{
|
||||
public CreditCard()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,262 @@
|
|||
#region Copyright Syncfusion Inc. 2001-2023.
|
||||
// Copyright Syncfusion Inc. 2001-2023. All rights reserved.
|
||||
// Use of this code is subject to the terms of our license.
|
||||
// A copy of the current license can be obtained at any time by e-mailing
|
||||
// licensing@syncfusion.com. Any infringement will be prosecuted under
|
||||
// applicable laws.
|
||||
#endregion
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace SampleBrowser.Maui.Cards.SfCards
|
||||
{
|
||||
public class TransactionDetails : INotifyPropertyChanged
|
||||
{
|
||||
private string firstTransaction = string.Empty;
|
||||
private string secondTransaction = string.Empty;
|
||||
private string thirdTransaction = string.Empty;
|
||||
private string firstTransactionDate = string.Empty;
|
||||
private string secondTransactionDate = string.Empty;
|
||||
private string thirdTransactionDate = string.Empty;
|
||||
private string firstTransactionAmount = string.Empty;
|
||||
private string secondTransactionAmount = string.Empty;
|
||||
private string thirdTransactionAmount = string.Empty;
|
||||
private string dueAmount = string.Empty;
|
||||
|
||||
public event PropertyChangedEventHandler? PropertyChanged;
|
||||
|
||||
public string FirstTransaction
|
||||
{
|
||||
get
|
||||
{
|
||||
return firstTransaction;
|
||||
}
|
||||
set
|
||||
{
|
||||
firstTransaction = value;
|
||||
RaisePropertyChanged("FirstTransaction");
|
||||
}
|
||||
}
|
||||
|
||||
public string SecondTransaction
|
||||
{
|
||||
get
|
||||
{
|
||||
return secondTransaction;
|
||||
}
|
||||
set
|
||||
{
|
||||
secondTransaction = value;
|
||||
RaisePropertyChanged("SecondTransaction");
|
||||
}
|
||||
}
|
||||
|
||||
public string ThirdTransaction
|
||||
{
|
||||
get
|
||||
{
|
||||
return thirdTransaction;
|
||||
}
|
||||
set
|
||||
{
|
||||
thirdTransaction = value;
|
||||
RaisePropertyChanged("ThirdTransaction");
|
||||
}
|
||||
}
|
||||
|
||||
public string FirstTransactionDate
|
||||
{
|
||||
get
|
||||
{
|
||||
return firstTransactionDate;
|
||||
}
|
||||
set
|
||||
{
|
||||
firstTransactionDate = value;
|
||||
RaisePropertyChanged("FirstTransactionDate");
|
||||
}
|
||||
}
|
||||
|
||||
public string SecondTransactionDate
|
||||
{
|
||||
get
|
||||
{
|
||||
return secondTransactionDate;
|
||||
}
|
||||
set
|
||||
{
|
||||
secondTransactionDate = value;
|
||||
RaisePropertyChanged("SecondTransactionDate");
|
||||
}
|
||||
}
|
||||
|
||||
public string ThirdTransactionDate
|
||||
{
|
||||
get
|
||||
{
|
||||
return thirdTransactionDate;
|
||||
}
|
||||
set
|
||||
{
|
||||
thirdTransactionDate = value;
|
||||
RaisePropertyChanged("ThirdTransactionDate");
|
||||
}
|
||||
}
|
||||
|
||||
public string FirstTransactionAmount
|
||||
{
|
||||
get
|
||||
{
|
||||
return firstTransactionAmount;
|
||||
}
|
||||
set
|
||||
{
|
||||
firstTransactionAmount = value;
|
||||
RaisePropertyChanged("FirstTransactionAmount");
|
||||
}
|
||||
}
|
||||
|
||||
public string SecondTransactionAmount
|
||||
{
|
||||
get
|
||||
{
|
||||
return secondTransactionAmount;
|
||||
}
|
||||
set
|
||||
{
|
||||
secondTransactionAmount = value;
|
||||
RaisePropertyChanged("SecondTransactionAmount");
|
||||
}
|
||||
}
|
||||
|
||||
public string ThirdTransactionAmount
|
||||
{
|
||||
get
|
||||
{
|
||||
return thirdTransactionAmount;
|
||||
}
|
||||
set
|
||||
{
|
||||
thirdTransactionAmount = value;
|
||||
RaisePropertyChanged("ThirdTransactionAmount");
|
||||
}
|
||||
}
|
||||
|
||||
public string DueAmount
|
||||
{
|
||||
get
|
||||
{
|
||||
return dueAmount;
|
||||
}
|
||||
set
|
||||
{
|
||||
dueAmount = value;
|
||||
RaisePropertyChanged("DueAmount");
|
||||
}
|
||||
}
|
||||
|
||||
private void RaisePropertyChanged(string propertyName)
|
||||
{
|
||||
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
||||
}
|
||||
}
|
||||
public class CreditCardViewModel : INotifyPropertyChanged
|
||||
{
|
||||
|
||||
private TransactionDetails firstCardTransaction;
|
||||
|
||||
private TransactionDetails secondCardTransaction;
|
||||
|
||||
private TransactionDetails thirdCardTransaction;
|
||||
|
||||
public TransactionDetails FirstCardTransaction
|
||||
{
|
||||
get
|
||||
{
|
||||
return firstCardTransaction;
|
||||
}
|
||||
set
|
||||
{
|
||||
firstCardTransaction = value;
|
||||
RaisePropertyChanged("FirstCardTransaction");
|
||||
}
|
||||
}
|
||||
|
||||
public TransactionDetails SecondCardTransaction
|
||||
{
|
||||
get
|
||||
{
|
||||
return secondCardTransaction;
|
||||
}
|
||||
set
|
||||
{
|
||||
secondCardTransaction = value;
|
||||
RaisePropertyChanged("SecondCardTransaction");
|
||||
}
|
||||
}
|
||||
|
||||
public TransactionDetails ThirdCardTransaction
|
||||
{
|
||||
get
|
||||
{
|
||||
return thirdCardTransaction;
|
||||
}
|
||||
set
|
||||
{
|
||||
thirdCardTransaction = value;
|
||||
RaisePropertyChanged("ThirdCardTransaction");
|
||||
}
|
||||
}
|
||||
|
||||
private void RaisePropertyChanged(string propertyName)
|
||||
{
|
||||
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
||||
}
|
||||
|
||||
public CreditCardViewModel()
|
||||
{
|
||||
this.firstCardTransaction = new TransactionDetails()
|
||||
{
|
||||
FirstTransaction = "Shopping",
|
||||
FirstTransactionDate = $"{DateTime.Now.AddDays(-5).ToString("dd")} {DateTime.Now.AddDays(-5).ToString("MMMM")}, 10:10 AM",
|
||||
FirstTransactionAmount = "$140",
|
||||
SecondTransaction = "Food",
|
||||
SecondTransactionDate = $"{DateTime.Now.AddDays(-10).ToString("dd")} {DateTime.Now.AddDays(-10).ToString("MMMM")}, 5:06 PM",
|
||||
SecondTransactionAmount = "$100",
|
||||
ThirdTransaction = "Entertainment",
|
||||
ThirdTransactionDate = $"{DateTime.Now.AddDays(-15).ToString("dd")} {DateTime.Now.AddDays(-15).ToString("MMMM")}, 8:30 AM",
|
||||
ThirdTransactionAmount = "$80",
|
||||
DueAmount = "$320"
|
||||
};
|
||||
|
||||
this.secondCardTransaction = new TransactionDetails()
|
||||
{
|
||||
FirstTransaction = "Travel",
|
||||
FirstTransactionDate = $"{DateTime.Now.AddDays(-3).ToString("dd")} {DateTime.Now.AddDays(-3).ToString("MMMM")}, 2:10 AM",
|
||||
FirstTransactionAmount = "$120",
|
||||
SecondTransaction = "Shopping",
|
||||
SecondTransactionDate = $"{DateTime.Now.AddDays(-6).ToString("dd")} {DateTime.Now.AddDays(-6).ToString("MMMM")}, 7:06 PM",
|
||||
SecondTransactionAmount = "$50",
|
||||
ThirdTransaction = "Rent",
|
||||
ThirdTransactionDate = $"{DateTime.Now.AddDays(-9).ToString("dd")} {DateTime.Now.AddDays(-9).ToString("MMMM")}, 3:30 PM",
|
||||
ThirdTransactionAmount = "$200",
|
||||
DueAmount = "$370"
|
||||
};
|
||||
|
||||
this.thirdCardTransaction = new TransactionDetails()
|
||||
{
|
||||
FirstTransaction = "Shopping",
|
||||
FirstTransactionDate = $"{DateTime.Now.AddDays(-2).ToString("dd")} {DateTime.Now.AddDays(-2).ToString("MMMM")}, 10:10 AM",
|
||||
FirstTransactionAmount = "$100",
|
||||
SecondTransaction = "Food",
|
||||
SecondTransactionDate = $"{DateTime.Now.AddDays(-4).ToString("dd")} {DateTime.Now.AddDays(-4).ToString("MMMM")}, 5:06 PM",
|
||||
SecondTransactionAmount = "$80",
|
||||
ThirdTransaction = "Entertaiment",
|
||||
ThirdTransactionDate = $"{DateTime.Now.AddDays(-7).ToString("dd")} {DateTime.Now.AddDays(-7).ToString("MMMM")}, 8:30 AM",
|
||||
ThirdTransactionAmount = "$80",
|
||||
DueAmount = "$260"
|
||||
};
|
||||
}
|
||||
|
||||
public event PropertyChangedEventHandler? PropertyChanged;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,168 @@
|
|||
#region Copyright Syncfusion Inc. 2001-2023.
|
||||
// Copyright Syncfusion Inc. 2001-2023. All rights reserved.
|
||||
// Use of this code is subject to the terms of our license.
|
||||
// A copy of the current license can be obtained at any time by e-mailing
|
||||
// licensing@syncfusion.com. Any infringement will be prosecuted under
|
||||
// applicable laws.
|
||||
#endregion
|
||||
namespace SampleBrowser.Maui.Cards.SfCards
|
||||
{
|
||||
using Picker = Microsoft.Maui.Controls.Picker;
|
||||
using SampleBrowser.Maui.Base;
|
||||
using Syncfusion.Maui.Cards;
|
||||
using System;
|
||||
|
||||
public class GettingStartedBehavior : Behavior<SampleView>
|
||||
{
|
||||
private SfCardView? firstCard, secondCard, thirdCard, fourthCard, fifthCard;
|
||||
|
||||
private Label? cornerRadiusLabel;
|
||||
|
||||
private Slider? cornerRadiusSlider;
|
||||
|
||||
private Switch? indicatorSwitch;
|
||||
|
||||
private Picker? indicatorPositionPicker;
|
||||
|
||||
private Grid? indicatorPositionOption;
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Begins when the behavior attached to the view
|
||||
/// </summary>
|
||||
/// <param name="sampleView">bindable value</param>
|
||||
protected override void OnAttachedTo(SampleView sampleView)
|
||||
{
|
||||
base.OnAttachedTo(sampleView);
|
||||
|
||||
this.firstCard = sampleView.Content.FindByName<SfCardView>("firstCard");
|
||||
this.secondCard = sampleView.Content.FindByName<SfCardView>("secondCard");
|
||||
this.thirdCard = sampleView.Content.FindByName<SfCardView>("thirdCard");
|
||||
this.fourthCard = sampleView.Content.FindByName<SfCardView>("fourthCard");
|
||||
this.fifthCard = sampleView.Content.FindByName<SfCardView>("fifthCard");
|
||||
this.cornerRadiusLabel = sampleView.Content.FindByName<Label>("cornerRadiusLabel");
|
||||
this.cornerRadiusSlider = sampleView.Content.FindByName<Slider>("cornerRadiusSlider");
|
||||
this.indicatorSwitch = sampleView.Content.FindByName<Switch>("indicatorSwitch");
|
||||
this.indicatorPositionPicker = sampleView.Content.FindByName<Picker>("indicatorPositionPicker");
|
||||
this.indicatorPositionOption = sampleView.Content.FindByName<Grid>("indicatorPositionOption");
|
||||
|
||||
if (this.cornerRadiusSlider != null)
|
||||
{
|
||||
this.cornerRadiusSlider.ValueChanged += this.CornerRadiusSlider_ValueChanged;
|
||||
}
|
||||
|
||||
if (this.indicatorSwitch != null)
|
||||
{
|
||||
this.indicatorSwitch.Toggled += this.IndicatorSwitch_Toggled;
|
||||
}
|
||||
|
||||
if (this.indicatorPositionPicker != null)
|
||||
{
|
||||
this.indicatorPositionPicker.SelectedIndexChanged += this.IndicatorPositionPicker_SelectedIndexChanged;
|
||||
}
|
||||
}
|
||||
|
||||
private void IndicatorPositionPicker_SelectedIndexChanged(object? sender, EventArgs e)
|
||||
{
|
||||
if (this.firstCard != null && this.secondCard != null && this.thirdCard != null && this.fourthCard != null && this.fifthCard != null && this.indicatorPositionPicker != null && this.indicatorPositionPicker.SelectedItem != null)
|
||||
{
|
||||
string? selectedPosition = this.indicatorPositionPicker.SelectedItem.ToString();
|
||||
switch (selectedPosition)
|
||||
{
|
||||
case "Bottom":
|
||||
this.firstCard.IndicatorPosition = CardIndicatorPosition.Bottom;
|
||||
this.secondCard.IndicatorPosition = CardIndicatorPosition.Bottom;
|
||||
this.thirdCard.IndicatorPosition = CardIndicatorPosition.Bottom;
|
||||
this.fourthCard.IndicatorPosition = CardIndicatorPosition.Bottom;
|
||||
this.fifthCard.IndicatorPosition = CardIndicatorPosition.Bottom;
|
||||
break;
|
||||
case "Top":
|
||||
this.firstCard.IndicatorPosition = CardIndicatorPosition.Top;
|
||||
this.secondCard.IndicatorPosition = CardIndicatorPosition.Top;
|
||||
this.thirdCard.IndicatorPosition = CardIndicatorPosition.Top;
|
||||
this.fourthCard.IndicatorPosition = CardIndicatorPosition.Top;
|
||||
this.fifthCard.IndicatorPosition = CardIndicatorPosition.Top;
|
||||
break;
|
||||
case "Left":
|
||||
this.firstCard.IndicatorPosition = CardIndicatorPosition.Left;
|
||||
this.secondCard.IndicatorPosition = CardIndicatorPosition.Left;
|
||||
this.thirdCard.IndicatorPosition = CardIndicatorPosition.Left;
|
||||
this.fourthCard.IndicatorPosition = CardIndicatorPosition.Left;
|
||||
this.fifthCard.IndicatorPosition = CardIndicatorPosition.Left;
|
||||
break;
|
||||
case "Right":
|
||||
this.firstCard.IndicatorPosition = CardIndicatorPosition.Right;
|
||||
this.secondCard.IndicatorPosition = CardIndicatorPosition.Right;
|
||||
this.thirdCard.IndicatorPosition = CardIndicatorPosition.Right;
|
||||
this.fourthCard.IndicatorPosition = CardIndicatorPosition.Right;
|
||||
this.fifthCard.IndicatorPosition = CardIndicatorPosition.Right;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void IndicatorSwitch_Toggled(object? sender, ToggledEventArgs e)
|
||||
{
|
||||
bool isIndcatorEnabled = e.Value;
|
||||
double indicatorThickness = isIndcatorEnabled ? 7 : 0;
|
||||
if (this.firstCard != null && this.secondCard != null && this.thirdCard != null && this.fourthCard != null && this.fifthCard != null && this.indicatorPositionOption != null)
|
||||
{
|
||||
this.firstCard.IndicatorThickness = indicatorThickness;
|
||||
this.secondCard.IndicatorThickness = indicatorThickness;
|
||||
this.thirdCard.IndicatorThickness = indicatorThickness;
|
||||
this.fourthCard.IndicatorThickness = indicatorThickness;
|
||||
this.fifthCard.IndicatorThickness = indicatorThickness;
|
||||
if (isIndcatorEnabled)
|
||||
{
|
||||
this.indicatorPositionOption.IsVisible = true;
|
||||
this.firstCard.IndicatorColor = Color.FromArgb("#E2C799");
|
||||
this.secondCard.IndicatorColor = Color.FromArgb("#D4BBA0");
|
||||
this.thirdCard.IndicatorColor = Color.FromArgb("#A4A8AB");
|
||||
this.fourthCard.IndicatorColor = Color.FromArgb("#19376D");
|
||||
this.fifthCard.IndicatorColor = Color.FromArgb("#77ABB7");
|
||||
}
|
||||
else
|
||||
{
|
||||
this.indicatorPositionOption.IsVisible = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void CornerRadiusSlider_ValueChanged(object? sender, ValueChangedEventArgs e)
|
||||
{
|
||||
if (this.firstCard != null && this.secondCard != null && this.thirdCard != null && this.fourthCard != null && this.fifthCard != null && this.cornerRadiusLabel != null)
|
||||
{
|
||||
this.firstCard.CornerRadius = new CornerRadius(Math.Round(e.NewValue));
|
||||
this.secondCard.CornerRadius = new CornerRadius(Math.Round(e.NewValue));
|
||||
this.thirdCard.CornerRadius = new CornerRadius(Math.Round(e.NewValue));
|
||||
this.fourthCard.CornerRadius = new CornerRadius(Math.Round(e.NewValue));
|
||||
this.fifthCard.CornerRadius = new CornerRadius(Math.Round(e.NewValue));
|
||||
this.cornerRadiusLabel.Text = "CornerRadius: " + Math.Round(e.NewValue);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Begins when the behavior attached to the view
|
||||
/// </summary>
|
||||
/// <param name="sampleView">bindable value</param>
|
||||
protected override void OnDetachingFrom(SampleView sampleView)
|
||||
{
|
||||
base.OnDetachingFrom(sampleView);
|
||||
if (this.cornerRadiusSlider != null)
|
||||
{
|
||||
this.cornerRadiusSlider.ValueChanged -= CornerRadiusSlider_ValueChanged;
|
||||
}
|
||||
|
||||
if (this.indicatorSwitch != null)
|
||||
{
|
||||
this.indicatorSwitch.Toggled -= IndicatorSwitch_Toggled;
|
||||
}
|
||||
|
||||
if (this.indicatorPositionPicker != null)
|
||||
{
|
||||
this.indicatorPositionPicker.SelectedIndexChanged -= this.IndicatorPositionPicker_SelectedIndexChanged;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,276 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<localCore:SampleView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
x:Class="SampleBrowser.Maui.Cards.SfCards.CardView"
|
||||
xmlns:cards="clr-namespace:Syncfusion.Maui.Cards;assembly=Syncfusion.Maui.Cards"
|
||||
xmlns:localCore="clr-namespace:SampleBrowser.Maui.Base;assembly=SampleBrowser.Maui.Base"
|
||||
xmlns:imageExtention="clr-namespace:SampleBrowser.Maui.Base.Converters;assembly=SampleBrowser.Maui.Base"
|
||||
xmlns:local="clr-namespace:SampleBrowser.Maui.Cards.SfCards"
|
||||
Background="WhiteSmoke">
|
||||
<localCore:SampleView.Content>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width=".45*"/>
|
||||
<ColumnDefinition Width=".55*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid IsClippedToBounds="True" IsVisible="{OnPlatform WinUI=True, MacCatalyst=True, Default=False}" RowDefinitions="40, 60, *"
|
||||
Margin="0,40" HeightRequest="{OnPlatform MacCatalyst=430}"
|
||||
VerticalOptions="{OnPlatform Default=Fill, WinUI=Center}">
|
||||
<Image Source="{imageExtention:SfImageResource gettingstarted.png}" Aspect="AspectFit" Margin="50, 0, 0, 0"
|
||||
VerticalOptions="{OnPlatform WinUI=Center}"
|
||||
Grid.Row="2"/>
|
||||
</Grid>
|
||||
<Frame HasShadow="False" Padding="0" Margin="10"
|
||||
Grid.ColumnSpan="{OnPlatform Default=2, WinUI=1, MacCatalyst=1}" CornerRadius="10"
|
||||
Grid.Column="{OnPlatform Default=0, WinUI=1, MacCatalyst=1}"
|
||||
VerticalOptions="{OnPlatform Default=Center, WinUI=Center, MacCatalyst=Center}"
|
||||
WidthRequest="{OnPlatform WinUI=400, MacCatalyst=450, Default=350}"
|
||||
HeightRequest="{OnPlatform MacCatalyst=700}"
|
||||
HorizontalOptions="{OnPlatform WinUI=Center, MacCatalyst=Center, Default=Fill}">
|
||||
<ScrollView Grid.Row="1" Orientation="Vertical" Padding="0,0,0,10" VerticalScrollBarVisibility="Never" >
|
||||
<VerticalStackLayout>
|
||||
<cards:SfCardView x:Name="firstCard" WidthRequest="{OnPlatform Android=330, iOS=330, MacCatalyst=430, Default=380}" HeightRequest="220" Margin="0,10,0,0">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="{OnPlatform MacCatalyst=200, Default=160}"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid>
|
||||
<Image Source="{imageExtention:SfImageResource coin.jpg}" Aspect="AspectFill" WidthRequest="{OnPlatform MacCatalyst=200, Default=160}"/>
|
||||
<Grid Background="#472902" Padding="20" Opacity="0.9">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height=".2*"/>
|
||||
<RowDefinition Height=".2*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height=".3*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Label Text="{Binding FirstCardDetails.CardName}" HorizontalOptions="Start" TextColor="White" VerticalOptions="Start" FontFamily="Roboto-Medium" />
|
||||
<Label Grid.Row="1" Text="{Binding FirstCardDetails.CardNumber}" HorizontalOptions="Start" FontSize="12" TextColor="White" VerticalOptions="End" FontFamily="Roboto-Regular"/>
|
||||
<Image Grid.Row="2" Source="{imageExtention:SfImageResource cardchip.png}" WidthRequest="60" HeightRequest="40" HorizontalOptions="Start" VerticalOptions="Center"/>
|
||||
<Label Grid.Row="3" Text="{Binding FirstCardDetails.CardHolderName}" FontSize="18" TextColor="White" FontFamily="Roboto-Medium"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
<Grid Grid.Column="1" Background="White" Padding="20">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height=".3*"/>
|
||||
<RowDefinition Height=".3*"/>
|
||||
<RowDefinition Height=".4*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Label Text="{Binding FirstCardDetails.CardDueDate}" HorizontalOptions="Start" VerticalOptions="Start" Padding="5" FontSize="10" BackgroundColor="{Binding FirstCardDetails.DueIndicatorColor}" TextColor="White" FontFamily="Roboto-Medium"/>
|
||||
<Label Grid.Row="1" Text="total due" HorizontalOptions="Start" VerticalOptions="End" FontSize="10" TextColor="Gray" FontFamily="Roboto-Regular"/>
|
||||
<Label Grid.Row="2" Text="{Binding FirstCardDetails.CardDueAmount}" HorizontalOptions="Start" VerticalOptions="End" FontSize="25" FontFamily="Roboto-Medium"/>
|
||||
<Button Grid.Row="3" Text="Pay now" HorizontalOptions="Fill" BackgroundColor="Black" VerticalOptions="End" FontFamily="Roboto-Medium"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</cards:SfCardView>
|
||||
|
||||
<cards:SfCardView x:Name="secondCard" WidthRequest="{OnPlatform Android=330, iOS=330, MacCatalyst=430, Default=380}" HeightRequest="220" Margin="0,10,0,0">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="{OnPlatform MacCatalyst=200, Default=160}"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid>
|
||||
<Image Source="{imageExtention:SfImageResource bitcoin.jpg}" Aspect="AspectFill" WidthRequest="{OnPlatform MacCatalyst=200, Default=160}"/>
|
||||
<Grid Background="#b03f2b" Padding="20" Opacity="0.9">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height=".2*"/>
|
||||
<RowDefinition Height=".2*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height=".3*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Label Text="{Binding SecondCardDetails.CardName}" HorizontalOptions="Start" TextColor="White" VerticalOptions="Start" FontFamily="Roboto-Medium" />
|
||||
<Label Grid.Row="1" Text="{Binding SecondCardDetails.CardNumber}" HorizontalOptions="Start" FontSize="12" TextColor="White" VerticalOptions="End" FontFamily="Roboto-Regular"/>
|
||||
<Image Grid.Row="2" Source="{imageExtention:SfImageResource cardchip.png}" WidthRequest="60" HeightRequest="40" HorizontalOptions="Start" VerticalOptions="Center"/>
|
||||
<Label Grid.Row="3" Text="{Binding SecondCardDetails.CardHolderName}" FontSize="18" TextColor="White" FontFamily="Roboto-Medium"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
<Grid Grid.Column="1" Background="White" Padding="20">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height=".3*"/>
|
||||
<RowDefinition Height=".3*"/>
|
||||
<RowDefinition Height=".4*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Label Text="{Binding SecondCardDetails.CardDueDate}" HorizontalOptions="Start" VerticalOptions="Start" Padding="5" FontSize="10" BackgroundColor="{Binding SecondCardDetails.DueIndicatorColor}" TextColor="White" FontFamily="Roboto-Medium"/>
|
||||
<Label Grid.Row="1" Text="total due" HorizontalOptions="Start" VerticalOptions="End" FontSize="10" TextColor="Gray" FontFamily="Roboto-Regular"/>
|
||||
<Label Grid.Row="2" Text="{Binding SecondCardDetails.CardDueAmount}" HorizontalOptions="Start" VerticalOptions="End" FontSize="25" FontFamily="Roboto-Medium"/>
|
||||
<Button Grid.Row="3" Text="Pay now" HorizontalOptions="Fill" BackgroundColor="Black" VerticalOptions="End" FontFamily="Roboto-Medium"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</cards:SfCardView>
|
||||
|
||||
<cards:SfCardView x:Name="thirdCard" WidthRequest="{OnPlatform Android=330, iOS=330, MacCatalyst=430, Default=380}" HeightRequest="220" Margin="0,10,0,0">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="{OnPlatform MacCatalyst=200, Default=160}"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid>
|
||||
<Image Source="{imageExtention:SfImageResource building.jpg}" Aspect="AspectFill" WidthRequest="{OnPlatform MacCatalyst=200, Default=160}"/>
|
||||
<Grid Background="#343434" Padding="20" Opacity="0.9">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height=".2*"/>
|
||||
<RowDefinition Height=".2*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height=".3*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Label Text="{Binding ThirdCardDetails.CardName}" HorizontalOptions="Start" TextColor="White" VerticalOptions="Start" FontFamily="Roboto-Medium" />
|
||||
<Label Grid.Row="1" Text="{Binding ThirdCardDetails.CardNumber}" HorizontalOptions="Start" FontSize="12" TextColor="White" VerticalOptions="End" FontFamily="Roboto-Regular"/>
|
||||
<Image Grid.Row="2" Source="{imageExtention:SfImageResource cardchip.png}" WidthRequest="60" HeightRequest="40" HorizontalOptions="Start" VerticalOptions="Center"/>
|
||||
<Label Grid.Row="3" Text="{Binding ThirdCardDetails.CardHolderName}" FontSize="18" TextColor="White" FontFamily="Roboto-Medium"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
<Grid Grid.Column="1" Background="White" Padding="20">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height=".3*"/>
|
||||
<RowDefinition Height=".3*"/>
|
||||
<RowDefinition Height=".4*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Label Text="{Binding ThirdCardDetails.CardDueDate}" HorizontalOptions="Start" VerticalOptions="Start" Padding="5" FontSize="10" BackgroundColor="{Binding ThirdCardDetails.DueIndicatorColor}" TextColor="White" FontFamily="Roboto-Medium"/>
|
||||
<Label Grid.Row="1" Text="total due" HorizontalOptions="Start" VerticalOptions="End" FontSize="10" TextColor="Gray" FontFamily="Roboto-Regular"/>
|
||||
<Label Grid.Row="2" Text="{Binding ThirdCardDetails.CardDueAmount}" HorizontalOptions="Start" VerticalOptions="End" FontSize="25" FontFamily="Roboto-Medium"/>
|
||||
<Button Grid.Row="3" Text="Pay now" HorizontalOptions="Fill" BackgroundColor="Black" VerticalOptions="End" FontFamily="Roboto-Medium"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</cards:SfCardView>
|
||||
|
||||
<cards:SfCardView x:Name="fourthCard" WidthRequest="{OnPlatform Android=330, iOS=330, MacCatalyst=430, Default=380}" HeightRequest="220" Margin="0,10,0,0">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="{OnPlatform MacCatalyst=200, Default=160}"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid>
|
||||
<Image Source="{imageExtention:SfImageResource hexagon.jpg}" Aspect="AspectFill" WidthRequest="{OnPlatform MacCatalyst=200, Default=160}"/>
|
||||
<Grid Background="#3081D0" Padding="20" Opacity="0.9">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height=".2*"/>
|
||||
<RowDefinition Height=".2*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height=".3*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Label Text="{Binding FourthCardDetails.CardName}" HorizontalOptions="Start" TextColor="White" VerticalOptions="Start" FontFamily="Roboto-Medium" />
|
||||
<Label Grid.Row="1" Text="{Binding FourthCardDetails.CardNumber}" HorizontalOptions="Start" FontSize="12" TextColor="White" VerticalOptions="End" FontFamily="Roboto-Regular"/>
|
||||
<Image Grid.Row="2" Source="{imageExtention:SfImageResource cardchip.png}" WidthRequest="60" HeightRequest="40" HorizontalOptions="Start" VerticalOptions="Center"/>
|
||||
<Label Grid.Row="3" Text="{Binding FourthCardDetails.CardHolderName}" FontSize="18" TextColor="White" FontFamily="Roboto-Medium"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
<Grid Grid.Column="1" Background="White" Padding="20">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height=".3*"/>
|
||||
<RowDefinition Height=".3*"/>
|
||||
<RowDefinition Height=".4*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Label Text="{Binding FourthCardDetails.CardDueDate}" HorizontalOptions="Start" VerticalOptions="Start" Padding="5" FontSize="10" BackgroundColor="{Binding FourthCardDetails.DueIndicatorColor}" TextColor="White" FontFamily="Roboto-Medium"/>
|
||||
<Label Grid.Row="1" Text="total due" HorizontalOptions="Start" VerticalOptions="End" FontSize="10" TextColor="Gray" FontFamily="Roboto-Regular"/>
|
||||
<Label Grid.Row="2" Text="{Binding FourthCardDetails.CardDueAmount}" HorizontalOptions="Start" VerticalOptions="End" FontSize="25" FontFamily="Roboto-Medium"/>
|
||||
<Button Grid.Row="3" Text="Pay now" HorizontalOptions="Fill" BackgroundColor="Black" VerticalOptions="End" FontFamily="Roboto-Medium"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</cards:SfCardView>
|
||||
|
||||
<cards:SfCardView x:Name="fifthCard" WidthRequest="{OnPlatform Android=330, iOS=330, MacCatalyst=430, Default=380}" HeightRequest="220" Margin="0,10,0,0">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="{OnPlatform MacCatalyst=200, Default=160}"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Grid>
|
||||
<Image Source="{imageExtention:SfImageResource coins.jpg}" Aspect="AspectFill" WidthRequest="{OnPlatform MacCatalyst=200, Default=160}"/>
|
||||
<Grid Background="#265073" Padding="20" Opacity="0.9">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height=".2*"/>
|
||||
<RowDefinition Height=".2*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
<RowDefinition Height=".3*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Label Text="{Binding FifthCardDetails.CardName}" HorizontalOptions="Start" TextColor="White" VerticalOptions="Start" FontFamily="Roboto-Medium" />
|
||||
<Label Grid.Row="1" Text="{Binding FifthCardDetails.CardNumber}" HorizontalOptions="Start" FontSize="12" TextColor="White" VerticalOptions="End" FontFamily="Roboto-Regular"/>
|
||||
<Image Grid.Row="2" Source="{imageExtention:SfImageResource cardchip.png}" WidthRequest="60" HeightRequest="40" HorizontalOptions="Start" VerticalOptions="Center"/>
|
||||
<Label Grid.Row="3" Text="{Binding FifthCardDetails.CardHolderName}" FontSize="18" TextColor="White" FontFamily="Roboto-Medium"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
<Grid Grid.Column="1" Background="White" Padding="20">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height=".3*"/>
|
||||
<RowDefinition Height=".3*"/>
|
||||
<RowDefinition Height=".4*"/>
|
||||
<RowDefinition Height="*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Label Text="{Binding FifthCardDetails.CardDueDate}" HorizontalOptions="Start" VerticalOptions="Start" Padding="5" FontSize="10" BackgroundColor="{Binding FifthCardDetails.DueIndicatorColor}" TextColor="White" FontFamily="Roboto-Medium"/>
|
||||
<Label Grid.Row="1" Text="total due" HorizontalOptions="Start" VerticalOptions="End" FontSize="10" TextColor="Gray" FontFamily="Roboto-Regular"/>
|
||||
<Label Grid.Row="2" Text="{Binding FifthCardDetails.CardDueAmount}" HorizontalOptions="Start" VerticalOptions="End" FontSize="25" FontFamily="Roboto-Medium"/>
|
||||
<Button Grid.Row="3" Text="Paid" HorizontalOptions="Fill" BackgroundColor="Black" VerticalOptions="End" IsEnabled="False" FontFamily="Roboto-Medium"/>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</cards:SfCardView>
|
||||
</VerticalStackLayout>
|
||||
</ScrollView>
|
||||
</Frame>
|
||||
</Grid>
|
||||
</localCore:SampleView.Content>
|
||||
|
||||
<localCore:SampleView.BindingContext>
|
||||
<local:ViewModel/>
|
||||
</localCore:SampleView.BindingContext>
|
||||
|
||||
<localCore:SampleView.OptionView>
|
||||
<ContentView>
|
||||
<ScrollView>
|
||||
<StackLayout Orientation="Vertical">
|
||||
<Grid Padding="5">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto"/>
|
||||
<RowDefinition Height="Auto"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Label x:Name="cornerRadiusLabel" Text="Corner radius : 7"/>
|
||||
<Slider x:Name="cornerRadiusSlider"
|
||||
Grid.Row="1"
|
||||
Margin="0"
|
||||
Maximum="15"
|
||||
MaximumTrackColor="LightBlue"
|
||||
Minimum="0"
|
||||
MinimumTrackColor="#0d5fa3"
|
||||
VerticalOptions="Center"
|
||||
Value="{Binding CornerRadius}"/>
|
||||
</Grid>
|
||||
<Grid Padding="5">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="50"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Label Text="Indicator" VerticalOptions="Center" />
|
||||
<Switch x:Name="indicatorSwitch" Grid.Column="1"
|
||||
HorizontalOptions="End" VerticalOptions="Center" IsToggled="False"/>
|
||||
</Grid>
|
||||
<Grid x:Name="indicatorPositionOption" Padding="5" IsVisible="False">
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Label Text="Indicator position" VerticalOptions="Center" />
|
||||
<Picker x:Name="indicatorPositionPicker" Grid.Column="1" SelectedItem="{Binding IndicatorPosition}">
|
||||
<Picker.ItemsSource>
|
||||
<x:Array Type="{x:Type x:String}">
|
||||
<x:String>Left</x:String>
|
||||
<x:String>Right</x:String>
|
||||
<x:String>Top</x:String>
|
||||
<x:String>Bottom</x:String>
|
||||
</x:Array>
|
||||
</Picker.ItemsSource>
|
||||
</Picker>
|
||||
</Grid>
|
||||
</StackLayout>
|
||||
</ScrollView>
|
||||
</ContentView>
|
||||
</localCore:SampleView.OptionView>
|
||||
|
||||
<localCore:SampleView.Behaviors>
|
||||
<local:GettingStartedBehavior/>
|
||||
</localCore:SampleView.Behaviors>
|
||||
|
||||
</localCore:SampleView>
|
|
@ -0,0 +1,18 @@
|
|||
#region Copyright Syncfusion Inc. 2001-2023.
|
||||
// Copyright Syncfusion Inc. 2001-2023. All rights reserved.
|
||||
// Use of this code is subject to the terms of our license.
|
||||
// A copy of the current license can be obtained at any time by e-mailing
|
||||
// licensing@syncfusion.com. Any infringement will be prosecuted under
|
||||
// applicable laws.
|
||||
#endregion
|
||||
using SampleBrowser.Maui.Base;
|
||||
|
||||
namespace SampleBrowser.Maui.Cards.SfCards;
|
||||
|
||||
public partial class CardView : SampleView
|
||||
{
|
||||
public CardView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,298 @@
|
|||
#region Copyright Syncfusion Inc. 2001-2023.
|
||||
// Copyright Syncfusion Inc. 2001-2023. All rights reserved.
|
||||
// Use of this code is subject to the terms of our license.
|
||||
// A copy of the current license can be obtained at any time by e-mailing
|
||||
// licensing@syncfusion.com. Any infringement will be prosecuted under
|
||||
// applicable laws.
|
||||
#endregion
|
||||
namespace SampleBrowser.Maui.Cards.SfCards
|
||||
{
|
||||
using System.ComponentModel;
|
||||
|
||||
public class CardDetails : INotifyPropertyChanged
|
||||
{
|
||||
private string cardName = string.Empty;
|
||||
private string cardNumber = string.Empty;
|
||||
private string cardHolderName = string.Empty;
|
||||
private string cardDueDate = string.Empty;
|
||||
private string cardDueAmount = string.Empty;
|
||||
private Color dueIndicatorColor = Colors.Transparent;
|
||||
|
||||
public event PropertyChangedEventHandler? PropertyChanged;
|
||||
|
||||
public string CardName
|
||||
{
|
||||
get
|
||||
{
|
||||
return cardName;
|
||||
}
|
||||
set
|
||||
{
|
||||
cardName = value;
|
||||
RaisePropertyChanged("CardName");
|
||||
}
|
||||
}
|
||||
|
||||
public string CardNumber
|
||||
{
|
||||
get
|
||||
{
|
||||
return cardNumber;
|
||||
}
|
||||
set
|
||||
{
|
||||
cardNumber = value;
|
||||
RaisePropertyChanged("CardNumber");
|
||||
}
|
||||
}
|
||||
|
||||
public string CardHolderName
|
||||
{
|
||||
get
|
||||
{
|
||||
return cardHolderName;
|
||||
}
|
||||
set
|
||||
{
|
||||
cardHolderName = value;
|
||||
RaisePropertyChanged("CardHolderName");
|
||||
}
|
||||
}
|
||||
|
||||
public string CardDueDate
|
||||
{
|
||||
get
|
||||
{
|
||||
return cardDueDate;
|
||||
}
|
||||
set
|
||||
{
|
||||
cardDueDate = value;
|
||||
RaisePropertyChanged("CardDueDate");
|
||||
}
|
||||
}
|
||||
|
||||
public string CardDueAmount
|
||||
{
|
||||
get
|
||||
{
|
||||
return cardDueAmount;
|
||||
}
|
||||
set
|
||||
{
|
||||
cardDueAmount = value;
|
||||
RaisePropertyChanged("CardDueAmount");
|
||||
}
|
||||
}
|
||||
|
||||
public Color DueIndicatorColor
|
||||
{
|
||||
get
|
||||
{
|
||||
return dueIndicatorColor;
|
||||
}
|
||||
set
|
||||
{
|
||||
dueIndicatorColor = value;
|
||||
RaisePropertyChanged("DueIndicatorColor");
|
||||
}
|
||||
}
|
||||
|
||||
private void RaisePropertyChanged(string propertyName)
|
||||
{
|
||||
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
public class ViewModel : INotifyPropertyChanged
|
||||
{
|
||||
private CardDetails firstCardDetails;
|
||||
|
||||
private CardDetails secondCardDetails;
|
||||
|
||||
private CardDetails thirdCardDetails;
|
||||
|
||||
private CardDetails fourthCardDetails;
|
||||
|
||||
private CardDetails fifthCardDetails;
|
||||
|
||||
private double cornerRadius = 7;
|
||||
|
||||
private bool fadeOutOnSwiping = false;
|
||||
|
||||
private bool swipeToDismiss = false;
|
||||
|
||||
public ViewModel()
|
||||
{
|
||||
firstCardDetails = new CardDetails()
|
||||
{
|
||||
CardName = "Wells Fargo",
|
||||
CardNumber = "XXXX 4976",
|
||||
CardHolderName = "Williamson S",
|
||||
CardDueDate = $"Due on {DateTime.Now.AddDays(1).ToString("dd")} {DateTime.Now.AddDays(1).ToString("MMM")}",
|
||||
CardDueAmount = "$457",
|
||||
DueIndicatorColor = Colors.Red
|
||||
};
|
||||
|
||||
secondCardDetails = new CardDetails()
|
||||
{
|
||||
CardName = "Chase Platinum",
|
||||
CardNumber = "XXXX 1863",
|
||||
CardHolderName = "Williamson S",
|
||||
CardDueDate = $"Due on {DateTime.Now.AddDays(5).ToString("dd")} {DateTime.Now.AddDays(5).ToString("MMM")}",
|
||||
CardDueAmount = "$300",
|
||||
DueIndicatorColor = Colors.Orange
|
||||
};
|
||||
|
||||
thirdCardDetails = new CardDetails()
|
||||
{
|
||||
CardName = "KeyBank Business",
|
||||
CardNumber = "XXXX 0417",
|
||||
CardHolderName = "Williamson S",
|
||||
CardDueDate = $"Due on {DateTime.Now.AddDays(15).ToString("dd")} {DateTime.Now.AddDays(15).ToString("MMM")}",
|
||||
CardDueAmount = "$160",
|
||||
DueIndicatorColor = Colors.Gray
|
||||
};
|
||||
|
||||
fourthCardDetails = new CardDetails()
|
||||
{
|
||||
CardName = "American Express",
|
||||
CardNumber = "XXXX 2810",
|
||||
CardHolderName = "Williamson S",
|
||||
CardDueDate = $"Due on {DateTime.Now.AddDays(5).ToString("dd")} {DateTime.Now.AddDays(5).ToString("MMM")}",
|
||||
CardDueAmount = "$320",
|
||||
DueIndicatorColor = Colors.Orange
|
||||
};
|
||||
|
||||
fifthCardDetails = new CardDetails()
|
||||
{
|
||||
CardName = "Bank of America",
|
||||
CardNumber = "XXXX 0063",
|
||||
CardHolderName = "Williamson S",
|
||||
CardDueDate = $"Paid on {DateTime.Now.AddDays(-2).ToString("dd")} {DateTime.Now.AddDays(-2).ToString("MMM")}",
|
||||
CardDueAmount = "$250",
|
||||
DueIndicatorColor = Colors.Green
|
||||
};
|
||||
}
|
||||
|
||||
public CardDetails FirstCardDetails
|
||||
{
|
||||
get
|
||||
{
|
||||
return firstCardDetails;
|
||||
}
|
||||
set
|
||||
{
|
||||
firstCardDetails = value;
|
||||
OnPropertyChanged("FirstCardDetails");
|
||||
}
|
||||
}
|
||||
|
||||
public CardDetails SecondCardDetails
|
||||
{
|
||||
get
|
||||
{
|
||||
return secondCardDetails;
|
||||
}
|
||||
set
|
||||
{
|
||||
secondCardDetails = value;
|
||||
OnPropertyChanged("SecondCardDetails");
|
||||
}
|
||||
}
|
||||
|
||||
public CardDetails ThirdCardDetails
|
||||
{
|
||||
get
|
||||
{
|
||||
return thirdCardDetails;
|
||||
}
|
||||
set
|
||||
{
|
||||
thirdCardDetails = value;
|
||||
OnPropertyChanged("ThirdCardDetails");
|
||||
}
|
||||
}
|
||||
|
||||
public CardDetails FourthCardDetails
|
||||
{
|
||||
get
|
||||
{
|
||||
return fourthCardDetails;
|
||||
}
|
||||
set
|
||||
{
|
||||
fourthCardDetails = value;
|
||||
OnPropertyChanged("FourthCardDetails");
|
||||
}
|
||||
}
|
||||
|
||||
public CardDetails FifthCardDetails
|
||||
{
|
||||
get
|
||||
{
|
||||
return fifthCardDetails;
|
||||
}
|
||||
set
|
||||
{
|
||||
fifthCardDetails = value;
|
||||
OnPropertyChanged("FifthCardDetails");
|
||||
}
|
||||
}
|
||||
|
||||
public string IndicatorPosition { get; set; } = "Left";
|
||||
|
||||
public string SwipeDirection { get; set; } = "Right";
|
||||
|
||||
public double CornerRadius
|
||||
{
|
||||
get
|
||||
{
|
||||
return cornerRadius;
|
||||
}
|
||||
set
|
||||
{
|
||||
cornerRadius = Math.Round(value);
|
||||
OnPropertyChanged("CornerRadius");
|
||||
}
|
||||
}
|
||||
|
||||
public bool FadeOutOnSwiping
|
||||
{
|
||||
get
|
||||
{
|
||||
return fadeOutOnSwiping;
|
||||
}
|
||||
set
|
||||
{
|
||||
fadeOutOnSwiping = value;
|
||||
OnPropertyChanged("FadeOutOnSwiping");
|
||||
}
|
||||
}
|
||||
|
||||
public bool SwipeToDismiss
|
||||
{
|
||||
get
|
||||
{
|
||||
return swipeToDismiss;
|
||||
}
|
||||
set
|
||||
{
|
||||
swipeToDismiss = value;
|
||||
OnPropertyChanged("SwipeToDismiss");
|
||||
}
|
||||
}
|
||||
|
||||
private void OnPropertyChanged(string property)
|
||||
{
|
||||
if (PropertyChanged != null)
|
||||
{
|
||||
PropertyChanged(this, new PropertyChangedEventArgs(property));
|
||||
}
|
||||
}
|
||||
|
||||
public event PropertyChangedEventHandler? PropertyChanged;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<packageRestore>
|
||||
<add key="enabled" value="True" />
|
||||
<add key="automatic" value="True" />
|
||||
</packageRestore>
|
||||
<packageSources>
|
||||
|
||||
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
|
||||
</packageSources>
|
||||
<bindingRedirects>
|
||||
<add key="skip" value="False" />
|
||||
</bindingRedirects>
|
||||
</configuration>
|
|
@ -0,0 +1,30 @@
|
|||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.0.31611.283
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SampleBrowser.Maui.Carousel", "SampleBrowser.Maui.Carousel\SampleBrowser.Maui.Carousel.csproj", "{B036E9B1-7BA0-4F43-A692-A28F5932F2E2}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
Release-Xml|Any CPU = Release-Xml|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{B036E9B1-7BA0-4F43-A692-A28F5932F2E2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{B036E9B1-7BA0-4F43-A692-A28F5932F2E2}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{B036E9B1-7BA0-4F43-A692-A28F5932F2E2}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
|
||||
{B036E9B1-7BA0-4F43-A692-A28F5932F2E2}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{B036E9B1-7BA0-4F43-A692-A28F5932F2E2}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{B036E9B1-7BA0-4F43-A692-A28F5932F2E2}.Release|Any CPU.Deploy.0 = Release|Any CPU
|
||||
{B036E9B1-7BA0-4F43-A692-A28F5932F2E2}.Release-Xml|Any CPU.ActiveCfg = Release-Xml|Any CPU
|
||||
{B036E9B1-7BA0-4F43-A692-A28F5932F2E2}.Release-Xml|Any CPU.Build.0 = Release-Xml|Any CPU
|
||||
{B036E9B1-7BA0-4F43-A692-A28F5932F2E2}.Release-Xml|Any CPU.Deploy.0 = Release-Xml|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {61F7FB11-1E47-470C-91E2-47F8143E1572}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
|
@ -0,0 +1,15 @@
|
|||
<?xml version = "1.0" encoding = "UTF-8" ?>
|
||||
<Application xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
xmlns:local="clr-namespace:SampleBrowser.Maui.Carousel"
|
||||
xmlns:base="clr-namespace:SampleBrowser.Maui.Base;assembly=SampleBrowser.Maui.Base"
|
||||
x:Class="SampleBrowser.Maui.Carousel.App">
|
||||
|
||||
<Application.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<base:SampleBrowserStyles />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</Application.Resources>
|
||||
</Application>
|
|
@ -0,0 +1,23 @@
|
|||
#region Copyright Syncfusion Inc. 2001-2023.
|
||||
// Copyright Syncfusion Inc. 2001-2023. All rights reserved.
|
||||
// Use of this code is subject to the terms of our license.
|
||||
// A copy of the current license can be obtained at any time by e-mailing
|
||||
// licensing@syncfusion.com. Any infringement will be prosecuted under
|
||||
// applicable laws.
|
||||
#endregion
|
||||
using System.Reflection;
|
||||
|
||||
namespace SampleBrowser.Maui.Carousel;
|
||||
|
||||
public partial class App : Application
|
||||
{
|
||||
public App()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
Assembly assembly = typeof(App).GetTypeInfo().Assembly;
|
||||
SampleBrowser.Maui.Base.BaseConfig.IsIndividualSB = true;
|
||||
|
||||
MainPage = SampleBrowser.Maui.Base.BaseConfig.MainPageInit(assembly);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<SyncfusionControls>
|
||||
<ControlCategory Name="Layouts">
|
||||
<Control ControlName="Carousel"
|
||||
Title="Carousel"
|
||||
Image="carousel.png"
|
||||
Description="Provides an intuitive interface for navigating through a collection of views."
|
||||
StatusTag="New"
|
||||
IsPreview="True">
|
||||
<Sample SampleName="GettingStarted"
|
||||
Title="Getting Started"
|
||||
SearchTags="Carousel, Items Collection"
|
||||
StatusTag="New"
|
||||
CodeViewerPath="Carousel/GettingStarted/"
|
||||
VideoLink=""/>
|
||||
<Sample SampleName="LoadMore"
|
||||
Title="Load More"
|
||||
SearchTags="Carousel, LoadMore"
|
||||
StatusTag="New"
|
||||
CodeViewerPath="Carousel/LoadMore/"
|
||||
VideoLink=""/>
|
||||
</Control>
|
||||
</ControlCategory>
|
||||
</SyncfusionControls>
|
|
@ -0,0 +1,14 @@
|
|||
#region Copyright Syncfusion Inc. 2001-2023.
|
||||
// Copyright Syncfusion Inc. 2001-2023. All rights reserved.
|
||||
// Use of this code is subject to the terms of our license.
|
||||
// A copy of the current license can be obtained at any time by e-mailing
|
||||
// licensing@syncfusion.com. Any infringement will be prosecuted under
|
||||
// applicable laws.
|
||||
#endregion
|
||||
namespace SampleBrowser.Maui.Carousel
|
||||
{
|
||||
// All the code in this file is included in all platforms.
|
||||
public class ControlConfig
|
||||
{
|
||||
}
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<SampleBrowser>
|
||||
<Assemblies Prefix="SampleBrowser.Maui.Carousel" QualifiedInfo="Version=1.0.0.0, Culture=neutral, PublicKeyToken=null">
|
||||
<Assembly Name="Carousel" />
|
||||
</Assemblies>
|
||||
</SampleBrowser>
|
|
@ -0,0 +1,35 @@
|
|||
#region Copyright Syncfusion Inc. 2001-2023.
|
||||
// Copyright Syncfusion Inc. 2001-2023. All rights reserved.
|
||||
// Use of this code is subject to the terms of our license.
|
||||
// A copy of the current license can be obtained at any time by e-mailing
|
||||
// licensing@syncfusion.com. Any infringement will be prosecuted under
|
||||
// applicable laws.
|
||||
#endregion
|
||||
using Syncfusion.Maui.Core.Hosting;
|
||||
using SampleBrowser.Maui.Base.Hosting;
|
||||
|
||||
namespace SampleBrowser.Maui.Carousel;
|
||||
|
||||
public static class MauiProgram
|
||||
{
|
||||
public static MauiApp CreateMauiApp()
|
||||
{
|
||||
var builder = MauiApp.CreateBuilder();
|
||||
builder
|
||||
.UseMauiApp<App>()
|
||||
.ConfigureSyncfusionCore()
|
||||
.ConfigureSampleBrowserBase()
|
||||
.ConfigureFonts(fonts =>
|
||||
{
|
||||
fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
|
||||
fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");
|
||||
fonts.AddFont("Roboto-Medium.ttf", "RobotoMedium");
|
||||
fonts.AddFont("Roboto-Regular.ttf", "Roboto");
|
||||
fonts.AddFont("SegmentIcon.ttf", "SegmentIcon");
|
||||
fonts.AddFont("carousel.ttf", "Carousel");
|
||||
fonts.AddFont("CarouselIcon.ttf", "CarouselIcon");
|
||||
});
|
||||
|
||||
return builder.Build();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<application android:allowBackup="true" android:icon="@mipmap/appicon" android:roundIcon="@mipmap/appicon_round" android:supportsRtl="true"></application>
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
</manifest>
|
|
@ -0,0 +1,17 @@
|
|||
#region Copyright Syncfusion Inc. 2001-2023.
|
||||
// Copyright Syncfusion Inc. 2001-2023. All rights reserved.
|
||||
// Use of this code is subject to the terms of our license.
|
||||
// A copy of the current license can be obtained at any time by e-mailing
|
||||
// licensing@syncfusion.com. Any infringement will be prosecuted under
|
||||
// applicable laws.
|
||||
#endregion
|
||||
using Android.App;
|
||||
using Android.Content.PM;
|
||||
using Android.OS;
|
||||
|
||||
namespace SampleBrowser.Maui.Carousel;
|
||||
|
||||
[Activity(Theme = "@style/Maui.SplashTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize | ConfigChanges.Density)]
|
||||
public class MainActivity : MauiAppCompatActivity
|
||||
{
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
#region Copyright Syncfusion Inc. 2001-2023.
|
||||
// Copyright Syncfusion Inc. 2001-2023. All rights reserved.
|
||||
// Use of this code is subject to the terms of our license.
|
||||
// A copy of the current license can be obtained at any time by e-mailing
|
||||
// licensing@syncfusion.com. Any infringement will be prosecuted under
|
||||
// applicable laws.
|
||||
#endregion
|
||||
using Android.App;
|
||||
using Android.Runtime;
|
||||
|
||||
namespace SampleBrowser.Maui.Carousel;
|
||||
|
||||
[Application]
|
||||
public class MainApplication : MauiApplication
|
||||
{
|
||||
public MainApplication(IntPtr handle, JniHandleOwnership ownership)
|
||||
: base(handle, ownership)
|
||||
{
|
||||
}
|
||||
|
||||
protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="colorPrimary">#512BD4</color>
|
||||
<color name="colorPrimaryDark">#2B0B98</color>
|
||||
<color name="colorAccent">#2B0B98</color>
|
||||
</resources>
|
|
@ -0,0 +1,16 @@
|
|||
#region Copyright Syncfusion Inc. 2001-2023.
|
||||
// Copyright Syncfusion Inc. 2001-2023. All rights reserved.
|
||||
// Use of this code is subject to the terms of our license.
|
||||
// A copy of the current license can be obtained at any time by e-mailing
|
||||
// licensing@syncfusion.com. Any infringement will be prosecuted under
|
||||
// applicable laws.
|
||||
#endregion
|
||||
using Foundation;
|
||||
|
||||
namespace SampleBrowser.Maui.Carousel;
|
||||
|
||||
[Register("AppDelegate")]
|
||||
public class AppDelegate : MauiUIApplicationDelegate
|
||||
{
|
||||
protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>UIDeviceFamily</key>
|
||||
<array>
|
||||
<integer>1</integer>
|
||||
<integer>2</integer>
|
||||
</array>
|
||||
<key>UIRequiredDeviceCapabilities</key>
|
||||
<array>
|
||||
<string>arm64</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations~ipad</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>XSAppIconAssets</key>
|
||||
<string>Assets.xcassets/appicon.appiconset</string>
|
||||
</dict>
|
||||
</plist>
|
|
@ -0,0 +1,22 @@
|
|||
#region Copyright Syncfusion Inc. 2001-2023.
|
||||
// Copyright Syncfusion Inc. 2001-2023. All rights reserved.
|
||||
// Use of this code is subject to the terms of our license.
|
||||
// A copy of the current license can be obtained at any time by e-mailing
|
||||
// licensing@syncfusion.com. Any infringement will be prosecuted under
|
||||
// applicable laws.
|
||||
#endregion
|
||||
using ObjCRuntime;
|
||||
using UIKit;
|
||||
|
||||
namespace SampleBrowser.Maui.Carousel;
|
||||
|
||||
public class Program
|
||||
{
|
||||
// This is the main entry point of the application.
|
||||
static void Main(string[] args)
|
||||
{
|
||||
// if you want to use a different Application Delegate class from "AppDelegate"
|
||||
// you can specify it here.
|
||||
UIApplication.Main(args, null, typeof(AppDelegate));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
#region Copyright Syncfusion Inc. 2001-2023.
|
||||
// Copyright Syncfusion Inc. 2001-2023. All rights reserved.
|
||||
// Use of this code is subject to the terms of our license.
|
||||
// A copy of the current license can be obtained at any time by e-mailing
|
||||
// licensing@syncfusion.com. Any infringement will be prosecuted under
|
||||
// applicable laws.
|
||||
#endregion
|
||||
using System;
|
||||
using Microsoft.Maui;
|
||||
using Microsoft.Maui.Hosting;
|
||||
|
||||
namespace SampleBrowser.Maui.Carousel;
|
||||
|
||||
class Program : MauiApplication
|
||||
{
|
||||
protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
|
||||
|
||||
static void Main(string[] args)
|
||||
{
|
||||
var app = new Program();
|
||||
app.Run(args);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,15 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest package="com.companyname.SampleBrowser.Maui.Carousel" version="1.0.0" api-version="7" xmlns="http://tizen.org/ns/packages">
|
||||
<profile name="common" />
|
||||
<ui-application appid="com.companyname.SampleBrowser.Maui.Carousel" exec="SampleBrowser.Maui.Carousel.dll" multiple="false" nodisplay="false" taskmanage="true" type="dotnet" launch_mode="single">
|
||||
<label>SampleBrowser.Maui.Carousel</label>
|
||||
<icon>appicon.xhigh.png</icon>
|
||||
<metadata key="http://tizen.org/metadata/prefer_dotnet_aot" value="true" />
|
||||
</ui-application>
|
||||
<shortcut-list />
|
||||
<privileges>
|
||||
<privilege>http://tizen.org/privilege/internet</privilege>
|
||||
</privileges>
|
||||
<dependencies />
|
||||
<provides-appdefined-privileges />
|
||||
</manifest>
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче