Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix!: Remove CalendarDatePicker._dateChanged #11192

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
3 changes: 3 additions & 0 deletions build/PackageDiffIgnore.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9149,6 +9149,7 @@
<Member fullName="Windows.Foundation.TypedEventHandler`2&lt;Microsoft.UI.Xaml.Controls.IInputValidationControl,Microsoft.UI.Xaml.Controls.HasValidationErrorsChangedEventArgs&gt; Microsoft.UI.Xaml.Controls.TextBox::HasValidationErrorsChanged" reason="Not present in WinAppSDK 1.2" />
<Member fullName="Windows.Foundation.TypedEventHandler`2&lt;Microsoft.UI.Xaml.Controls.IInputValidationControl,Microsoft.UI.Xaml.Controls.InputValidationErrorEventArgs&gt; Microsoft.UI.Xaml.Controls.TextBox::ValidationError" reason="Not present in WinAppSDK 1.2" />
<Member fullName="Windows.Foundation.TypedEventHandler`2&lt;Microsoft.UI.Xaml.FrameworkElement,Microsoft.UI.Xaml.DataContextChangedEventArgs&gt; Microsoft.UI.Xaml.Controls.ElementFactory::DataContextChanged" reason="Not present in WinAppSDK 1.2" />
<Member fullName="Windows.Foundation.TypedEventHandler`2&lt;Windows.UI.Xaml.Controls.CalendarDatePicker,Windows.UI.Xaml.Controls.CalendarDatePickerDateChangedEventArgs&gt; Windows.UI.Xaml.Controls.CalendarDatePicker::_dateChanged" reason="Not in Windows" />
</Events>
<Fields />
<Properties>
Expand Down Expand Up @@ -9391,6 +9392,8 @@
<Member fullName="Windows.UI.Xaml.CornerRadius Uno.UI.Toolkit.ElevatedView.get_CornerRadius()" reason="Already exists in Control and ElevatedView should not shadow it" />
<Member fullName="System.Void Uno.UI.Toolkit.ElevatedView.set_CornerRadius(Windows.UI.Xaml.CornerRadius value)" reason="Already exists in Control and ElevatedView should not shadow it" />
<Member fullName="Windows.UI.Xaml.DependencyProperty Uno.UI.Toolkit.ElevatedView.get_CornerRadiusProperty()" reason="Already exists in Control and ElevatedView should not shadow it" />
<Member fullName="System.Void Windows.UI.Xaml.Controls.CalendarDatePicker.add__dateChanged(Windows.Foundation.TypedEventHandler`2&lt;Windows.UI.Xaml.Controls.CalendarDatePicker,Windows.UI.Xaml.Controls.CalendarDatePickerDateChangedEventArgs&gt; value)" reason="Not in Windows" />
<Member fullName="System.Void Windows.UI.Xaml.Controls.CalendarDatePicker.remove__dateChanged(Windows.Foundation.TypedEventHandler`2&lt;Windows.UI.Xaml.Controls.CalendarDatePicker,Windows.UI.Xaml.Controls.CalendarDatePickerDateChangedEventArgs&gt; value)" reason="Not in Windows" />
<Member fullName="System.Void Uno.UI.Controls.Window.SetNeedsKeyboard(AppKit.NSView view, System.Boolean needsKeyboard)" reason="Not needed and doesn't do something useful" />
<Member fullName="System.Void Windows.ApplicationModel.SuspendingDeferral..ctor(System.Action deferralDone)" reason="This constructor does not exist in Windows" />
</Methods>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,11 @@ namespace Windows.UI.Xaml.Controls
{
partial class CalendarDatePicker
{
private event EventHandler<object> _opened;
public event EventHandler<object> Opened;

public event EventHandler<object> Opened
{
add => _opened += value;
remove => _opened -= value;
}

private event EventHandler<object> _closed;
public event EventHandler<object> Closed;

public event EventHandler<object> Closed
{
add => _closed += value;
remove => _closed -= value;
}

public event TypedEventHandler<CalendarDatePicker, CalendarDatePickerDateChangedEventArgs> _dateChanged;

public event TypedEventHandler<CalendarDatePicker, CalendarDatePickerDateChangedEventArgs> DateChanged
{
add => _dateChanged += value;
remove => _dateChanged -= value;
}
public event TypedEventHandler<CalendarDatePicker, CalendarDatePickerDateChangedEventArgs> DateChanged;

private protected override void OnUnloaded()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -283,13 +283,13 @@ protected override void OnApplyTemplate()
void OnFlyoutOpened(object sender, object eventArgs)
{
IsCalendarOpen = true;
_opened?.Invoke(this, new object());
Opened?.Invoke(this, new object());
}

void OnFlyoutClosed(object sender, object eventArgs)
{
IsCalendarOpen = false;
_closed?.Invoke(this, new object());
Closed?.Invoke(this, new object());
}

void OnCalendarViewDayChanging(CalendarView sender, CalendarViewDayItemChangingEventArgs args)
Expand Down Expand Up @@ -404,7 +404,7 @@ private void RaiseDateChanged(
//GetDateChangedEventSourceNoRef(&pEventSource));

//pEventSource.Raise(this, spArgs);
_dateChanged?.Invoke(this, spArgs);
DateChanged?.Invoke(this, spArgs);
}

public void SetYearDecadeDisplayDimensions(int columns, int rows)
Expand Down