Breadcrumb ComboBox Expand on Double Tap?

Navigation for WPF Forum

Posted 6 years ago by Cory J. Geesaman
Version: 18.1.0672

I have a Breadcrumb defined by:

<navigation:Breadcrumb x:Name="breadcrumb" AutoMinimizeItemCount="0"
ItemContainerStyle="{StaticResource BreadcrumbItemStyle}"
ItemTemplate="{StaticResource BreadcrumbItemTemplate}"
ComboBoxItemsSource="{Binding ElementName=mainWindow, Path=ComboBoxItems}"
ComboBoxItemTemplateSelector="{StaticResource CustomComboBoxItemTemplateSelector}"
MenuItemContainerStyle="{StaticResource MenuItemContainerStyle}"
MenuItemTemplate="{StaticResource MenuItemNormalTemplate}"
MenuItemExpandedTemplate="{StaticResource MenuItemExpandedTemplate}"

And I'm attempting to make the ComboBoxes drop down when their element is double tapped, akin to pressing the arrow to the right of an item (then collapse again when tapping elsewhere or on the same item with the ComboBox already visible.)  The purpose of this is because it is kind of tricky to tap the arrow itself on a tablet device, and at the same time I don't want to kill the ability to navigate up/down the existing trail by a quick tap (or obscure it by making the initial tap immediately open a ComboBox dropdown.)  Is this possible?  If so, what needs to be done to make it happen?

Comments (2)

Posted 6 years ago by Actipro Software Support - Cleveland, OH, USA

Hi Cory,

While that would be difficult to do, might I suggest updating the popup indicator template to be wider instead?

This kind of code would let you set a Margin of your choosing.

	<Style TargetType="navigation:BreadcrumbItemNavigateButton">
		<Setter Property="PopupIndicatorTemplate">
					<Path Margin="7,0" Data="M 0,0 L 7,0 L 3.5,3.5 Z" Fill="{Binding RelativeSource={RelativeSource Self}, Path=(TextElement.Foreground)}" />

Actipro Software Support

Posted 6 years ago by Cory J. Geesaman

Thanks, this looks reasonable and is probably a bit more intuitive than my initial double-tap idea.

The latest build of this product (v24.1.2) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.