
I'm currently looking at purchasing the Navigation product and was playing around with the code. We'd like to style the control such that the breadcrumb text is white and the background Black, and make the button background never show up. I haven't been able to style the underlying PopupButtons at all. Is there a way to make them remain transparent, even when clicked? Is there a way to color the drop down arrow something other than black (so that the arrows are visible on a black background)?
Thanks,
Chris
//Example Styles Below
<DataTemplate x:Key="CommonDataBreadcrumbItemTemplate">
<TextBlock Text="{Binding Path=ExplorerName}"
TextTrimming="CharacterEllipsis"
VerticalAlignment="Center" Foreground="White" />
</DataTemplate>
<DataTemplate x:Key="CommonDataMenuItemNormalTemplate">
<TextBlock Margin="2,0,0,0"
Text="{Binding Path=ExplorerName}"/>
</DataTemplate>
<DataTemplate x:Key="CommonDataMenuItemExpandedTemplate">
<TextBlock Margin="2,0,0,0"
Text="{Binding Path=ExplorerName}"
FontWeight="Bold" />
</DataTemplate>
<Style x:Key="CommonDataBreadcrumbItemStyle"
TargetType="{x:Type navigation:BreadcrumbItem}">
</Style>
<Style x:Key="CommonDataMenuItemContainerStyle"
TargetType="{x:Type MenuItem}">
<Setter Property="Background" Value="Black"></Setter>
<Setter Property="Foreground" Value="White"></Setter>
</Style>
<Style x:Key="DirectoryDataBreadcrumbItemStyle"
TargetType="{x:Type navigation:BreadcrumbItem}"
BasedOn="{StaticResource CommonDataBreadcrumbItemStyle}">
<Setter Property="ItemsSource"
Value="{Binding Path=NavigableChildren}" />
<Setter Property="Foreground" Value="White"></Setter>
</Style>
...
<Grid Name="navBar" VerticalAlignment="Top" HorizontalAlignment="Stretch" Height="35">
<navigation:Breadcrumb Name="breadcrumb" Background="Black" IsEditable="False" Foreground="White" RootItem="{Binding}"
ItemTemplate="{StaticResource CommonDataBreadcrumbItemTemplate}"
MenuItemTemplate="{StaticResource CommonDataMenuItemNormalTemplate}"
MenuItemContainerStyle="{StaticResource CommonDataMenuItemContainerStyle}"
MenuItemExpandedTemplate="{StaticResource CommonDataMenuItemExpandedTemplate}"
ItemContainerStyle="{StaticResource DirectoryDataBreadcrumbItemStyle}" AutoMinimizeItemCount="0" BorderThickness="0">
</navigation:Breadcrumb>
</Grid>
Thanks,
Chris
//Example Styles Below
<DataTemplate x:Key="CommonDataBreadcrumbItemTemplate">
<TextBlock Text="{Binding Path=ExplorerName}"
TextTrimming="CharacterEllipsis"
VerticalAlignment="Center" Foreground="White" />
</DataTemplate>
<DataTemplate x:Key="CommonDataMenuItemNormalTemplate">
<TextBlock Margin="2,0,0,0"
Text="{Binding Path=ExplorerName}"/>
</DataTemplate>
<DataTemplate x:Key="CommonDataMenuItemExpandedTemplate">
<TextBlock Margin="2,0,0,0"
Text="{Binding Path=ExplorerName}"
FontWeight="Bold" />
</DataTemplate>
<Style x:Key="CommonDataBreadcrumbItemStyle"
TargetType="{x:Type navigation:BreadcrumbItem}">
</Style>
<Style x:Key="CommonDataMenuItemContainerStyle"
TargetType="{x:Type MenuItem}">
<Setter Property="Background" Value="Black"></Setter>
<Setter Property="Foreground" Value="White"></Setter>
</Style>
<Style x:Key="DirectoryDataBreadcrumbItemStyle"
TargetType="{x:Type navigation:BreadcrumbItem}"
BasedOn="{StaticResource CommonDataBreadcrumbItemStyle}">
<Setter Property="ItemsSource"
Value="{Binding Path=NavigableChildren}" />
<Setter Property="Foreground" Value="White"></Setter>
</Style>
...
<Grid Name="navBar" VerticalAlignment="Top" HorizontalAlignment="Stretch" Height="35">
<navigation:Breadcrumb Name="breadcrumb" Background="Black" IsEditable="False" Foreground="White" RootItem="{Binding}"
ItemTemplate="{StaticResource CommonDataBreadcrumbItemTemplate}"
MenuItemTemplate="{StaticResource CommonDataMenuItemNormalTemplate}"
MenuItemContainerStyle="{StaticResource CommonDataMenuItemContainerStyle}"
MenuItemExpandedTemplate="{StaticResource CommonDataMenuItemExpandedTemplate}"
ItemContainerStyle="{StaticResource DirectoryDataBreadcrumbItemStyle}" AutoMinimizeItemCount="0" BorderThickness="0">
</navigation:Breadcrumb>
</Grid>