NavigationPane Image size

Navigation for WPF Forum

Posted 16 years ago by Krijn Michiels

When I create a simple Wpf Window with a NavigationBar/NavigationPane the navigationpane stretches the small ImageSource.

Example :

<Window x:Class="Window2"
        <navigation:NavigationPane x:Name="mailPane" 
                                   ImageSourceSmall="/Resources/Small/Picture16.png" >
                <TextBlock Text="Variant size:" />
                <TextBlock Text="{Binding ElementName=mailPane, Path=VariantSize}"
                           FontWeight="SemiBold" />

The current variantSize is 'Large'. This explains the image sizing behavior, but where does this VariantSize come from ? How can I change this ? Does it come from the current Theme ?


Comments (1)

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

You don't want to change variant size. That is just indicating the variant currently in use by the pane's button. Each pane requires both a 32x32 image in ImageSourceLarge and a 16x16 image in ImageSourceSmall if you want things to look right.

If you only want to use the small image, then you could create a blank 32x32 image, paste your small image in the middle of it and use the resulting image as your "large" image and your original image as the "small" image.

But things will look better if you have a truly "large" variant of your image that is closer to 32x32.

Actipro Software Support

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.