Share via


AppBarToggleButton.IsInOverflow Property

Definition

Gets a value that indicates whether this item is in the overflow menu.

public:
 property bool IsInOverflow { bool get(); };
bool IsInOverflow();
public bool IsInOverflow { get; }
var boolean = appBarToggleButton.isInOverflow;
Public ReadOnly Property IsInOverflow As Boolean

Property Value

Boolean

bool

true if this item is in the overflow menu; otherwise, false.

Implements

Remarks

For more info and guidelines, see the Command bar article.

Starting in Windows 10, version 1607, CommandBar introduces a dynamic overflow feature. By default, PrimaryCommands automatically move in or out of the overflow area as the command bar width changes, for example, when users resize their app window. You can set the IsDynamicOverflowEnabled property to false to disable this behavior.

Dynamic overflow affects only the UI presentation of the commands, it doesn’t move commands from the PrimaryCommands collection to SecondaryCommands.

Version compatibility

The IsInOverflow property is not available prior to Windows 10, version 1607. If your app’s 'minimum platform version' setting in Microsoft Visual Studio is less than the 'introduced version' shown in the Requirements block later in this page, you must design and test your app to account for this. For more info, see Version adaptive code.

Note

Dynamic overflow is available when your app is compiled for Windows 10, version 1607 and running on version 1607 (or later). Dynamic overflow is not available when your app is compiled for a previous version or is running on a previous version.

To avoid exceptions when your app runs on previous versions of Windows 10, do not use this property without first performing a runtime check. This example shows how to use the ApiInformation class to check for the presence of this property before you use it.

if (ApiInformation.IsPropertyPresent("Windows.UI.Xaml.Controls.AppBarToggleButton", "IsInOverflow"))
{
    bool overflow = appBarToggleButton1.IsInOverflow;
}

Applies to