Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
75
How do you change the focus rectangle/style for the selected item in a Carousel control?
posted
Hi,I use an oval button for my item template for items in my carousel. when using an oval the focus rectangle appears as a large square behind my oval and look very bad. How can I change or turn off the standard focus rectangle. I would like to change it to a glow around the oval but like I said nothing I do affects the standard focus rectangle.A fast answer would be great as i have a demo with the CEO tomorrow...eek!Thanks

 

Parents
  • 9694
    posted

    Hello,

    I apologize that we could not respond to this post the same day it was posted. We get so many posts that it takes a while to go through each one. If I had seen your request for expediency sooner, I would have tried to get you an answer sooner.

    If you are using the XamCarouselListBox, you can disable focus for all CarouselListBoxItems by declaring the following style in a Resources section of your XAML.

    <Style TargetType="{x:Type igWindows:CarouselListBoxItem}">
       
    <Setter Property="FocusVisualStyle" Value="{x:Null}" />
       
    <Setter Property="Focusable" Value="False" />
    </
    Style>

    This will disable the focus rectangle around each list item. Taking this approach you can also define your FocusVisualStyle for each item to be a custom shape. This takes a little more work. If you would like further assistance on how to customize the shape of the focus visual style, please let me know.

    Thanks,

    Curtis

Reply Children