This project is read-only.

ModernTab Image

Aug 22, 2014 at 4:58 PM
I am trying to add images in the links of my moderntab

                                    <StackPanel Orientation="Horizontal" Height="*">
                                        <Image Source="{Binding ImageSource}" Width="32" Height="32" />
                                        <TextBlock Text="{Binding DisplayName, Converter={StaticResource ToUpperConverter}}" />
private ImageSource imagesource;


public ImageSource ImageSource
            get { return this.imagesource; }
                if (this.imagesource != value)
                    this.imagesource = value;
<mui:ModernTab Layout="List" SelectedSource="Views/Movimento/ucCaixa.xaml"  FontSize="15">
                <mui:Link DisplayName="Caixa" Source="Views/Movimento/ucCaixa.xaml" ImageSource="pack://application:,,,/Images/search32px.png"  />
                <mui:Link DisplayName="Contas a pagar" Source="Views/Movimento/ucContaPagar.xaml" ImageSource="pack://application:,,,/Images/search32px.png" />
                <mui:Link DisplayName="Conta de cliente" Source="Views/Movimento/ContaCliente2/ucContaCliente.xaml" ImageSource="pack://application:,,,/Images/search32px.png" />
                <mui:Link DisplayName="Vendas" Source="Views/Movimento/Vendas/ucVendasLancamento.xaml" ImageSource="pack://application:,,,/Images/search32px.png" />
But the image does not appear.


Thank outset
I await answers
Aug 22, 2014 at 5:08 PM
Looks good to me. Couple of things to check;
  • Did you modify the ListBox template in the trigger that sets the Layout to list (<Trigger Property="Layout" Value="List">)
  • Do you reference your updated ModernTab style in your app.xaml?
Marked as answer by danilomilan on 8/22/2014 at 9:35 AM
Aug 22, 2014 at 5:24 PM
in app.xaml is as follows, I am referring only ModernUI, but the ImageSource property is already appearing to be informed, just is not showing the image
            <!-- WPF 4.0 workaround -->
            <Style TargetType="{x:Type Rectangle}" />
            <!-- end of workaround -->
                <ResourceDictionary Source="/FirstFloor.ModernUI;component/Assets/ModernUI.xaml" />
                <ResourceDictionary Source="/FirstFloor.ModernUI;component/Assets/ModernUI.Light.xaml"/>
Aug 22, 2014 at 5:34 PM
worked, sorry, but ModerTab was wrong in changing code