Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 0 additions & 77 deletions maui/samples/Gallery/Converters/ImageResourceExtension.cs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<ControlCategory Name="Notification">
<Control Title="Pull to Refresh" ControlName="SfPullToRefresh" Image="pulltorefresh.png" Description="Allows the users to update the view by performing the pull-to-refresh action.">
<Sample SearchTags="data, weather, list, pull, refresh, slide on top, push, transition, update" SampleName="PullToRefreshView" Title="Getting Started"/>
<Sample SearchTags="list, listview, refresh, slide on top, push, transition, refresh list, data, pull" SampleName="ListViewPullToRefresh" Title="Refreshable List"/>
<Sample SearchTags="collection, collectionView, list, listview, refresh, slide on top, push, transition, refresh list, data, pull" SampleName="CollectionViewPullToRefresh" Title="Refreshable List"/>
</Control>
</ControlCategory>
</SyncfusionControls>
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,11 @@ void DatePicker_DateSelected(object? sender, DateChangedEventArgs e)
return;
}

_calendar.DisplayDate = e.NewDate;
if (_calendar != null && e.NewDate != null)
{
_calendar!.DisplayDate = e.NewDate.Value;
}

_datePicker.Date = e.NewDate;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ protected override void OnAttachedTo(SampleView sampleView)

_timeFormat = new ObservableCollection<object>()
{
"H mm", "H mm ss", "h mm ss tt", "h mm tt", "HH mm", "HH mm ss", "hh mm ss tt", "hh mm tt", "hh tt", "Default"
"H mm", "H mm ss", "h mm ss tt", "h mm tt", "HH mm", "HH mm ss", "HH mm ss fff", "hh mm ss tt", "hh mm ss fff tt", "hh mm tt", "hh tt", "ss fff", "mm ss", "mm ss fff", "Default"
};

_dateFormatComboBox = sampleView.Content.FindByName<Microsoft.Maui.Controls.Picker>("dateFormatComboBox");
Expand Down Expand Up @@ -357,18 +357,38 @@ void TimeFormatComboBox_SelectionChanged(object? sender, EventArgs e)
case "HH mm ss":
_dateTimePicker.TimeFormat = PickerTimeFormat.HH_mm_ss;
break;
case "HH mm ss fff":
_dateTimePicker.TimeFormat = PickerTimeFormat.HH_mm_ss_fff;
break;

case "hh mm ss tt":
_dateTimePicker.TimeFormat = PickerTimeFormat.hh_mm_ss_tt;
break;

case "hh mm ss fff tt":
_dateTimePicker.TimeFormat = PickerTimeFormat.hh_mm_ss_fff_tt;
break;

case "hh mm tt":
_dateTimePicker.TimeFormat = PickerTimeFormat.hh_mm_tt;
break;

case "hh tt":
_dateTimePicker.TimeFormat = PickerTimeFormat.hh_tt;
break;

case "ss fff":
_dateTimePicker.TimeFormat = PickerTimeFormat.ss_fff;
break;

case "mm ss":
_dateTimePicker.TimeFormat = PickerTimeFormat.mm_ss;
break;

case "mm ss fff":
_dateTimePicker.TimeFormat = PickerTimeFormat.mm_ss_fff;
break;

case "Default":
_dateTimePicker.TimeFormat = PickerTimeFormat.Default;
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<localCore:SampleView.Content>

<Grid WidthRequest="300" HeightRequest="375" HorizontalOptions="Center" VerticalOptions="Center">
<Grid WidthRequest="365" HeightRequest="375" HorizontalOptions="Center" VerticalOptions="Center">
<Border x:Name="frame" IsVisible="{OnPlatform WinUI=True, Android=True, Default=False}" StrokeThickness="1" BackgroundColor="White" StrokeShape="RoundRectangle 5,5,5,5" HorizontalOptions="Center" VerticalOptions="Center" Margin="0" Padding="0">
<dateTimePicker:SfDateTimePicker HeightRequest="370" x:Name="DateTimePicker"/>
</Border>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Label Grid.Row="0" Text="Invoice: #FRU037020142097" Margin="{OnPlatform Default='8,0,8,8',WinUI='8,0,6,8',MacCatalyst='8,0,6,8'}" HeightRequest="40" FontSize="16" FontFamily="Roboto-Regular" Opacity="1.0" VerticalTextAlignment="Center" FontAttributes="Bold" VerticalOptions="Center" HorizontalOptions="CenterAndExpand"/>
<Label Grid.Row="0" Text="Invoice: #FRU037020142097" Margin="{OnPlatform Default='8,0,8,8',WinUI='8,0,6,8',MacCatalyst='8,0,6,8'}" HeightRequest="40" FontSize="16" FontFamily="Roboto-Regular" Opacity="1.0" VerticalTextAlignment="Center" FontAttributes="Bold" VerticalOptions="Center" HorizontalOptions="Center"/>
<Border Grid.Row="1" StrokeShape="RoundRectangle 8,8,8,8" Margin="{OnPlatform Default='8,0,8,8',WinUI='8,0,8,8',MacCatalyst='8,0,8,8'}" Stroke="{AppThemeBinding Light={StaticResource BorderLight}, Dark={StaticResource Border}}" StrokeThickness="{OnPlatform MacCatalyst=2,Default=1}" WidthRequest="{OnPlatform MacCatalyst=460,WinUI=330}">
<syncfusion:SfExpander AnimationDuration="200" IsExpanded="True" >
<syncfusion:SfExpander.Header>
Expand All @@ -58,12 +58,12 @@
<Label Text="&#xe757;" FontSize="16" Margin="14,2,2,2"
FontFamily="MauiSampleFontIcon"
VerticalOptions="Center" VerticalTextAlignment="Center"/>
<Label CharacterSpacing="0.25" FontFamily="Roboto-Regular" Text="Invoice Date" FontSize="14" Grid.Column="1" VerticalOptions="CenterAndExpand"/>
<Label CharacterSpacing="0.25" FontFamily="Roboto-Regular" Text="Invoice Date" FontSize="14" Grid.Column="1" VerticalOptions="Center"/>
</Grid>
</syncfusion:SfExpander.Header>
<syncfusion:SfExpander.Content>
<Grid Padding="18,8,0,18" >
<Label CharacterSpacing="0.25" FontFamily="Roboto-Regular" Text="11:03 AM, 15 January 2019" FontSize="14" VerticalOptions="CenterAndExpand"/>
<Label CharacterSpacing="0.25" FontFamily="Roboto-Regular" Text="11:03 AM, 15 January 2019" FontSize="14" VerticalOptions="Center"/>
</Grid>
</syncfusion:SfExpander.Content>
</syncfusion:SfExpander>
Expand All @@ -82,7 +82,7 @@
<Label Text="&#xe74E;" FontSize="16" Margin="14,2,2,2"
FontFamily="MauiSampleFontIcon"
VerticalOptions="Center" VerticalTextAlignment="Center"/>
<Label CharacterSpacing="0.25" FontFamily="Roboto-Regular" Text="Item(s)" FontSize="14" Grid.Column="1" VerticalOptions="CenterAndExpand"/>
<Label CharacterSpacing="0.25" FontFamily="Roboto-Regular" Text="Item(s)" FontSize="14" Grid.Column="1" VerticalOptions="Center"/>
</Grid>
</syncfusion:SfExpander.Header>
<syncfusion:SfExpander.Content>
Expand Down Expand Up @@ -142,7 +142,7 @@
<Label Text="&#xe786;" FontSize="16" Margin="14,2,2,2"
FontFamily="MauiSampleFontIcon"
VerticalOptions="Center" VerticalTextAlignment="Center"/>
<Label CharacterSpacing="0.25" FontFamily="Roboto-Regular" Text="Payment Details" FontSize="14" Grid.Column="1" VerticalOptions="CenterAndExpand"/>
<Label CharacterSpacing="0.25" FontFamily="Roboto-Regular" Text="Payment Details" FontSize="14" Grid.Column="1" VerticalOptions="Center"/>
</Grid>
</syncfusion:SfExpander.Header>
<syncfusion:SfExpander.Content>
Expand Down Expand Up @@ -180,7 +180,7 @@
<Label Text="&#xe76E;" FontSize="16" Margin="14,2,2,2"
FontFamily="MauiSampleFontIcon"
VerticalOptions="Center" VerticalTextAlignment="Center"/>
<Label CharacterSpacing="0.25" FontFamily="Roboto-Regular" FontSize="14" Text="Address" Grid.Column="1" VerticalOptions="CenterAndExpand"/>
<Label CharacterSpacing="0.25" FontFamily="Roboto-Regular" FontSize="14" Text="Address" Grid.Column="1" VerticalOptions="Center"/>
</Grid>
</syncfusion:SfExpander.Header>
<syncfusion:SfExpander.Content>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public void OnPropertyChanged(string name)
#region Constructor

/// <summary>
/// Initiates new intance of ListViewInboxInfoViewModel class.
/// Initiates new intance of CollectionViewInboxInfoViewModel class.
/// </summary>
public MailInfoViewModel()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<localCore:SampleView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class=" Syncfusion.Maui.ControlsGallery.PolarChart.SfPolarChart.Tooltip"
xmlns:local="clr-namespace: Syncfusion.Maui.ControlsGallery.PolarChart.SfPolarChart"
xmlns:local="clr-namespace:Syncfusion.Maui.ControlsGallery.PolarChart.SfPolarChart"
xmlns:localCore="clr-namespace:Syncfusion.Maui.ControlsGallery;assembly=Syncfusion.Maui.ControlsGallery"
xmlns:chart="clr-namespace:Syncfusion.Maui.Toolkit.Charts;assembly=Syncfusion.Maui.Toolkit">

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" ?>
<ResourceDictionary xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace: Syncfusion.Maui.ControlsGallery.PolarChart.SfPolarChart"
xmlns:local="clr-namespace:Syncfusion.Maui.ControlsGallery.PolarChart.SfPolarChart"
x:Class=" Syncfusion.Maui.ControlsGallery.PolarChart.SfPolarChart.PolarChartColorResources">

<SolidColorBrush x:Key="series1Light">#1D5B6F</SolidColorBrush>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<localCore:SampleView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class=" Syncfusion.Maui.ControlsGallery.PolarChart.SfPolarChart.DefaultPolar"
xmlns:local="clr-namespace: Syncfusion.Maui.ControlsGallery.PolarChart.SfPolarChart"
xmlns:local="clr-namespace:Syncfusion.Maui.ControlsGallery.PolarChart.SfPolarChart"
xmlns:localCore="clr-namespace:Syncfusion.Maui.ControlsGallery;assembly=Syncfusion.Maui.ControlsGallery"
xmlns:chart="clr-namespace:Syncfusion.Maui.Toolkit.Charts;assembly=Syncfusion.Maui.Toolkit">

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<localCore:SampleView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class=" Syncfusion.Maui.ControlsGallery.PolarChart.SfPolarChart.DefaultRadar"
xmlns:local="clr-namespace: Syncfusion.Maui.ControlsGallery.PolarChart.SfPolarChart"
xmlns:local="clr-namespace:Syncfusion.Maui.ControlsGallery.PolarChart.SfPolarChart"
xmlns:localCore="clr-namespace:Syncfusion.Maui.ControlsGallery;assembly=Syncfusion.Maui.ControlsGallery"
xmlns:chart="clr-namespace:Syncfusion.Maui.Toolkit.Charts;assembly=Syncfusion.Maui.Toolkit">

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<localCore:SampleView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class=" Syncfusion.Maui.ControlsGallery.PolarChart.SfPolarChart.PolarDataLabel"
xmlns:local="clr-namespace: Syncfusion.Maui.ControlsGallery.PolarChart.SfPolarChart"
xmlns:local="clr-namespace:Syncfusion.Maui.ControlsGallery.PolarChart.SfPolarChart"
xmlns:localCore="clr-namespace:Syncfusion.Maui.ControlsGallery;assembly=Syncfusion.Maui.ControlsGallery"
xmlns:chart="clr-namespace:Syncfusion.Maui.Toolkit.Charts;assembly=Syncfusion.Maui.Toolkit">

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ namespace Syncfusion.Maui.ControlsGallery.PullToRefresh
/// <summary>
/// Base generic class for user-defined behaviors that can respond to conditions and events.
/// </summary>
public partial class ListViewPullToRefreshBehavior : Behavior<SampleView>
public partial class CollectionViewPullToRefreshBehavior : Behavior<SampleView>
{
Syncfusion.Maui.Toolkit.PullToRefresh.SfPullToRefresh? _pullToRefresh;
ListView? _listView;
ListViewInboxInfoViewModel? _viewModel;
CollectionView? _collectionView;
CollectionViewInboxInfoViewModel? _viewModel;
Microsoft.Maui.Controls.Picker? _transitionType;

/// <summary>
Expand All @@ -19,30 +19,29 @@ public partial class ListViewPullToRefreshBehavior : Behavior<SampleView>
/// <param name="bindable">SampleView type parameter named as bindable.</param>
protected override void OnAttachedTo(SampleView bindable)
{
_viewModel = new ListViewInboxInfoViewModel();
_viewModel = new CollectionViewInboxInfoViewModel();
bindable.BindingContext = _viewModel;
_pullToRefresh = bindable.FindByName<Syncfusion.Maui.Toolkit.PullToRefresh.SfPullToRefresh>("pullToRefresh");
_listView = bindable.FindByName<ListView>("listView");
_collectionView = bindable.FindByName<CollectionView>("listView");
_transitionType = bindable.FindByName<Microsoft.Maui.Controls.Picker>("comboBox");
_transitionType.SelectedIndexChanged += OnSelectionChanged;
_pullToRefresh.Refreshing += PullToRefresh_Refreshing;
_pullToRefresh.Refreshed += PullToRefresh_Refreshed;
_listView.Loaded += ListView_Loaded;
_collectionView.Loaded += CollectionView_Loaded;
base.OnAttachedTo(bindable);
}

/// <summary>
/// Fired when listView is loaded.
/// Fired when collectionview is loaded.
/// </summary>
/// <param name="sender">ListView_Loaded event sender</param>
/// <param name="e">ListView_Loaded event args</param>
private void ListView_Loaded(object? sender, EventArgs e)
/// <param name="sender">CollectionView_Loaded event sender</param>
/// <param name="e">CollectionView_Loaded event args</param>
private void CollectionView_Loaded(object? sender, EventArgs e)
{
#if WINDOWS
if (_listView != null && _listView.Handler != null)
if (_collectionView != null && _collectionView.Handler != null)
{
var platformView = _listView.Handler.PlatformView as Microsoft.UI.Xaml.Controls.ListView;
if (platformView != null)
if (_collectionView.Handler.PlatformView is Microsoft.UI.Xaml.Controls.ListViewBase platformView)
{
platformView.ItemContainerTransitions = null;
}
Expand All @@ -58,10 +57,10 @@ private void ListView_Loaded(object? sender, EventArgs e)
private void PullToRefresh_Refreshed(object? sender, EventArgs e)
{
#if ANDROID
if (_listView != null && _listView.Handler != null)
if (_collectionView != null && _collectionView.Handler != null)
{
var platformView = _listView.Handler.PlatformView as Android.Views.View;
platformView?.InvalidateMeasure(_listView as IView);
var platformView = _collectionView.Handler.PlatformView as Android.Views.View;
platformView?.InvalidateMeasure(_collectionView as IView);
}
#endif
}
Expand Down Expand Up @@ -101,14 +100,14 @@ private void OnSelectionChanged(object? sender, EventArgs e)
/// <param name="bindable">SampleView type parameter named as bindable</param>
protected override void OnDetachingFrom(SampleView bindable)
{
if (_pullToRefresh != null && _transitionType != null && _listView != null)
if (_pullToRefresh != null && _transitionType != null && _collectionView != null)
{
_pullToRefresh.Refreshing -= PullToRefresh_Refreshing;
_pullToRefresh.Refreshed -= PullToRefresh_Refreshed;
_transitionType.SelectedIndexChanged -= OnSelectionChanged;
_listView.Loaded -= ListView_Loaded;
_collectionView.Loaded -= CollectionView_Loaded;
_pullToRefresh = null;
_listView = null;
_collectionView = null;
_viewModel = null;
_transitionType = null;
base.OnDetachingFrom(bindable);
Expand All @@ -132,19 +131,19 @@ private GroupName GetKey(DateTime groupName)
{
return GroupName.Yesterday;
}
else if (ListViewPullToRefreshBehavior.IsLastWeek(groupName))
else if (CollectionViewPullToRefreshBehavior.IsLastWeek(groupName))
{
return GroupName.LastWeek;
}
else if (ListViewPullToRefreshBehavior.IsThisWeek(groupName))
else if (CollectionViewPullToRefreshBehavior.IsThisWeek(groupName))
{
return GroupName.ThisWeek;
}
else if (ListViewPullToRefreshBehavior.IsThisMonth(groupName))
else if (CollectionViewPullToRefreshBehavior.IsThisMonth(groupName))
{
return GroupName.ThisMonth;
}
else if (ListViewPullToRefreshBehavior.IsLastMonth(groupName))
else if (CollectionViewPullToRefreshBehavior.IsLastMonth(groupName))
{
return GroupName.LastMonth;
}
Expand Down
Loading
Loading