0

I made a Silverlight project like this:

<UserControl x:Class="silverlighttest3.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d" Height="270" Width="487">

<Grid x:Name="LayoutRoot" Background="blue" Height="270" Width="487" HorizontalAlignment="Stretch">
    <MultiScaleImage HorizontalAlignment="Left" Margin="146,27,0,0" Name="multiScaleImage1" VerticalAlignment="Top" Source="Source/dzc_output.xml"/>
</Grid>

and after that I tested it and it worked just fine.

The problem is when testing the web Application that hosted the Silverlight project, when trying the 'testsilverlight.aspx' there is nothing shown.

Note: the source folder is in the Silverlight directory and not in the web application directory. and when copied it to web application directory the result is same - a white page.

ChrisF
  • 134,786
  • 31
  • 255
  • 325
AboKevo
  • 115
  • 2
  • 2
  • 12

1 Answers1

0

I found a link that might help you: Source attribute of Silverlight MultiScaleImage

Also, I'm not sure how your project structure is set up but make sure that the build action on your xml file is set to Content and that its being included inside your xap file after its built in the same relative folder structure.

Community
  • 1
  • 1
KodeKreachor
  • 8,852
  • 10
  • 47
  • 64
  • The code on the [MSDN Page](http://msdn.microsoft.com/en-us/library/system.windows.controls.multiscaleimage(v=vs.95).aspx) indicates that the forward slash at the beginning isn't needed. Plus if it was just this there'd be a blue border visible - the background of the grid is set. – ChrisF Mar 03 '12 at 22:34
  • Right, but depending on how your project is set up and where you intend to reference your content files from the format of your uri does matter, here's a link that has some good info on this topic: http://forums.silverlight.net/p/160173/364401.aspx. Anyway, I thought of another pain point I've encountered before when my Silverlight apps weren't reflecting the expected behavior, please see my edit above. – KodeKreachor Mar 03 '12 at 23:06