We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Mouse Over Color Update UWP

Is there a mouse over color I can set for SfListView items? My client feels the list does not indicate he can select any of the items because nothing is reacting to the mouse over. I sort of understand his point of view, I was able to simulate it by putting buttons in place but it's a really round about way to get the mouse over behavior that he's wanting. I thought FocusBorderolor and FocusBorderThickness might achieve this but it seems like maybe that's only for keyboard navigation. Is there any trick for doing a mouse enter/ mouse exit color update for my listview items?

Thanks

8 Replies

GP Gnana Priya Namasivayam Syncfusion Team February 14, 2019 04:48 AM

Hi Mark, 
 
Thanks for using Syncfusion product. 
 
We are currently validating the reported query from our side. We will validate further and provide details in two business days on or before Feb 18, 2109. We will appreciate your patience until then.  
 
 
Regards, 
Gnana Priya N 



AA Arulraj A Syncfusion Team February 18, 2019 02:19 AM

Hi Mark,  

Thanks for your patience. 
  
Currently, we don’t have direct property to set mouse hover color for SfListView items in Xamarin Forms. However, your requirement can be achieved in sample level by using custom renderer (using Grid in the custom renderer) to update while mouse enter and mouse exit color for the listview items in Xamarin Forms UWP. We have created sample for the same. Kindly find the sample below.  
 Sample: ListViewsample
  
Please let us know whether the provided solution satisfies your requirement. If not, kindly revert us with more details related to your requirement by modifying the provided sample with screenshots if possible. It will be helpful for us to provide you a solution.  

Regards, 
Arulraj A 



EM Emil February 24, 2019 09:00 AM

Hi,

I understand that sflistview is customlayout not inheriting xamarin.forms listview thats why this highlighting isnt working. it should be extended on uwp using 

https://docs.microsoft.com/en-us/windows/uwp/design/style/reveal#enabling-reveal-on-custom-controls

beside that it should also include 

https://docs.microsoft.com/en-us/windows/uwp/design/input/gamepad-and-remote-interactions#xy-focus-navigation-and-interaction

Because uwp is not only for desktop or mobile but also Xbox. when I implement XF listview gamepad is working on xbox but Sflistview doesnt include xy focus. therefore it doesnt work.

it is nice to include those features. maybe we should register into feature requests.

Thanks,

Emil


GP Gnana Priya Namasivayam Syncfusion Team February 25, 2019 04:52 AM

Hi Emil, 

We are currently validating the reported query and we will updated you further details on or before 26/2/2019. We will appreciate your patience until then. 

Regards, 
Gnana Priya N. 



JN Jayaleshwari N Syncfusion Team February 26, 2019 05:21 AM

Hi Emil,  
   
We have validated the reported query from our side. As per the implementation, you can access the position from event itself in the sample like below. If you need to pass x and y position, you can get from native event like PointerEntered argument. Therefore, we deeply appreciate the time you took to suggest this requirement, but we regretfully have to deny this request. While we understand how this requirement could be of value, due to above mentioned behavior, we are unable to consider this request at this time. Thank you for your interest in our product and your efforts to improve it. We hope our products continue to provide value to your business requirements.  
   
public class ListViewItemRendererExt : ListViewItemRenderer  
{  
        public ListViewItemRendererExt()  
        {  
            this.PointerEntered += ListViewItemRendererExt_PointerEntered;  
        }  
   
        private void ListViewItemRendererExt_PointerEntered(object sender, Windows.UI.Xaml.Input.PointerRoutedEventArgs e)  
        {  
            this.Element.BackgroundColor = Xamarin.Forms.Color.Red;  
            var location = e.GetCurrentPoint(this);  
            Point position = location.Position;  
        }  
}  
 
If you have any further questions on this, please do not hesitate to contact us, and we will be happy to provide further clarifications.  
   
Regards,  
Jayaleshwari N 



EM Emil February 26, 2019 08:15 AM

Hi,

thank you for reply. it looks good to me. Do you know if it is possible to add reveal on SfListView instead of overriding backgroundcolor like in your sample. Although your sample works fine for me. i would like to add more like "reveal" as in my link above.

Thanks,

Emil


JN Jayaleshwari N Syncfusion Team February 27, 2019 03:50 AM

Hi Emil,  
  
We are currently validating the reported query from our side. We will validate and provide further details on or before March 1, 2019. We will appreciate your patience until then.
  
 
Regards,  
Jayaleshwari N 



GP Gnana Priya Namasivayam Syncfusion Team March 1, 2019 09:27 AM

Hi Emil, 


We would like to let you know that we have planned to have hover effect for the listview item based on your requirement as mentioned. We have logged the feature task as requested.  

You can now track the current status of your request, review the proposed resolution timeline, and contact us for any further inquiries through this link.

 
 
Regards, 
Gnana Priya N 


Loader.
Live Chat Icon For mobile
Up arrow icon