Skip to content

Commit

Permalink
Derive event data classes from EventArgs (Kinnara#178)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kinnara committed Oct 3, 2020
1 parent 7aa1232 commit a23d5bc
Show file tree
Hide file tree
Showing 20 changed files with 46 additions and 32 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
using System.Diagnostics;
using System;
using System.Diagnostics;

namespace ModernWpf.Controls
{
public class ContentDialogButtonClickEventArgs
public class ContentDialogButtonClickEventArgs : EventArgs
{
private ContentDialogButtonClickDeferral _deferral;
private int _deferralCount;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ModernWpf.Controls
{
public class ContentDialogClosedEventArgs
public class ContentDialogClosedEventArgs : EventArgs
{
internal ContentDialogClosedEventArgs(ContentDialogResult result)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
using System.Diagnostics;
using System;
using System.Diagnostics;

namespace ModernWpf.Controls
{
public sealed class ContentDialogClosingEventArgs
public sealed class ContentDialogClosingEventArgs : EventArgs
{
private ContentDialogClosingDeferral _deferral;
private int _deferralCount;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ModernWpf.Controls
{
public class ContentDialogOpenedEventArgs
public class ContentDialogOpenedEventArgs : EventArgs
{
internal ContentDialogOpenedEventArgs()
{
Expand Down
2 changes: 1 addition & 1 deletion ModernWpf.Controls/Flyout/FlyoutBaseClosingEventArgs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

namespace ModernWpf.Controls
{
internal sealed class FlyoutBaseClosingEventArgs
internal sealed class FlyoutBaseClosingEventArgs : EventArgs
{
internal FlyoutBaseClosingEventArgs()
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.

using System;

namespace ModernWpf.Controls
{
public sealed class NavigationViewBackRequestedEventArgs
public sealed class NavigationViewBackRequestedEventArgs : EventArgs
{
internal NavigationViewBackRequestedEventArgs()
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.

using System;

namespace ModernWpf.Controls
{
public sealed class NavigationViewDisplayModeChangedEventArgs
public sealed class NavigationViewDisplayModeChangedEventArgs : EventArgs
{
internal NavigationViewDisplayModeChangedEventArgs()
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.

using System;

namespace ModernWpf.Controls
{
public sealed class NavigationViewItemCollapsedEventArgs
public sealed class NavigationViewItemCollapsedEventArgs : EventArgs
{
internal NavigationViewItemCollapsedEventArgs(NavigationView navigationView)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.

using System;

namespace ModernWpf.Controls
{
public sealed class NavigationViewItemExpandingEventArgs
public sealed class NavigationViewItemExpandingEventArgs : EventArgs
{
internal NavigationViewItemExpandingEventArgs(NavigationView navigationView)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.

using System;
using ModernWpf.Media.Animation;

namespace ModernWpf.Controls
{
public sealed class NavigationViewItemInvokedEventArgs
public sealed class NavigationViewItemInvokedEventArgs : EventArgs
{
public NavigationViewItemInvokedEventArgs()
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.

using System;

namespace ModernWpf.Controls
{
public sealed class NavigationViewPaneClosingEventArgs
public sealed class NavigationViewPaneClosingEventArgs : EventArgs
{
internal NavigationViewPaneClosingEventArgs()
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.

using System;
using ModernWpf.Media.Animation;

namespace ModernWpf.Controls
{
public sealed class NavigationViewSelectionChangedEventArgs
public sealed class NavigationViewSelectionChangedEventArgs : EventArgs
{
internal NavigationViewSelectionChangedEventArgs()
{
Expand Down
2 changes: 1 addition & 1 deletion ModernWpf.Controls/NumberBox/NumberBox.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

namespace ModernWpf.Controls
{
public class NumberBoxValueChangedEventArgs
public class NumberBoxValueChangedEventArgs : EventArgs
{
public NumberBoxValueChangedEventArgs(double oldValue, double newValue)
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.

using System;
using System.Windows;

namespace ModernWpf.Controls
{
public sealed class SelectTemplateEventArgs
public sealed class SelectTemplateEventArgs : EventArgs
{
internal SelectTemplateEventArgs()
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.

using System;
using System.Windows;

namespace ModernWpf.Controls
{
public sealed class ItemsRepeaterElementClearingEventArgs
public sealed class ItemsRepeaterElementClearingEventArgs : EventArgs
{
internal ItemsRepeaterElementClearingEventArgs(
UIElement element)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.

using System;
using System.Windows;

namespace ModernWpf.Controls
{
public sealed class ItemsRepeaterElementIndexChangedEventArgs
public sealed class ItemsRepeaterElementIndexChangedEventArgs : EventArgs
{
internal ItemsRepeaterElementIndexChangedEventArgs(
UIElement element,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.

using System;
using System.Windows;

namespace ModernWpf.Controls
{
public sealed class ItemsRepeaterElementPreparedEventArgs
public sealed class ItemsRepeaterElementPreparedEventArgs : EventArgs
{
internal ItemsRepeaterElementPreparedEventArgs(
UIElement element,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

namespace ModernWpf.Controls
{
public sealed class SelectionModelChildrenRequestedEventArgs
public sealed class SelectionModelChildrenRequestedEventArgs : EventArgs
{
internal SelectionModelChildrenRequestedEventArgs(object source, IndexPath sourceIndexPath, bool throwOnAccess)
{
Expand Down
6 changes: 4 additions & 2 deletions ModernWpf.Controls/SplitButton/SplitButtonClickEventArgs.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.

using System;

namespace ModernWpf.Controls
{
public class SplitButtonClickEventArgs
public class SplitButtonClickEventArgs : EventArgs
{
}

public class ToggleSplitButtonIsCheckedChangedEventArgs
public class ToggleSplitButtonIsCheckedChangedEventArgs : EventArgs
{
}
}
6 changes: 4 additions & 2 deletions ModernWpf.Controls/SplitView/SplitViewPaneClosingEventArgs.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
namespace ModernWpf.Controls
using System;

namespace ModernWpf.Controls
{
public sealed class SplitViewPaneClosingEventArgs
public sealed class SplitViewPaneClosingEventArgs : EventArgs
{
internal SplitViewPaneClosingEventArgs()
{
Expand Down

0 comments on commit a23d5bc

Please sign in to comment.