![]() ![]() To accomplish this, we use a special property, called d:DataContext. But it is preferable to have DataContext with an appropriate type assigned to EmployeePanelView in design time. Thus, EmployeePanelView does not need to have its own DataContext in runtime. This user control does not have the DataContext property set in XAML, because in runtime it is a part of EmployeeCollectionView, and its DataContext is bound to the selected entity. Create the following layout using Toolbox, Property Grid and standard designer functionality, or copy-paste the following XAML into the created file. Change its BaseLayoutItem.ItemWidth property to 0.5:Ĭreate a user control that will show the detail collection of the assigned task for the selected employee.Īdd a new UserControl to the Views/Employee folder and name it EmployeeTasksView. Select Panel1 and set its BaseLayoutItem.ShowCaption and ShowBorder properties to false. The following configuration of DockingPanels will be generated.ĭelete Panel2, select Panel1 and paste the GridControl (that was cut previously) into it using the Ctrl+V key combination or designer context menu. You can enable or disable the Instant Layout Assistant via the DEVEXPRESS | WPF Controls v 22.1 category in the Visual Studio menu.Ĭlick the Docking item in the Instant Layout Assistant and choose the Simple Layout item. Clicking one of these controls generates its corresponding code. The Instant Layout Assistant will appear over the appropriate area in the designer and will suggest controls that can be used in that area. ![]() Select the GridControl and cut it from the design surface using the Ctrl+X key combination or designer context menu. ![]() In this step, you will place a control that shows tasks assigned to the selected employee to a separate UserControl. In the previous lesson, you displayed the detail collection using the SlideView control. Step 2 - Displaying a Collection of Tasks Assigned to the Employee The result is shown in the screenshot below. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |