My Silverlight application does not show changes

This is my first time with SL (but not WPF). I learn PRISM by watching great MTaulty videos: http://channel9.msdn.com/blogs/mtaulty/prism--silverlight-part-1-taking-sketched-code-towards-unity

It is still so good that I am with the last video and I am doing the same thing as in my VS. I am using SL4 and mvc2 web pages and a prism for sl4.

I found a problem and I do not know what is going on.

My SL application itself does not show any changes. I have a basic shell:

<Grid x:Name="LayoutRoot" Background="Azure">
    <Grid.RowDefinitions>
        <RowDefinition />
        <RowDefinition />
    </Grid.RowDefinitions>
    <Grid.ColumnDefinitions>
        <ColumnDefinition Width="*" />
        <ColumnDefinition Width="2*" />
    </Grid.ColumnDefinitions>
    <ctls:GridSplitter Grid.RowSpan="2" HorizontalAlignment="Right"
                       VerticalAlignment="Stretch" Width="2"
                       Background="Black" />
    <ctls:GridSplitter Grid.Column="1"
                       HorizontalAlignment="Stretch" VerticalAlignment="Bottom"
                       Height="2" Background="Black" />

    <Border Background="SkyBlue" CornerRadius="3"
            Margin="5" Grid.RowSpan="2">
        <ContentControl rgn:RegionManager.RegionName="FolderSelectionRegion"
                        HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
                        HorizontalContentAlignment="Stretch" VerticalContentAlignment="Stretch" />
    </Border>
    <Border
        Background="SkyBlue"
        CornerRadius="3"
        Margin="5"
        Grid.Column="1">
        <ContentControl
            rgn:RegionManager.RegionName="MailSelectionRegion"
            HorizontalAlignment="Stretch"
            VerticalAlignment="Stretch"
            HorizontalContentAlignment="Stretch"
            VerticalContentAlignment="Stretch" />
    </Border>
</Grid>

The fact is that I registered the View in the first regionManager, excellent, I registered the second view, but it does not show ... Well, some kind of error somewhere ... but no.

, regionManager , . , ( ), . , Application_Startup, , ( , , , ).

, , 3 , ... , .xap ClientBin... , . , .

?

.

: ...

, Silverlight , ( ) ... .

, , , , ASP.NET MVC.

Im, , , , ASP.NET MVC SL.

EmailClient ( ) : www.foxandxss.net/stuff/EmailClient.rar

. , Shell.xaml LayoutRoot Azure, , ( , , ). , . App.xaml.cs , ( ), . , , .

xap MVC .

, SL "View in browser", (Azure BG , boostrapper), MVC, .

+3
2

XAP. , xap ( ):

<div id="silverlightControlHost">
    <object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="100%">
      <param name="source" value="ClientBin/EmailClient.xap?20110712160700"/>
      <param name="onError" value="onSilverlightError" />
      <param name="background" value="white" />
      <param name="minRuntimeVersion" value="4.0.50826.0" />
      <param name="autoUpgrade" value="true" />
      <a href="http://go.microsoft.com/fwlink/?LinkID=149156&v=4.0.50826.0" style="text-decoration:none">
          <img src="http://go.microsoft.com/fwlink/?LinkId=161376" alt="Get Microsoft Silverlight" style="border-style:none"/>
      </a>
    </object><iframe id="_sl_historyFrame" style="visibility:hidden;height:0px;width:0px;border:0px"></iframe></div>

, xap.

+3

, Silverlight ,

<div id="silverlightControlHost">
    <object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="100%">
      <%
          const string orgSourceValue = @"ClientBin/SilverlightApp.xap";
          string param;
          if (System.Diagnostics.Debugger.IsAttached)
              param = "<param name=\"source\" value=\"" + orgSourceValue + "\" />";
          else
          {
              string xappath = HttpContext.Current.Server.MapPath(@"") + @"\" + orgSourceValue;
              DateTime xapCreationDate = System.IO.File.GetLastWriteTime(xappath);
              param = "<param name=\"source\" value=\"" + orgSourceValue + "?ignore=" + xapCreationDate.ToString("yyyy-MM-dd_HH-mm-ss") + "\" />";
          }
          Response.Write(param);
      %>
      <param name="onError" value="onSilverlightError" />
      <param name="background" value="white" />
      <param name="minRuntimeVersion" value="4.0.50401.0" />
      <param name="autoUpgrade" value="true" />
      <a href="http://go.microsoft.com/fwlink/?LinkID=149156&v=4.0.50401.0" style="text-decoration:none">
          <img src="http://go.microsoft.com/fwlink/?LinkId=161376" alt="Get Microsoft Silverlight" style="border-style:none"/>
      </a>
    </object><iframe id="_sl_historyFrame" style="visibility:hidden;height:0px;width:0px;border:0px"></iframe></div>
+2

Source: https://habr.com/ru/post/1771553/


All Articles