Welcome to WindowsClient.net | My Blog | Sign in | Join

Rob Relyea - XAMLified

WPF, Silverlight and XAML

Syndication

Sponsors





  • advertise here
XamlPadSample Step 1c-Project

Today I started to teach the XamlDocument class how to find the project that a XAML file is associated with. The technique is somewhat crude right now.

[overview of project: XamlPadSample page –today’s source snapshot: 2010-01-22 Source Snapshot]

 

I look in the XAML file’s directory for a *.*proj file, then I look in the parent directory, etc…  The first project file I find is it!

I don’t currently confirm that the project file contains a reference to the XAML file.

This is the first step to being able to find the app.xaml so we can make these things work:

  • {StaticResource someResourceInTheAppResources}
  • loading assemblies so custom components/etc… work

Coding fun still happening. Little bit each day.

Detailed changes for step 1c

XamlPadHelpers project
•XamlDocument.cs
◦Added ProjectFileName property and logic to find the associated project file. This is a step towards
  supporting resources from app.xaml and loading assemblies.
•XamlEngine.cs
◦Cleaned up implementation of swapping a proxy in for a type that is specified in XAML, but that we should avoid creating (like Window/Page/Application).
◦Moved to use xamlReader.Skip() and alreadyRead bool.  (don't like where we ended up with Skip()!..shouldn't need alreadyRead #fail).
◦Added comment about why we wrap exceptions and add line info.
•XamlPadConfig.cs
◦Cleaned up my code via feedback from Steve for how a XamlDocumentViewModel gets its parent pointer to the XamlPadConfig. (Thanks Steve!)
•XamlPad.xaml.cs
◦Added creation of Dictionary<XamlType, XamlType> proxyLookup table to this code. This uses the "cleaned up implementation" I mentioned above.

XamlPadSample project
•MainWindow.xaml.cs
◦Misc clean up.
•Backlog.txt
◦Created a file to list some known issues and change log.

Published Friday, January 22, 2010 8:59 AM by Rob_Relyea

Comments

# Dew Drop &#8211; January 23, 2010 | Alvin Ashcraft&#039;s Morning Dew@ Saturday, January 23, 2010 9:59 AM

Pingback from  Dew Drop &#8211; January 23, 2010 | Alvin Ashcraft&#039;s Morning Dew

# Enlaces Interesantes WPF/Silverlight 24-01-2010@ Sunday, January 24, 2010 1:24 AM

Os dejo una peque&ntilde;a colecci&oacute;n How can I sort data virtualized items in WPF? (Bea Stollnitz

Leave a Comment

(required) 
(required) 
(optional)
(required)