Getting Started : Chapter 7 MFC and WPF Interoperability : WPF Window Layouts
WPF Window Layouts
WPF is a .NET graphical subsystem of Microsoft .NET that includes a rich set of tools for designing user interfaces, supporting an application architecture that separates user interface code from implementation, or business logic, code. This design is made possible by an XML-based markup language called XAML (Extensible Application Markup Language) that declaratively represents the user interface. FoundationEx .NET adds the following child window and docking window layouts: Canvas, Dock Panel, Grid, Stack Panel, Wrap Panel, and XAML.
Canvas
The Canvas View Layout supports exact placement of WPF controls on a WPF canvas. Canvases can be nested inside each other in order to provide a higher degree of precision when placing controls.
Canvas View Class To create a Canvas View Class, derive from the SFLWPFCanvasViewEx class. See the sample file <InstallDir>\Samples\FoundationEx .NET\WPFMDIEx\WPFMDIExCanvasView.h for an example.
Canvas Access To access the Canvas control, call GetWpfCanvas().
Dock Panel
The Dock Panel View Layout supports placement of WPF controls in a panel that can be docked to the top, bottom, left, or right of the MFC window.
Dock Panel View Class To create a Dock Panel View Class, derive from the SFLWPFDockPanelViewEx class. See the sample file <InstallDir>\Samples\FoundationEx .NET\WPFMDIEx\WPFMDIExDockPanelView.h for an example.
Dock Panel Access To access the Dock Panel control, call GetWpfDockPanel().
Grid
The Grid View Layout supports placement of WPF controls in a grid, allowing exact specification of the row and column of the control.
Grid View Class To create a Grid View Class, derive from the SFLWPFGridViewEx class. See the sample file <InstallDir>\Samples\FoundationEx .NET\WPFMDIEx\WPFMDIExGridView.h for an example.
Grid Access To access the Grid control, call GetWpfGrid().
Stack Panel
The Stack Panel View supports placement of controls stacked on top of each other either vertically or horizontally.
Stack Panel Class To create a Stack Panel View Class, derive from the SFLWPFStackPanelViewEx class. See the sample file <InstallDir>\Samples\FoundationEx .NET\WPFMDIEx\WPFMDIExStackPanelView.h for an example.
Stack Panel Access To access the Stack Panel control, call GetWpfStackPanel().
Wrap Panel
The Wrap Panel View supports placement of controls in the container such that the controls can be wrapped horizontally or vertically as the container is resized.
Wrap Panel Class To create a Wrap Panel View Class, derive from the SFLWPFWrapPanelViewEx class. See the sample file <InstallDir>\Samples\FoundationEx .NET\WPFMDIEx\WPFMDIExWrapPanelView.h for an example.
Wrap Panel Access To access the Wrap Panel control, call GetWpfWrapPanel().