diff --git a/SmartPanel.xaml b/SmartPanel.xaml index df280808e449e02b10d5949b314125a2abc0df04..95d8ce8404d877441265ee6738bbb189c40f5cc3 100644 --- a/SmartPanel.xaml +++ b/SmartPanel.xaml @@ -223,7 +223,7 @@ <!-- template for smartpanelitems. --> <DataTemplate x:Key="SmartPanelItemsTemplate" x:DataType="controls:SmartPanelItem"> - <Grid PointerEntered="Grid_PointerEntered" PointerExited="Grid_PointerExited"> + <Grid PointerEntered="Grid_PointerEntered" PointerExited="Grid_PointerExited" PointerMoved="Grid_PointerMoved"> <Grid.RowDefinitions> <!-- row definition for the contact. --> <RowDefinition Height="auto"/> diff --git a/SmartPanel.xaml.cpp b/SmartPanel.xaml.cpp index 51235ed3d90edf1d1cad742378c815fdff9d647e..34f911638f4325bb0f67e263c91cfeca313b7aca 100644 --- a/SmartPanel.xaml.cpp +++ b/SmartPanel.xaml.cpp @@ -426,21 +426,22 @@ void RingClientUWP::Views::SmartPanel::_cancelCallBtn__Click(Platform::Object^ s void RingClientUWP::Views::SmartPanel::Grid_PointerEntered(Platform::Object^ sender, Windows::UI::Xaml::Input::PointerRoutedEventArgs^ e) { auto grid = dynamic_cast<Grid^>(sender); - auto listBoxItem = dynamic_cast<ListBoxItem^>(sender); auto item = dynamic_cast<SmartPanelItem^>(grid->DataContext); - if (item->_callId->IsEmpty()) - item->_hovered = Windows::UI::Xaml::Visibility::Visible; + for (auto it : SmartPanelItemsViewModel::instance->itemsList) + it->_hovered = Windows::UI::Xaml::Visibility::Collapsed; + + item->_hovered = Windows::UI::Xaml::Visibility::Visible; } void RingClientUWP::Views::SmartPanel::Grid_PointerExited(Platform::Object^ sender, Windows::UI::Xaml::Input::PointerRoutedEventArgs^ e) { - auto listBoxItem = dynamic_cast<ListBoxItem^>(sender); auto grid = dynamic_cast<Grid^>(sender); auto item = dynamic_cast<SmartPanelItem^>(grid->DataContext); - item->_hovered = Windows::UI::Xaml::Visibility::Collapsed; + for each (auto it in SmartPanelItemsViewModel::instance->itemsList) + item->_hovered = Windows::UI::Xaml::Visibility::Collapsed; } @@ -924,3 +925,21 @@ void RingClientUWP::Views::SmartPanel::_selectedAccountAvatarContainer__PointerE _photoboothIcon_->Visibility = Windows::UI::Xaml::Visibility::Collapsed; _shaderPhotoboothIcon_->Visibility = Windows::UI::Xaml::Visibility::Collapsed; } + + +void RingClientUWP::Views::SmartPanel::_smartList__PointerExited(Platform::Object^ sender, Windows::UI::Xaml::Input::PointerRoutedEventArgs^ e) +{ + +} + + +void RingClientUWP::Views::SmartPanel::Grid_PointerMoved(Platform::Object^ sender, Windows::UI::Xaml::Input::PointerRoutedEventArgs^ e) +{ + auto grid = dynamic_cast<Grid^>(sender); + auto item = dynamic_cast<SmartPanelItem^>(grid->DataContext); + + for (auto it : SmartPanelItemsViewModel::instance->itemsList) + it->_hovered = Windows::UI::Xaml::Visibility::Collapsed; + + item->_hovered = Windows::UI::Xaml::Visibility::Visible; +} diff --git a/SmartPanel.xaml.h b/SmartPanel.xaml.h index 326725500449186f8f34cdd62a2b6fa78285483e..8cf5f7ef6d029f56aea242426c693d96fce78c63 100644 --- a/SmartPanel.xaml.h +++ b/SmartPanel.xaml.h @@ -136,6 +136,8 @@ private: void _selectedAccountAvatarContainer__PointerEntered(Platform::Object^ sender, Windows::UI::Xaml::Input::PointerRoutedEventArgs^ e); void _selectedAccountAvatarContainer__PointerReleased(Platform::Object^ sender, Windows::UI::Xaml::Input::PointerRoutedEventArgs^ e); void _selectedAccountAvatarContainer__PointerExited(Platform::Object^ sender, Windows::UI::Xaml::Input::PointerRoutedEventArgs^ e); + void _smartList__PointerExited(Platform::Object^ sender, Windows::UI::Xaml::Input::PointerRoutedEventArgs^ e); + void Grid_PointerMoved(Platform::Object^ sender, Windows::UI::Xaml::Input::PointerRoutedEventArgs^ e); }; } } \ No newline at end of file