Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ Microsoft.Maui.Controls.ITextElement.OnCharacterSpacingPropertyChanged(double ol
Microsoft.Maui.Controls.ITextElement.OnTextTransformChanged(Microsoft.Maui.TextTransform oldValue, Microsoft.Maui.TextTransform newValue) -> void
Microsoft.Maui.Controls.ITextElement.TextTransform.get -> Microsoft.Maui.TextTransform
Microsoft.Maui.Controls.ITextElement.TextTransform.set -> void
Microsoft.Maui.Controls.TimeChangedEventArgs.NewTime.get -> System.TimeSpan?
Microsoft.Maui.Controls.TimeChangedEventArgs.OldTime.get -> System.TimeSpan?
Microsoft.Maui.Controls.TimeChangedEventArgs.TimeChangedEventArgs(System.TimeSpan? oldTime, System.TimeSpan? newTime) -> void
~Microsoft.Maui.Controls.ITextElement.OnTextColorPropertyChanged(Microsoft.Maui.Graphics.Color oldValue, Microsoft.Maui.Graphics.Color newValue) -> void
~Microsoft.Maui.Controls.ITextElement.TextColor.get -> Microsoft.Maui.Graphics.Color
~Microsoft.Maui.Controls.ITextElement.UpdateFormsText(string original, Microsoft.Maui.TextTransform transform) -> string
Expand Down Expand Up @@ -155,9 +158,6 @@ Microsoft.Maui.Controls.StyleableElement.StyleableElement() -> void
Microsoft.Maui.Controls.StyleableElement.StyleClass.get -> System.Collections.Generic.IList<string!>!
Microsoft.Maui.Controls.StyleableElement.StyleClass.set -> void
Microsoft.Maui.Controls.TimeChangedEventArgs
Microsoft.Maui.Controls.TimeChangedEventArgs.NewTime.get -> System.TimeSpan
Microsoft.Maui.Controls.TimeChangedEventArgs.OldTime.get -> System.TimeSpan
Microsoft.Maui.Controls.TimeChangedEventArgs.TimeChangedEventArgs(System.TimeSpan oldTime, System.TimeSpan newTime) -> void
Microsoft.Maui.Controls.TimePicker.TimeSelected -> System.EventHandler<Microsoft.Maui.Controls.TimeChangedEventArgs>
Microsoft.Maui.Controls.TitleBar
Microsoft.Maui.Controls.TitleBar.Content.get -> Microsoft.Maui.IView?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ Microsoft.Maui.Controls.DateChangedEventArgs.OldDate.get -> System.DateTime?
Microsoft.Maui.Controls.DatePicker.Date.get -> System.DateTime?
Microsoft.Maui.Controls.StyleableElement.Style.get -> Microsoft.Maui.Controls.Style?
Microsoft.Maui.Controls.Internals.TextTransformUtilities
Microsoft.Maui.Controls.TimeChangedEventArgs.NewTime.get -> System.TimeSpan?
Microsoft.Maui.Controls.TimeChangedEventArgs.OldTime.get -> System.TimeSpan?
Microsoft.Maui.Controls.TimeChangedEventArgs.TimeChangedEventArgs(System.TimeSpan? oldTime, System.TimeSpan? newTime) -> void
override Microsoft.Maui.Controls.ShadowTypeConverter.CanConvertFrom(System.ComponentModel.ITypeDescriptorContext? context, System.Type? sourceType) -> bool
override Microsoft.Maui.Controls.ShadowTypeConverter.CanConvertTo(System.ComponentModel.ITypeDescriptorContext? context, System.Type? destinationType) -> bool
override Microsoft.Maui.Controls.ShadowTypeConverter.ConvertFrom(System.ComponentModel.ITypeDescriptorContext? context, System.Globalization.CultureInfo? culture, object! value) -> object!
Expand Down Expand Up @@ -317,9 +320,6 @@ Microsoft.Maui.Controls.StyleableElement.StyleableElement() -> void
Microsoft.Maui.Controls.StyleableElement.StyleClass.get -> System.Collections.Generic.IList<string!>!
Microsoft.Maui.Controls.StyleableElement.StyleClass.set -> void
Microsoft.Maui.Controls.TimeChangedEventArgs
Microsoft.Maui.Controls.TimeChangedEventArgs.NewTime.get -> System.TimeSpan
Microsoft.Maui.Controls.TimeChangedEventArgs.OldTime.get -> System.TimeSpan
Microsoft.Maui.Controls.TimeChangedEventArgs.TimeChangedEventArgs(System.TimeSpan oldTime, System.TimeSpan newTime) -> void
Microsoft.Maui.Controls.TimePicker.TimeSelected -> System.EventHandler<Microsoft.Maui.Controls.TimeChangedEventArgs>
Microsoft.Maui.Controls.TitleBar
Microsoft.Maui.Controls.TitleBar.Content.get -> Microsoft.Maui.IView?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ Microsoft.Maui.Controls.DateChangedEventArgs.OldDate.get -> System.DateTime?
Microsoft.Maui.Controls.DatePicker.Date.get -> System.DateTime?
Microsoft.Maui.Controls.StyleableElement.Style.get -> Microsoft.Maui.Controls.Style?
Microsoft.Maui.Controls.Internals.TextTransformUtilities
Microsoft.Maui.Controls.TimeChangedEventArgs.NewTime.get -> System.TimeSpan?
Microsoft.Maui.Controls.TimeChangedEventArgs.OldTime.get -> System.TimeSpan?
Microsoft.Maui.Controls.TimeChangedEventArgs.TimeChangedEventArgs(System.TimeSpan? oldTime, System.TimeSpan? newTime) -> void
override Microsoft.Maui.Controls.ShadowTypeConverter.CanConvertFrom(System.ComponentModel.ITypeDescriptorContext? context, System.Type? sourceType) -> bool
override Microsoft.Maui.Controls.ShadowTypeConverter.CanConvertTo(System.ComponentModel.ITypeDescriptorContext? context, System.Type? destinationType) -> bool
override Microsoft.Maui.Controls.ShadowTypeConverter.ConvertFrom(System.ComponentModel.ITypeDescriptorContext? context, System.Globalization.CultureInfo? culture, object! value) -> object!
Expand Down Expand Up @@ -318,9 +321,6 @@ Microsoft.Maui.Controls.StyleableElement.StyleableElement() -> void
Microsoft.Maui.Controls.StyleableElement.StyleClass.get -> System.Collections.Generic.IList<string!>!
Microsoft.Maui.Controls.StyleableElement.StyleClass.set -> void
Microsoft.Maui.Controls.TimeChangedEventArgs
Microsoft.Maui.Controls.TimeChangedEventArgs.NewTime.get -> System.TimeSpan
Microsoft.Maui.Controls.TimeChangedEventArgs.OldTime.get -> System.TimeSpan
Microsoft.Maui.Controls.TimeChangedEventArgs.TimeChangedEventArgs(System.TimeSpan oldTime, System.TimeSpan newTime) -> void
Microsoft.Maui.Controls.TimePicker.TimeSelected -> System.EventHandler<Microsoft.Maui.Controls.TimeChangedEventArgs>
Microsoft.Maui.Controls.TitleBar
Microsoft.Maui.Controls.TitleBar.Content.get -> Microsoft.Maui.IView?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ Microsoft.Maui.Controls.ITextElement.OnCharacterSpacingPropertyChanged(double ol
Microsoft.Maui.Controls.ITextElement.OnTextTransformChanged(Microsoft.Maui.TextTransform oldValue, Microsoft.Maui.TextTransform newValue) -> void
Microsoft.Maui.Controls.ITextElement.TextTransform.get -> Microsoft.Maui.TextTransform
Microsoft.Maui.Controls.ITextElement.TextTransform.set -> void
Microsoft.Maui.Controls.TimeChangedEventArgs.NewTime.get -> System.TimeSpan?
Microsoft.Maui.Controls.TimeChangedEventArgs.OldTime.get -> System.TimeSpan?
Microsoft.Maui.Controls.TimeChangedEventArgs.TimeChangedEventArgs(System.TimeSpan? oldTime, System.TimeSpan? newTime) -> void
~Microsoft.Maui.Controls.ITextElement.OnTextColorPropertyChanged(Microsoft.Maui.Graphics.Color oldValue, Microsoft.Maui.Graphics.Color newValue) -> void
~Microsoft.Maui.Controls.ITextElement.TextColor.get -> Microsoft.Maui.Graphics.Color
~Microsoft.Maui.Controls.ITextElement.UpdateFormsText(string original, Microsoft.Maui.TextTransform transform) -> string
Expand Down Expand Up @@ -154,9 +157,6 @@ Microsoft.Maui.Controls.StyleableElement.StyleableElement() -> void
Microsoft.Maui.Controls.StyleableElement.StyleClass.get -> System.Collections.Generic.IList<string!>!
Microsoft.Maui.Controls.StyleableElement.StyleClass.set -> void
Microsoft.Maui.Controls.TimeChangedEventArgs
Microsoft.Maui.Controls.TimeChangedEventArgs.NewTime.get -> System.TimeSpan
Microsoft.Maui.Controls.TimeChangedEventArgs.OldTime.get -> System.TimeSpan
Microsoft.Maui.Controls.TimeChangedEventArgs.TimeChangedEventArgs(System.TimeSpan oldTime, System.TimeSpan newTime) -> void
Microsoft.Maui.Controls.TimePicker.TimeSelected -> System.EventHandler<Microsoft.Maui.Controls.TimeChangedEventArgs>
Microsoft.Maui.Controls.TitleBar
Microsoft.Maui.Controls.TitleBar.Content.get -> Microsoft.Maui.IView?
Expand Down
6 changes: 3 additions & 3 deletions src/Controls/src/Core/PublicAPI/net/PublicAPI.Unshipped.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ Microsoft.Maui.Controls.ITextAlignmentElement.HorizontalTextAlignment.get -> Mic
Microsoft.Maui.Controls.ITextAlignmentElement.OnHorizontalTextAlignmentPropertyChanged(Microsoft.Maui.TextAlignment oldValue, Microsoft.Maui.TextAlignment newValue) -> void
Microsoft.Maui.Controls.ITextAlignmentElement.VerticalTextAlignment.get -> Microsoft.Maui.TextAlignment
Microsoft.Maui.Controls.ITextElement
Microsoft.Maui.Controls.TimeChangedEventArgs.NewTime.get -> System.TimeSpan?
Microsoft.Maui.Controls.TimeChangedEventArgs.OldTime.get -> System.TimeSpan?
Microsoft.Maui.Controls.TimeChangedEventArgs.TimeChangedEventArgs(System.TimeSpan? oldTime, System.TimeSpan? newTime) -> void
~Microsoft.Maui.Controls.ITextElement.OnTextColorPropertyChanged(Microsoft.Maui.Graphics.Color oldValue, Microsoft.Maui.Graphics.Color newValue) -> void
~Microsoft.Maui.Controls.ITextElement.TextColor.get -> Microsoft.Maui.Graphics.Color
~Microsoft.Maui.Controls.ITextElement.UpdateFormsText(string original, Microsoft.Maui.TextTransform transform) -> string
Expand Down Expand Up @@ -149,9 +152,6 @@ Microsoft.Maui.Controls.StyleableElement.StyleableElement() -> void
Microsoft.Maui.Controls.StyleableElement.StyleClass.get -> System.Collections.Generic.IList<string!>!
Microsoft.Maui.Controls.StyleableElement.StyleClass.set -> void
Microsoft.Maui.Controls.TimeChangedEventArgs
Microsoft.Maui.Controls.TimeChangedEventArgs.NewTime.get -> System.TimeSpan
Microsoft.Maui.Controls.TimeChangedEventArgs.OldTime.get -> System.TimeSpan
Microsoft.Maui.Controls.TimeChangedEventArgs.TimeChangedEventArgs(System.TimeSpan oldTime, System.TimeSpan newTime) -> void
Microsoft.Maui.Controls.TimePicker.TimeSelected -> System.EventHandler<Microsoft.Maui.Controls.TimeChangedEventArgs>
Microsoft.Maui.Controls.TitleBar
Microsoft.Maui.Controls.TitleBar.Content.get -> Microsoft.Maui.IView?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ Microsoft.Maui.Controls.ITextElement.TextTransform.set -> void
Microsoft.Maui.Controls.ShadowTypeConverter
Microsoft.Maui.Controls.ShadowTypeConverter.ShadowTypeConverter() -> void
Microsoft.Maui.Controls.StyleableElement.Style.get -> Microsoft.Maui.Controls.Style?
Microsoft.Maui.Controls.TimeChangedEventArgs.NewTime.get -> System.TimeSpan?
Microsoft.Maui.Controls.TimeChangedEventArgs.OldTime.get -> System.TimeSpan?
Microsoft.Maui.Controls.TimeChangedEventArgs.TimeChangedEventArgs(System.TimeSpan? oldTime, System.TimeSpan? newTime) -> void
override Microsoft.Maui.Controls.ShadowTypeConverter.CanConvertFrom(System.ComponentModel.ITypeDescriptorContext? context, System.Type? sourceType) -> bool
override Microsoft.Maui.Controls.ShadowTypeConverter.CanConvertTo(System.ComponentModel.ITypeDescriptorContext? context, System.Type? destinationType) -> bool
override Microsoft.Maui.Controls.ShadowTypeConverter.ConvertFrom(System.ComponentModel.ITypeDescriptorContext? context, System.Globalization.CultureInfo? culture, object! value) -> object!
Expand Down Expand Up @@ -149,9 +152,6 @@ Microsoft.Maui.Controls.StyleableElement.StyleableElement() -> void
Microsoft.Maui.Controls.StyleableElement.StyleClass.get -> System.Collections.Generic.IList<string!>!
Microsoft.Maui.Controls.StyleableElement.StyleClass.set -> void
Microsoft.Maui.Controls.TimeChangedEventArgs
Microsoft.Maui.Controls.TimeChangedEventArgs.NewTime.get -> System.TimeSpan
Microsoft.Maui.Controls.TimeChangedEventArgs.OldTime.get -> System.TimeSpan
Microsoft.Maui.Controls.TimeChangedEventArgs.TimeChangedEventArgs(System.TimeSpan oldTime, System.TimeSpan newTime) -> void
Microsoft.Maui.Controls.TimePicker.TimeSelected -> System.EventHandler<Microsoft.Maui.Controls.TimeChangedEventArgs>
Microsoft.Maui.Controls.TitleBar
Microsoft.Maui.Controls.TitleBar.Content.get -> Microsoft.Maui.IView?
Expand Down
6 changes: 3 additions & 3 deletions src/Controls/src/Core/TimeChangedEventArgs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public class TimeChangedEventArgs : EventArgs
/// <param name="oldTime"></param>
/// <param name="newTime"></param>
/// <remarks>To be added.</remarks>
public TimeChangedEventArgs(TimeSpan oldTime, TimeSpan newTime)
public TimeChangedEventArgs(TimeSpan? oldTime, TimeSpan? newTime)
{
OldTime = oldTime;
NewTime = newTime;
Expand All @@ -20,11 +20,11 @@ public TimeChangedEventArgs(TimeSpan oldTime, TimeSpan newTime)
/// <summary>The time that the user entered.</summary>
/// <value>To be added.</value>
/// <remarks>To be added.</remarks>
public TimeSpan NewTime { get; private set; }
public TimeSpan? NewTime { get; private set; }

/// <summary>The time that was on the element at the time that the user selected it.</summary>
/// <value>To be added.</value>
/// <remarks>To be added.</remarks>
public TimeSpan OldTime { get; private set; }
public TimeSpan? OldTime { get; private set; }
}
}
4 changes: 2 additions & 2 deletions src/Controls/tests/Core.UnitTests/TimePickerUnitTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ public void DatePickerSelectedEventArgs(TimeSpan initialTime, TimeSpan finalTime
timePicker.Time = initialTime;

TimePicker pickerFromSender = null;
TimeSpan oldTime = new TimeSpan();
TimeSpan newTime = new TimeSpan();
TimeSpan? oldTime = new TimeSpan();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should it be initialized now at null

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could be. In this case following the same pattern done with the changes in DatePicker (handler, tests etc): https://github.com/dotnet/maui/blob/net10.0/src/Controls/tests/Core.UnitTests/DatePickerUnitTest.cs#L179

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, we might want to create a couple of more tests with these variables taking null and everything works too.

TimeSpan? newTime = new TimeSpan();

timePicker.TimeSelected += (s, e) =>
{
Expand Down
Loading