WPF: Setting up the Languages Window
The LanguageWindow is automatically added to your project when you create a new MM .NET WPF application. Follow these steps to enable this window.
- In Visual Studio, expand the LanguageWindow.xaml node, then double-click the associated code file to open it in the code editor
- At the top of the source code file, add a reference to the Language business object's namespace
For example:
using Acme.OrderSystem.BusinessEF;
- Uncomment the declaration of the LanguageController class-level variable:
/// <summary> /// Language business object /// </summary> protected Language LanguageController;
- In the window's constructor, uncomment the code that instantiates the business object controller. For example:
// Instantiate and register business objects this.LanguageController = (Language)this.RegisterPrimaryBizObj(new Language());
- In the Window_Loaded event handler, uncomment the code that gets all Language entities and stores them in the window's DataContext as well as the code that hides the DataGrid's New Item placeholder. For example:
// Get the user entities this.DataContext = this.LanguageController.GetAllEntities();
And:
// Hide the new item row place holder in the DataGrid ((IEditableCollectionView)CollectionViewSource.GetDefaultView(this.DataContext)).NewItemPlaceholderPosition = NewItemPlaceholderPosition.None;
© (c) 2026 Oak Leaf Enterprises, Inc., 1996-2026 • Updated: 05/18/11
Comment or report problem with topic
