PageRenderTime 37ms CodeModel.GetById 16ms RepoModel.GetById 0ms app.codeStats 0ms

/V4/MVVM RI/MVVM.Client.Tests/TestObjects/TestViewWithContext.xaml.cs

#
C# | 35 lines | 17 code | 2 blank | 16 comment | 0 complexity | cb0b470bdc52d5302b0f38744793a777 MD5 | raw file
  1. //===================================================================================
  2. // Microsoft patterns & practices
  3. // Composite Application Guidance for Windows Presentation Foundation and Silverlight
  4. //===================================================================================
  5. // Copyright (c) Microsoft Corporation. All rights reserved.
  6. // THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY
  7. // OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT
  8. // LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
  9. // FITNESS FOR A PARTICULAR PURPOSE.
  10. //===================================================================================
  11. // The example companies, organizations, products, domain names,
  12. // e-mail addresses, logos, people, places, and events depicted
  13. // herein are fictitious. No association with any real company,
  14. // organization, product, domain name, email address, logo, person,
  15. // places, or events is intended or should be inferred.
  16. //===================================================================================
  17. using System.ComponentModel.Composition;
  18. using System.Windows.Controls;
  19. using MVVM.Client.Infrastructure;
  20. namespace MVVM.Client.Tests.TestObjects
  21. {
  22. [ExportView("TestViewWithContext")]
  23. [PartCreationPolicy(CreationPolicy.NonShared)]
  24. public partial class TestViewWithContext : UserControl
  25. {
  26. public TestViewWithContext()
  27. {
  28. InitializeComponent();
  29. }
  30. [Import]
  31. public TestViewModelWithContext ViewModel { set { this.DataContext = value; } }
  32. }
  33. }