> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Layer 操作

> Layer Action (Experimental)

# Layer Action (Experimental)

按钮可用来显示层的操作。

> [!WARNING]
>
> 层目前以实验形式提供，可能会根据早期使用者的反馈更改其行为。

## 属性

`type` - *"layer"*。指定操作的类型。

`target` - *string*。执行操作时应显示的[`layer`](https://docs.xbox.com/zh-CN/reference/system/touchadaptationkit/layout/game-streaming-touch-layer) 的名称。

## 备注

**层操作**用于允许玩家使层被显示。

如果[`button`](https://docs.xbox.com/zh-CN/reference/system/touchadaptationkit/controls/game-streaming-touch-button) 是切换按钮，则 `layer` 将显示直到 `button` 再次被按下。

## 示例

#### 具有层操作以显示 selectAbility 层的切换按钮

```JSON theme={null}
{
    "type": "button",
    "action": {
        "type": "layer",
        "target": "selectAbility"
    },
    "styles": {
        "default": {
            "faceImage": {
                "type": "icon",
                "value": "add"
            }
        }
    },
    "toggle" : true
}
```

## 另请参阅

[Touch Adaptation Kit 参考](https://docs.xbox.com/zh-CN/build/core-features/common/game-streaming/game-streaming-touch-touch-adaptation-kit-overview.md)\
[Button](https://docs.xbox.com/zh-CN/reference/system/touchadaptationkit/controls/game-streaming-touch-button.md)\
[Layer](https://docs.xbox.com/zh-CN/reference/system/touchadaptationkit/layout/game-streaming-touch-layer.md)


## Related topics

- [Layer](https://docs.xbox.com/zh-CN/reference/system/touchadaptationkit/layout/game-streaming-touch-layer.md)
- [Action](https://docs.xbox.com/zh-CN/reference/system/touchadaptationkit/types/game-streaming-touch-action.md)
- [Touch Adaptation Kit](https://docs.xbox.com/zh-CN/reference/system/touchadaptationkit/touchadaptationkit-reference.md)
- [Blank](https://docs.xbox.com/zh-CN/reference/system/touchadaptationkit/controls/game-streaming-touch-blank.md)
- [WinHTTP 概述](https://docs.xbox.com/zh-CN/build/console-features/networking/web-requests/intro-winhttp.md)
