This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# place to put click handlers | |
@Code Application.Views.MainView | |
# by default, textblocks use this style and do TextWrapping="Wrap" | |
@Default TextBlock Style="{DefaultFontStyle}" Wrap | |
# by default, Button uses this style | |
@Default Button Style="{DefaultButtonStyle}" | |
# tab indent represents child items | |
PhoneApplicationPage | |
Grid |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Scenario: | |
// Start with default WP7 Panorama application, two tabs each with listbox | |
// Added child page with panorama control, two tabs each with listbox | |
// Two ViewModels (Main and Child), each has a list of 270+ items | |
// No relationship between the ViewModels. Lazy-loaded data in-memory | |
Main - OnNavigatedTo - ApplicationCurrentMemoryUsage: 8036352 | |
Main - OnNavigatedTo - ApplicationPeakMemoryUsage: 8048640 | |
Main - Loaded - ApplicationCurrentMemoryUsage: 39870464 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Main - OnNavigatedTo - ApplicationCurrentMemoryUsage: 8036352 | |
Main - OnNavigatedTo - ApplicationPeakMemoryUsage: 8048640 | |
Main - Loaded - ApplicationCurrentMemoryUsage: 39862272 | |
Main - Loaded - ApplicationPeakMemoryUsage: 39899136 | |
Main - OnNavigatedFrom - ApplicationCurrentMemoryUsage: 51990528 | |
Main - OnNavigatedFrom - ApplicationPeakMemoryUsage: 52760576 | |
Child - OnNavigatedTo - ApplicationCurrentMemoryUsage: 51990528 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// here's the C# code we have to use | |
namespace Application | |
{ | |
public class Factory | |
{ | |
public T Get<T>(string parameter) where T : Proxy | |
{ | |
return default(T); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public ObservableCollection(IEnumerable<T> collection) | |
{ | |
this._monitor = new SimpleMonitor<T>(); | |
if (collection == null) | |
{ | |
throw new ArgumentNullException("collection"); | |
} | |
this.CopyFrom(collection); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Example of a struct implementation for passing in information about a WAVE file | |
// http://msdn.microsoft.com/en-us/library/aa446573.aspx | |
/// <summary> | |
/// This structure defines the header used to identify a waveform-audio buffer. | |
/// typedef struct | |
/// { | |
/// LPSTR lpData; | |
/// DWORD dwBufferLength; | |
/// DWORD dwBytesRecorded; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.ComponentModel.Composition; | |
using System.Windows.Threading; | |
using Caliburn.Micro; | |
namespace CaliburnMicroSample.Services | |
{ | |
[Export(typeof(ISessionService))] | |
public class SessionService : ISessionService | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static void Main(string[] args) | |
{ | |
try | |
{ | |
var factory = new TaskFactory(); | |
var task = factory.StartNew(() => { throw new Exception(); }); | |
task.Wait(); | |
} | |
catch (Exception ex) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Visual Studio 2010 SP1 | |
http://www.microsoft.com/download/en/details.aspx?id=23691 | |
Fiddler | |
http://www.getfiddler.com/dl/Fiddler2BetaSetup.exe | |
Silverlight Spy | |
http://firstfloorsoftware.com/silverlightspy/download-silverlight-spy | |
Expression Blend |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# all i wanted to do was this with what I thought was | |
# an Enumerable set of posts using Jekyll | |
{% for ps in site.posts.skip(3) %} | |
<!-- partial view --> | |
{% endfor %} | |
# but i couldn't work out what type site.posts was at runtime | |
# ( using .class didn't output anything | |
# i stumbled (literally) across this alternate syntax which works |
OlderNewer