Capitalize the LinkGroup DisplayName

Oct 15, 2013 at 5:20 PM
How can i capitalize first letter or all letters in tab name ?
i use wpf code as the following :
<mui:LinkGroup DisplayName="COMPTOIR" >
... 
</mui:LinkGroup>
<mui:LinkGroup DisplayName="Achats/Ventes" >
...
</mui:LinkGroup>
but i get the main menu as shown on the following image:
Image

Thanks in advance :)
Oct 17, 2013 at 8:22 AM
Edited Oct 17, 2013 at 8:24 AM
In ModernMenu.xaml
Text="{Binding DisplayName, Converter={StaticResource ToLowerConverter}}"
to
Text="{Binding DisplayName, Converter={StaticResource ToUpperConverter}}"
Here is the complet file with changes, just copy past
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:controls="clr-namespace:FirstFloor.ModernUI.Windows.Controls">

    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="/FirstFloor.ModernUI;component/Assets/Converters.xaml" />
        <ResourceDictionary Source="/FirstFloor.ModernUI;component/Assets/ListBox.xaml" />
    </ResourceDictionary.MergedDictionaries>
    
    <Style TargetType="controls:ModernMenu">
        <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="controls:ModernMenu">
                    <Grid>
                        <Grid.Resources>
                            <Style TargetType="ListBox" BasedOn="{StaticResource {x:Type ListBox}}">
                                <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Hidden"/>
                                <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Hidden"/>
                                <Setter Property="ScrollViewer.CanContentScroll" Value="false"/>
                                <Setter Property="ScrollViewer.PanningMode" Value="Both"/>
                            </Style>
                        </Grid.Resources>
                        
                        <Grid.RowDefinitions>
                            <RowDefinition Height="40" />
                            <RowDefinition Height="16" />
                        </Grid.RowDefinitions>

                        <ListBox ItemsSource="{TemplateBinding VisibleLinkGroups}"
                                 SelectedItem="{Binding SelectedLinkGroup, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}">
                            <ListBox.ItemContainerStyle>
                                <Style TargetType="ListBoxItem">
                                    <Setter Property="FocusVisualStyle" Value="{x:Null}" />
                                    <Setter Property="FontFamily" Value="Segoe UI Light" />
                                    <Setter Property="Foreground" Value="{DynamicResource MenuText}" />
                                    <Setter Property="FontSize" Value="23"/>
                                    <Setter Property="HorizontalContentAlignment" Value="Center" />
                                    <Setter Property="VerticalContentAlignment" Value="Center" />
                                    <Setter Property="TextOptions.TextFormattingMode" Value="Ideal" />
                                    <Setter Property="Margin" Value="0,0,12,0" />
                                    <Setter Property="Template">
                                        <Setter.Value>
                                            <ControlTemplate TargetType="ListBoxItem">
                                                <TextBlock DataContext="{TemplateBinding Content}"
                                                           Text="{Binding DisplayName, Converter={StaticResource ToUpperConverter}}"
                                                           HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                                           VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                                           SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                                                <ControlTemplate.Triggers>
                                                    <Trigger Property="IsMouseOver" Value="true">
                                                        <Setter Property="Foreground" Value="{DynamicResource MenuTextHover}"/>
                                                    </Trigger>
                                                    <Trigger Property="IsSelected" Value="true">
                                                        <Setter Property="Foreground" Value="{DynamicResource MenuTextSelected}"/>
                                                    </Trigger>
                                                </ControlTemplate.Triggers>
                                            </ControlTemplate>
                                        </Setter.Value>
                                    </Setter>
                                </Style>
                            </ListBox.ItemContainerStyle>
                            <ListBox.ItemsPanel>
                                <ItemsPanelTemplate>
                                    <StackPanel Orientation="Horizontal" />
                                </ItemsPanelTemplate>
                            </ListBox.ItemsPanel>
                        </ListBox>

                        <ListBox Grid.Row="1"
                                 ItemsSource="{Binding SelectedLinkGroup.Links, RelativeSource={RelativeSource TemplatedParent}}"
                                 SelectedItem="{Binding SelectedLink, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}"
                                 VerticalAlignment="Top">
                            <ListBox.ItemContainerStyle>
                                <Style TargetType="ListBoxItem">
                                    <Setter Property="FocusVisualStyle" Value="{x:Null}" />
                                    <Setter Property="FontFamily" Value="Segoe UI" />
                                    <Setter Property="Foreground" Value="{DynamicResource SubMenuText}" />
                                    <Setter Property="FontSize" Value="11"/>
                                    <Setter Property="Margin" Value="0,0,12,0" />
                                    <Setter Property="HorizontalContentAlignment" Value="Center" />
                                    <Setter Property="VerticalContentAlignment" Value="Center" />
                                    <Setter Property="Template">
                                        <Setter.Value>
                                            <ControlTemplate TargetType="ListBoxItem">
                                                <Grid DataContext="{TemplateBinding Content}"
                                                      HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                                      VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                                      SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
                                                    <TextBlock Text="{Binding DisplayName, Converter={StaticResource ToUpperConverter}}" TextAlignment="Center"/>
                                                    <TextBlock Text="{Binding DisplayName, Converter={StaticResource ToUpperConverter}}" FontWeight="Bold" Visibility="Hidden" />
                                                </Grid>
                                                
                                                <ControlTemplate.Triggers>
                                                    <Trigger Property="IsMouseOver" Value="true">
                                                        <Setter Property="Foreground" Value="{DynamicResource SubMenuTextHover}"/>
                                                    </Trigger>
                                                    <Trigger Property="IsSelected" Value="true">
                                                        <Setter Property="Foreground" Value="{DynamicResource SubMenuTextSelected}"/>
                                                        <Setter Property="FontWeight" Value="Bold" />
                                                    </Trigger>
                                                </ControlTemplate.Triggers>
                                            </ControlTemplate>
                                        </Setter.Value>
                                    </Setter>
                                </Style>
                            </ListBox.ItemContainerStyle>
                            <ListBox.ItemsPanel>
                                <ItemsPanelTemplate>
                                    <StackPanel Orientation="Horizontal" />
                                </ItemsPanelTemplate>
                            </ListBox.ItemsPanel>
                        </ListBox>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

</ResourceDictionary>
Oct 22, 2013 at 10:56 PM
Would this require me to rebuild the MUI library myself?

My current project is based on the template.
Oct 23, 2013 at 7:43 AM
liamhughes wrote:
Would this require me to rebuild the MUI library myself?

My current project is based on the template.
yes
Nov 24, 2013 at 8:13 AM
Hello,
how to recompile the MUI library myself?
I don't find ModenMenu.xaml !

(i use Visual studio express 2012)