Applies to: desktop apps only
The IUIFramework interface is implemented by the Windows Ribbon framework and defines the methods that provide the core functionality for the framework.
When to implement
Client applications do not implement this interface; custom implementations are not supported.
When to use
Client applications use this interface to instantiate and interact with the Ribbon framework. An implementation is provided by UIRibbonFramework.
Members
The IUIFramework interface inherits from the IUnknown interface. IUIFramework also has these types of members:
Methods
The IUIFramework interface has these methods.
| Method | Description |
|---|---|
| Destroy |
Terminates and releases all objects, hooks, and references for an instance of the Ribbon framework. |
| FlushPendingInvalidations |
Processes all pending Command updates. |
| GetUICommandProperty |
Retrieves a command property, value, or state. |
| GetView |
Retrieves the address of a pointer to an interface that represents a Ribbon framework View, such as IUIRibbon or IUIContextualUI. |
| Initialize |
Connects the host application to the Ribbon framework. |
| InvalidateUICommand |
Invalidates a Ribbon framework Command property, value, or state. |
| LoadUI |
Loads the Ribbon framework UI resource, or compiled markup, file. |
| SetModes |
Specifies the application modes to enable. |
| SetUICommandProperty |
Sets a command property, value, or state. |
Remarks
This interface is used to initialize and dismantle the Ribbon framework.
Ribbon framework UI functionality is differentiated by Views, which are essentially built-in core controls, such as the Ribbon and ContextPopup.
To get an interface pointer to the implementation of IUIFramework, use CoCreateInstance to create a COM object with the class identifier (CLSID) of CLSID_UIRibbonFramework.
Requirements
|
Minimum supported client | Windows 7, Windows Vista with SP2 and Platform Update for Windows Vista |
|---|---|
|
Minimum supported server | Windows Server 2008 R2, Windows Server 2008 with SP2 and Platform Update for Windows Server 2008 |
|
Header |
|
|
IDL |
|
|
DLL |
|
See also
Send comments about this topic to Microsoft
Build date: 2/15/2012
// Windows Ribbon Application interface
[ComImport]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[Guid("F4F0385D-6872-43a8-AD09-4C339CB3F5C5")]
public interface IUIFramework
{
// Connects the framework and the application
[PreserveSig]
HRESULT Initialize(IntPtr frameWnd, IUIApplication application);
// Releases all framework objects
[PreserveSig]
HRESULT Destroy();
// Loads and instantiates the views and commands specified in markup
[PreserveSig]
HRESULT LoadUI(IntPtr instance, [MarshalAs(UnmanagedType.LPWStr)] string resourceName);
// Retrieves a pointer to a view object
[PreserveSig]
HRESULT GetView(UInt32 viewId, Guid riid,
[Out(), MarshalAs(UnmanagedType.Interface)] out object ppv);
// Retrieves the current value of a property
[PreserveSig]
HRESULT GetUICommandProperty(UInt32 commandId, [In] ref PropertyKey key, out PropVariant value);
// Immediately sets the value of a property
[PreserveSig]
HRESULT SetUICommandProperty(UInt32 commandId, [In] ref PropertyKey key, [In] ref PropVariant value);
// Asks the framework to retrieve the new value of a property at the next update cycle
[PreserveSig]
HRESULT InvalidateUICommand(UInt32 commandId, UI_Invalidations flags, [In] ref PropertyKey key);
// Flush all the pending UI command updates
[PreserveSig]
HRESULT FlushPendingInvalidations();
// Asks the framework to switch to the list of modes specified and adjust visibility of controls accordingly
[PreserveSig]
HRESULT SetModes(Int32 iModes);
}