Search

xaml error by Stephenm21

Active

1
0
Sign in
to vote
Type: Bug
ID: 774009
Opened: 12/11/2012 2:50:00 AM
Access Restriction: Public
0
Workaround(s)
0
User(s) can reproduce this bug
App doesn't show logo, failed to create windows.ui.xaml.media.imagesource from the text '\Assets\logo.png'
Which is weird, because the xaml seems to be fine
Details (expand)

Visual Studio/Team Foundation Server/.NET Framework Tooling Version

.NET Framework 4.5

Steps to reproduce

    <Grid Background="{StaticResource ApplicationPageBackgroundThemeBrush}">
        <ListView x:Name="ListView_Movies" HorizontalAlignment="Left" Height="626" Margin="0,105,0,0" VerticalAlignment="Top" Width="1326">
            <ListView.ItemTemplate>
                <DataTemplate>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="auto" />
                        </Grid.ColumnDefinitions>
                        <Border Height="110" Width="110">
                            <Image Source="\Assets\Logo.png" />
                        </Border>
                        <StackPanel Grid.Column="1">
                        <TextBlock x:Name="TextBlock_text" Text="1" Width="250">
                        </TextBlock>
                     </StackPanel>
                    </Grid>
                </DataTemplate>
            </ListView.ItemTemplate>
        </ListView>
        <TextBlock x:Name="TextBlock_header" HorizontalAlignment="Left" Margin="10,10,0,0" TextWrapping="Wrap" Text="Top Movies" VerticalAlignment="Top" Height="65" Width="546" FontSize="60"/>
    </Grid>

Product Language

English

Operating System

Windows 8

Operating System Language

English

Actual results

error

Expected results

display .png and textblock in stackpanel
File Attachments
0 attachments
Sign in to post a comment.
Posted by Microsoft on 12/21/2012 at 1:57 PM
Thanks for reaching out to us. In this case, your image URI uses backslashes (the '\' character). In XAML, that acts as an escape character to modify how other characters are interpreted. Change your XAML to use a forward slash (the '/' character) and it should work.

Hope that helps!
--Dante Gagne [MSFT]
Posted by Microsoft on 12/11/2012 at 11:21 PM
Thank you for submitting feedback on Visual Studio and .NET Framework. Your issue has been routed to the appropriate VS development team for investigation. We will contact you if we require any additional information.
Posted by Microsoft on 12/11/2012 at 3:50 AM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)
Sign in to post a workaround.