Disappearing image

Asked

Viewed 83 times

1

I have 3 buttons with images that I position in the upper right corner of the screen. If I maximize the screen for only one monitor the images appear correctly, but when I maximize for two monitors the first image becomes a dash and the third disappears.

I did the test by placing the second image for the three buttons and there it works perfectly. Below is an excerpt of the XAML code and the image configuration.

Import.png: 512x512, size 81.4 KB.

Chart.png: 128x128, size: 187 KB.

Config.png: 512x512, size 236 KB.

<Grid.ColumnDefinitions>
    <ColumnDefinition Width="0"/>
    <ColumnDefinition Width="*"/>
    <ColumnDefinition Width="0"/>
    <ColumnDefinition Width="auto"/>
    <ColumnDefinition Width="5"/>
    <ColumnDefinition Width="auto"/>
    <ColumnDefinition Width="5"/>
    <ColumnDefinition Width="auto"/>
    <ColumnDefinition Width="0"/>
</Grid.ColumnDefinitions>

<Grid.RowDefinitions>
    <RowDefinition Height="0"/>
    <RowDefinition Height="auto"/>
    <RowDefinition Height="0"/>
    <RowDefinition Height="auto"/>
    <RowDefinition Height="0"/>
    <RowDefinition Height="auto"/>
    <RowDefinition Height="0"/>
</Grid.RowDefinitions>

<Button 
    x:Name="btnAtualizar" 
    Height="25" 
    Width="25" 
    Grid.Column="3"
    Grid.Row="1"
    Click="btnAtualizar_Click"
    Visibility="Visible"
    >

    <Button.Template>
        <ControlTemplate>
            <Image Source="../Images/Import.png"/
        </ControlTemplate>
    </Button.Template>
</Button>

<Button 
    x:Name="btnGrafico" 
    Height="25" 
    Width="25" 
    Grid.Column="5"
    Grid.Row="1"
    Click="btnGrafico_Click"
    Visibility="Visible"
    >

    <Button.Template>
        <ControlTemplate>
            <Image Source="../Images/Chart.png"/
        </ControlTemplate>
    </Button.Template>
</Button>

<Button 
    x:Name="btnGerenciar" 
    Height="25" 
    Width="25"
    Grid.Column="7"
    Grid.Row="1"
    Click="btnGerenciar_Click"
    Visibility="Visible"
    >

    <Button.Template>
        <ControlTemplate>
            <Image Source="../Images/Config.png"/
        </ControlTemplate>
    </Button.Template>
</Button>

inserir a descrição da imagem aquiinserir a descrição da imagem aquiinserir a descrição da imagem aqui

I put as a response that replaces the images with other icons and so it worked, I do not know if the resolution of the images has anything to do, because the problem was in the two 512x512, but the people below voted to remove the answer. That is, they prefer other people to be without the hint of what I did, besides not helping at all, except for rLinhares who at least started an attempt.

Bacco, Renan, Dvdsamm, Ismael, Sorack, rLinhares

  • I don’t get it...

  • @Rovannlinhalis insert images.

  • 1

    @Denis Perhaps we were wrong not to understand that this was in fact an answer. As it was "removed", we can no longer visualize it. Sorry.

  • I would like to know the pq of now have been marked as out of scope by ramaral and bfavaretto. Because it cannot be reproduced?

1 answer

0


The problem is in the images, I changed the icons and is working normally now.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.