Step 6. Displaying a Users Window
When you create a new MM .NET WPF application, a UsersWindow is automatically added to the project for you. This is an application-level window derived from mmBusinessWindow that you can modify to your hearts content! To get its basic functionality working, follow these steps:
- Open the UsersWindow.xaml.cs/vb in Visual Studio and add a reference to your business object project's namespace
- Next, uncomment the following lines of code:
In C#:
//protected User User; //protected Role Role;
//this.User = (User)this.RegisterPrimaryBizObj(new User()); //this.Role = (Role)this.RegisterBizObj(new Role()); //this.User.RegisterChildBizObj(this.Role);
And in VB .NET:
'Protected User As User 'Protected Role As Role
'Me.User = CType(Me.RegisterPrimaryBizObj(New User()), User) 'Me.Role = CType(Me.RegisterBizObj(New Role()), Role) 'Me.User.RegisterChildBizObj(Me.Role)
- Next, uncomment the code in the following methods:
- Window_Loaded
- mvrRoles_RefreshLists
- mvrRoles_AddItem
- mvrRoles_DeleteItem
- mvrRoles_Delete
- Window_Loaded
- Open your WPF project in Expression Blend
- In the Project panel, double-click UserWindow.xaml to open it in the design surface.
- In the Objects and Timeline panel, select the Window element:

- Go to the Properties panel, and under the Common Properties section, click the DataContext property's New button:

- This launches the Select Object dialog. Expand the node containing the namespace of your business objects, select the UserEntity class and click OK:

- Save changes to the window
© (c) 2026 Oak Leaf Enterprises, Inc., 1996-2026 • Updated: 06/28/12
Comment or report problem with topic
