Question

I'm trying to get an image to float unstreched in the middle of my TabControl. I started with the below XAML which stretches the image.

<TabControl>
    <TabControl.Background>
        <ImageBrush  ImageSource="/LogoTest;component/logo_final.png" />            
    </TabControl.Background>
</TabControl>

I've tried various approaches like using a VisualBrush with a Grid inside it but I can't get the desired result.

Is there a simple way of doing this that I'm missing?

Was it helpful?

Solution

<ImageBrush 
    ImageSource="/LogoTest;component/logo_final.png" 
    AlignmentX="Center" AlignmentY="Center" 
    Stretch="None"/>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top