Table of Contents
- Getting Started
- EO.Pdf
- EO.Web
- EO.WebBrowser
- EO.Wpf
- Overview
- Installation & Deployement
- Skin & Theme
- Common Taskes and Services
- EO.Wpf Buttons
- EO.Wpf Calendar & DatePicker
- EO.Wpf ComboBox
- EO.Wpf DockView
- EO.Wpf Gauge
- EO.Wpf ListBox
- EO.Wpf Menu
- EO.Wpf MaskedEdit
- EO.Wpf ProgressBar
- EO.Wpf Slider
- EO.Wpf SpinEdit
- EO.Wpf SplitView
- EO.Wpf TabControl
- EO.Wpf TreeView
- EO.Wpf Utility Controls
- EO.Wpf WindowChrome
- Sample Data Objects
- Common Topics
- Reference
Using WindowChrome in Code |
This section covers the following topic:
Turnning WindowChrome On or Off
By default a WindowChrome is enabled. To disable the WindowChrome, set the WindowChrome's EnableChrome to False:
//Turn off WindowChrome WindowChrome1.EnableChrome = false;
When a WindowChrome is disabled, it does nothing to change the Window's behavior so the Window would behave as if the WindowChrome control does not exist.
Dynamically Creating a Chromed Window
Use the static CreateChromedWindow method to dynamically create a chromed window in code:
//Dynamically create a chromed window Window window = WindowChrome.CreateChromedWindow(); //Cast the window's Content into a WindowChrome object WindowChrome chrome = (WindowChrome)window.Content; //Set the WindowChrome's Content property. This is //your window content chrome.Content = ....
The newly created Window object's Content property is a WindowChrome object. You must cast it to a WindowChrome object, then set the WindowChrome's Content property to add contents to the window.
Chromized an Existing Window
Use the static Chromize method to "chromize" an existing window.
//Chromize an existing window
WindowChrome chrome = WindowChrome.Chromize(window);