Question

Breadcrumb ComboBox Expand on Double Tap?

Posted 17 days ago by Avatar Cory J. Geesaman

I have a Breadcrumb defined by:

<navigation:Breadcrumb x:Name="breadcrumb" AutoMinimizeItemCount="0"
Grid.Row="0"
Margin="0,10,0,0"
PathSeparator="/"
ItemContainerStyle="{StaticResource BreadcrumbItemStyle}"
ItemTemplate="{StaticResource BreadcrumbItemTemplate}"
ComboBoxItemsSource="{Binding ElementName=mainWindow, Path=ComboBoxItems}"
ComboBoxItemTemplate="{x:Null}"
ComboBoxItemTemplateSelector="{StaticResource CustomComboBoxItemTemplateSelector}"
ComboBoxTextPath="@Name"
MenuItemContainerStyle="{StaticResource MenuItemContainerStyle}"
MenuItemTemplate="{StaticResource MenuItemNormalTemplate}"
MenuItemExpandedTemplate="{StaticResource MenuItemExpandedTemplate}"
MaxTailItemCount="100"
IsEditable="False"
ConvertItem="OnBreadcrumbConvertItem"
SelectedItemChanged="OnBreadcrumbSelectedItemChanged">
</navigation:Breadcrumb>

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?

Information The latest build of this product (2018.1 build 0672) was released 2 months ago, which was before this thread was created.

Comments (2)

Posted 16 days 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.

<navigation:Breadcrumb.Resources>
	<Style TargetType="navigation:BreadcrumbItemNavigateButton">
		<Setter Property="PopupIndicatorTemplate">
			<Setter.Value>
				<DataTemplate>
					<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)}" />
				</DataTemplate>
			</Setter.Value>
		</Setter>
	</Style>
</navigation:Breadcrumb.Resources>

Actipro Software Support
Posted 16 days ago by Cory J. Geesaman

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


Add a Comment

Please log in to a validated account to post comments.