Search
UnitType Enumeration
See Also
Collapse All Expand All Language Filter: All Language Filter: Multiple Language Filter: None Language Filter: C# Language Filter: Visual Basic Language Filter: Java Language Filter: JavaScript Language Filter: C++ Language Filter: XAML
C#
Visual Basic
Java
JavaScript
C++
XAML
Introduction
General Information
What's New In This Release
Version History
Getting Started
Code Completion With VSDoc IntelliSense
Programming Interface Overview
Tutorials
Reference
MindFusion.Common
Control Class
DateFormats Class
DateSettings Class
EventDispatcher Class
IdGenerator Class
Locale Class
NotifyCollectionChangedAction Class
NotifyCollectionChangedEventArgs Class
NotifyCollectionChangingEventArgs Class
PropertyEventArgs Class
UIControl Class
Unit Class
UnitType Enumeration
MindFusion.Common.Collections
MindFusion.Controls
MindFusion.Scheduling
Licensing
Online Resources
Technical Support
MindFusion Products

Specifies a unit of measurement.

Namespace: MindFusion.Common
Assembly: Unit.js

## Syntax

JavaScript Copy Code
// enum UnitType = {}

## Members

| Member name | Description
--- | --- | ---
| Percent | The measurement is a percentage relative to the parent element.
| Pixel | The measurement is in pixels.

## Example

The following code checks the type of the minWidth of a Window.

JavaScript Copy Code
if(window.minWidth.type === ui.UnitType.Percent ) { window.minWidth = ui.Unit.percent(50); }

## See Also

MindFusion.Common Namespace