diff --git a/maui/samples/Gallery/Converters/ImageResourceExtension.cs b/maui/samples/Gallery/Converters/ImageResourceExtension.cs deleted file mode 100644 index 4ebf4188..00000000 --- a/maui/samples/Gallery/Converters/ImageResourceExtension.cs +++ /dev/null @@ -1,77 +0,0 @@ - -using System.Globalization; -using System.Reflection; -using System.Xml; - -namespace Syncfusion.Maui.ControlsGallery.Converters -{ - /// - /// - /// - [ContentProperty("Source")] - public class ImageResourceExtension : IMarkupExtension - { - /// - /// - /// - public string? Source { set; get; } - - /// - /// - /// - /// - /// - /// - public ImageSource ProvideValue(IServiceProvider serviceProvider) - { - if (String.IsNullOrEmpty(Source)) - { - IXmlLineInfo lineInfo = (serviceProvider.GetService(typeof(IXmlLineInfoProvider)) is IXmlLineInfoProvider lineInfoProvider) ? lineInfoProvider.XmlLineInfo : new XmlLineInfo(); - throw new XamlParseException("ImageResourceExtension requires Source property to be set", lineInfo); - } - - string? assemblyName = typeof(ImageResourceExtension).GetTypeInfo().Assembly.GetName().Name; //GetType().GetTypeInfo().Assembly.GetName().Name; - return ImageSource.FromResource(assemblyName + ".Resources.Images." + Source, typeof(ImageResourceExtension).GetTypeInfo().Assembly); - } - - object IMarkupExtension.ProvideValue(IServiceProvider serviceProvider) - { - return (this as IMarkupExtension).ProvideValue(serviceProvider); - } - } - - /// - /// - /// - public class ImageSourceConverter : IValueConverter - { - /// - /// - /// - /// - /// - /// - /// - /// - public object Convert(object? value, Type targetType, object? parameter, CultureInfo culture) - { - string? source = value as string; - string? assemblyName = typeof(ImageSourceConverter).GetTypeInfo().Assembly.GetName().Name; //GetType().GetTypeInfo().Assembly.GetName().Name; - return ImageSource.FromResource(assemblyName + ".Resources.Images." + source, typeof(ImageSourceConverter).GetTypeInfo().Assembly); - } - - /// - /// - /// - /// - /// - /// - /// - /// - /// - public object ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture) - { - throw new NotImplementedException(); - } - } -} diff --git a/maui/samples/Gallery/SampleList/PullToRefreshSamplesList.xml b/maui/samples/Gallery/SampleList/PullToRefreshSamplesList.xml index ac300764..7bda18d7 100644 --- a/maui/samples/Gallery/SampleList/PullToRefreshSamplesList.xml +++ b/maui/samples/Gallery/SampleList/PullToRefreshSamplesList.xml @@ -3,7 +3,7 @@ - + diff --git a/maui/samples/Gallery/Samples/Calendar/GettingStarted/Behavior/GettingStartedBehavior.cs b/maui/samples/Gallery/Samples/Calendar/GettingStarted/Behavior/GettingStartedBehavior.cs index 74d6d368..a3f84df0 100644 --- a/maui/samples/Gallery/Samples/Calendar/GettingStarted/Behavior/GettingStartedBehavior.cs +++ b/maui/samples/Gallery/Samples/Calendar/GettingStarted/Behavior/GettingStartedBehavior.cs @@ -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; } diff --git a/maui/samples/Gallery/Samples/DateTimePicker/GettingStarted/Behavior/GettingStartedBehavior.cs b/maui/samples/Gallery/Samples/DateTimePicker/GettingStarted/Behavior/GettingStartedBehavior.cs index 87317a21..de4bb7e2 100644 --- a/maui/samples/Gallery/Samples/DateTimePicker/GettingStarted/Behavior/GettingStartedBehavior.cs +++ b/maui/samples/Gallery/Samples/DateTimePicker/GettingStarted/Behavior/GettingStartedBehavior.cs @@ -112,7 +112,7 @@ protected override void OnAttachedTo(SampleView sampleView) _timeFormat = new ObservableCollection() { - "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("dateFormatComboBox"); @@ -357,11 +357,18 @@ 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; @@ -369,6 +376,19 @@ void TimeFormatComboBox_SelectionChanged(object? sender, EventArgs e) 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; diff --git a/maui/samples/Gallery/Samples/DateTimePicker/GettingStarted/View/GettingStarted.xaml b/maui/samples/Gallery/Samples/DateTimePicker/GettingStarted/View/GettingStarted.xaml index 62021e2b..f7b42301 100644 --- a/maui/samples/Gallery/Samples/DateTimePicker/GettingStarted/View/GettingStarted.xaml +++ b/maui/samples/Gallery/Samples/DateTimePicker/GettingStarted/View/GettingStarted.xaml @@ -9,7 +9,7 @@ - + diff --git a/maui/samples/Gallery/Samples/Expander/GettingStarted/View/ExpanderGettingStarted.xaml b/maui/samples/Gallery/Samples/Expander/GettingStarted/View/ExpanderGettingStarted.xaml index 30a1368b..3ed5578c 100644 --- a/maui/samples/Gallery/Samples/Expander/GettingStarted/View/ExpanderGettingStarted.xaml +++ b/maui/samples/Gallery/Samples/Expander/GettingStarted/View/ExpanderGettingStarted.xaml @@ -43,7 +43,7 @@ - - @@ -82,7 +82,7 @@ @@ -142,7 +142,7 @@