-
Notifications
You must be signed in to change notification settings - Fork 705
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update HNav based on API Review (#2196)
* changed api, added tests, fixed bugs * fixed test * addressed comments * fixed test failure * fixed test issue (leftclick on wrong point) Co-authored-by: Keith Mahoney <keith.mahoney@microsoft.com>
- Loading branch information
Showing
18 changed files
with
311 additions
and
178 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
37 changes: 37 additions & 0 deletions
37
dev/NavigationView/NavigationViewItemCollapsedEventArgs.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. See LICENSE in the project root for license information. | ||
|
||
#include "pch.h" | ||
#include "common.h" | ||
#include "NavigationViewItemCollapsedEventArgs.h" | ||
|
||
NavigationViewItemCollapsedEventArgs::NavigationViewItemCollapsedEventArgs(const winrt::NavigationView& navigationView) | ||
{ | ||
m_navigationView.set(navigationView); | ||
} | ||
|
||
winrt::NavigationViewItemBase NavigationViewItemCollapsedEventArgs::CollapsedItemContainer() | ||
{ | ||
return m_collapsedItemContainer.get(); | ||
} | ||
|
||
void NavigationViewItemCollapsedEventArgs::CollapsedItemContainer(winrt::NavigationViewItemBase const& value) | ||
{ | ||
m_collapsedItemContainer.set(value); | ||
} | ||
|
||
winrt::IInspectable NavigationViewItemCollapsedEventArgs::CollapsedItem() | ||
{ | ||
if (auto const collapsedItem = m_collapsedItem.get()) | ||
{ | ||
return collapsedItem; | ||
} | ||
|
||
if (auto const nv = m_navigationView.get()) | ||
{ | ||
m_collapsedItem.set(nv.MenuItemFromContainer(m_collapsedItemContainer.get())); | ||
return m_collapsedItem.get(); | ||
} | ||
|
||
return nullptr; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. See LICENSE in the project root for license information. | ||
|
||
#pragma once | ||
|
||
#include "NavigationViewItemCollapsedEventArgs.g.h" | ||
|
||
class NavigationViewItemCollapsedEventArgs : | ||
public ReferenceTracker<NavigationViewItemCollapsedEventArgs, winrt::implementation::NavigationViewItemCollapsedEventArgsT, winrt::composing, winrt::composable> | ||
{ | ||
public: | ||
NavigationViewItemCollapsedEventArgs(const winrt::NavigationView& navigationView); | ||
|
||
winrt::NavigationViewItemBase CollapsedItemContainer(); | ||
void CollapsedItemContainer(winrt::NavigationViewItemBase const& value); | ||
|
||
winrt::IInspectable CollapsedItem(); | ||
|
||
private: | ||
tracker_ref<winrt::NavigationViewItemBase> m_collapsedItemContainer{ this }; | ||
tracker_ref<winrt::IInspectable> m_collapsedItem{ this }; | ||
tracker_ref<winrt::NavigationView> m_navigationView{ this }; | ||
}; |
37 changes: 37 additions & 0 deletions
37
dev/NavigationView/NavigationViewItemExpandingEventArgs.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. See LICENSE in the project root for license information. | ||
|
||
#include "pch.h" | ||
#include "common.h" | ||
#include "NavigationViewItemExpandingEventArgs.h" | ||
|
||
NavigationViewItemExpandingEventArgs::NavigationViewItemExpandingEventArgs(const winrt::NavigationView& navigationView) | ||
{ | ||
m_navigationView.set(navigationView); | ||
} | ||
|
||
winrt::NavigationViewItemBase NavigationViewItemExpandingEventArgs::ExpandingItemContainer() | ||
{ | ||
return m_expandingItemContainer.get(); | ||
} | ||
|
||
void NavigationViewItemExpandingEventArgs::ExpandingItemContainer(winrt::NavigationViewItemBase const& value) | ||
{ | ||
m_expandingItemContainer.set(value); | ||
} | ||
|
||
winrt::IInspectable NavigationViewItemExpandingEventArgs::ExpandingItem() | ||
{ | ||
if (auto const expandingItem = m_expandingItem.get()) | ||
{ | ||
return expandingItem; | ||
} | ||
|
||
if (auto const nv = m_navigationView.get()) | ||
{ | ||
m_expandingItem.set(nv.MenuItemFromContainer(m_expandingItemContainer.get())); | ||
return m_expandingItem.get(); | ||
} | ||
|
||
return nullptr; | ||
} |
Oops, something went wrong.