Select to view content in your preferred language

Glass template - SL 5.0; ESRI API 3.x, no XAML preview.

858
1
10-29-2012 02:07 PM
Ravichandran_M_Kaushika
Regular Contributor
dear Readers,

thank you for taking the time to read through is issue:

Main problem:  I had a working edit application (explicit save) developed using Minimal template style that was available from VS 2010 project - the team wanted to change the background to glass template and i am having a hard time to merge the style from working code minimal style to nice looking glass style.

to understand how to effectively i wanted to open the designer and inspect each of the items;  this is what i get.

System.MissingMethodException
Method not found: 'System.String System.Environment.UnsafeGetFolderPath(SpecialFolder)'.
   at System.Windows.Application.CleanInBrowserAppDataCache()
   at System.Windows.Application.Application_Exited(Object sender, EventArgs e)
   at MS.Internal.CoreInvokeHandler.InvokeEventHandler(UInt32 typeIndex, Delegate handlerDelegate, Object sender, Object args)
   at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String eventName, UInt32 flags)
Microsoft.Windows.Design.Platform.InvalidDesignerUpdateException
An unhandled exception was encountered while trying to render the current silverlight project on the design surface. To diagnose this failure, please try to run the project in a regular browser using the silverlight developer runtime.

I get this error with an option to reload the designer and i get the same error back.

http://forums.arcgis.com/threads/49707-quot-Glass-Template-quot-not-opening-properly.?highlight=glas... - looked at it - did all the unlock magic etc and nothing changed.


So to accomplisgh my task: i tried the other route of modifying the working edit working app code built using default minimal style of vs 2010.   Minimal template that comes out of vs 2010 does not have a replacable  MyStyles.xaml and all style related information is present in app.xaml.   When i tried to merge styles .xaml I had to move my style code from app.xaml to MinimalStyle.xaml and included it as a resource in App.XAML.

with difficulty, i moved the minimal styles.xaml to a separate file and called in app.xaml = the app works as it was before.  when i tried to replace it with GlassStyles.xaml, it is throwing unable to find name/key XAML parser errors.  they fail at value being assigned to a staticresource in setter.

<Style x:Name="titleTextStyle" TargetType="TextBlock">
        <Setter Property="Foreground" Value="{StaticResource MediumHighlightBrush}" />
    <Setters..../>
......
</Style>

.....
.....
<SolidColorBrush x:Key="MediumHighlightBrush" Color="#FF022A47" />

how is that the downloadable glass project does not complain (it is a website with no default.aspx - only a default.html) does not complain not being able to locate a key whereas web application project complains.

if the templates for vs 2010 have the abiility to swamp templates, it would have been easy.

Microsoft.Windows.Design.Platform.InvalidDesignerUpdateException
An unhandled exception was encountered while trying to render the current silverlight project on the design surface. To diagnose this failure, please try to run the project in a regular browser using the silverlight developer runtime.
any ideas would be of great help.

regards
ravi.
0 Kudos
1 Reply
DominiqueBroux
Esri Frequent Contributor
To avoid these issues, I would recommend to start with a fresh glass Template (you can get it in the visualstudio gallery. Search for 'ESRI').

Compile it and check that the design surface is working well. Then you'll be able to add your application files.
0 Kudos