Skip to content

Commit ca88de3

Browse files
authored
Add page for IsBackgroundTransparent (#3672)
* Add page for IsBackgroundTransparent * updates * add page for EnterDisplayMode * updates from review, formatting
1 parent c552212 commit ca88de3

File tree

2 files changed

+114
-0
lines changed

2 files changed

+114
-0
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
---
2+
title: IAccessKeyManagerStaticsDisplayMode.EnterDisplayMode method
3+
description: Specifies that keytips for currently valid access keys should be displayed and the access keys enabled.
4+
ms.topic: article
5+
ms.date: 07/28/2023
6+
ms.author: jimwalk
7+
author: jwmsft
8+
ms.localizationpriority: low
9+
---
10+
11+
# IAccessKeyManagerStaticsDisplayMode.EnterDisplayMode(XamlRoot) method
12+
13+
## Definition
14+
15+
Namespace: Windows.UI.Xaml.Input
16+
17+
Specifies that keytips for currently valid access keys should be displayed and the access keys enabled.
18+
19+
```csharp
20+
[uuid(3e602318-59f6-5f2c-9752-bcbb9c907d45)]
21+
interface IAccessKeyManagerStaticsDisplayMode
22+
{
23+
void EnterDisplayMode(Windows.UI.Xaml.XamlRoot xamlRoot);
24+
};
25+
```
26+
27+
### Parameters
28+
29+
**`xamlRoot`** [XamlRoot](/uwp/api/windows.ui.xaml.xamlroot)
30+
31+
The XamlRoot for the currently focused element. Cannot be `null`.
32+
33+
## Windows requirements
34+
35+
<table><tr><td>Device family</td><td>Windows 11, version 22H2 (introduced in 10.0.22621.0)</td></tr></table>
36+
37+
## Remarks
38+
39+
Calling this method has no effect if the scope is already in display mode. If another scope is in display mode, it will be exited.
40+
41+
After calling this method, the [IsDisplayModeEnabled](/uwp/api/windows.ui.xaml.input.accesskeymanager.isdisplaymodeenabled) property will be `true`.
42+
43+
Call [ExitDisplayMode](/uwp/api/windows.ui.xaml.input.accesskeymanager.exitdisplaymode) to disable display mode.
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
---
2+
title: IXamlSourceTransparency.IsBackgroundTransparent property
3+
description: Gets or sets the background transparency of all DesktopWindowXamlSource objects on the current thread.
4+
ms.topic: article
5+
ms.date: 07/28/2023
6+
ms.author: jimwalk
7+
author: jwmsft
8+
ms.localizationpriority: low
9+
---
10+
11+
# IXamlSourceTransparency.IsBackgroundTransparent property
12+
13+
## Definition
14+
15+
Namespace: Windows.UI.Xaml
16+
17+
Gets or sets a value that specifies whether the background of all DesktopWindowXamlSource objects on the current thread is transparent.
18+
19+
```csharp
20+
[uuid(06636c29-5a17-458d-8ea2-2422d997a922)]
21+
interface IXamlSourceTransparency
22+
{
23+
Boolean IsBackgroundTransparent;
24+
};
25+
```
26+
27+
### Property Value
28+
29+
[Boolean](/dotnet/api/system.boolean)
30+
31+
`true` if the window background is transparent; otherwise, `false`.
32+
33+
## Windows requirements
34+
35+
<table><tr><td>Device family</td><td>Windows 10 (introduced in 10.0.17763.0)</td></tr></table>
36+
37+
## Examples
38+
39+
This example shows the [DesktopWindowXamlSource](/uwp/api/windows.ui.xaml.hosting.desktopwindowxamlsource) objects being configured to have a transparent background.
40+
41+
```csharp
42+
// Make all DesktopWindowXamlSource objects on this
43+
// thread have a transparent background.
44+
var xamlSourceTransparency = (IXamlSourceTransparency)Window.Current;
45+
xamlSourceTransparency.IsBackgroundTransparent = true;
46+
```
47+
48+
With `IsBackgroundTransparent` set to `true`, if the following is set as the content of an island, the first column will show the content of the host but the second column will be white.
49+
50+
```xaml
51+
<Grid ColumnDefinitions="Auto,*">
52+
<TextBlock>Column 0 text</TextBlock>
53+
54+
<Border Grid.Column="1" Background="White">
55+
<TextBlock>Column 1 text</TextBlock>
56+
</Border>
57+
</Grid>
58+
```
59+
60+
## Remarks
61+
62+
The [DesktopWindowXamlSource](/uwp/api/windows.ui.xaml.hosting.desktopwindowxamlsource) class is used to host Xaml in another app. For example, you can use this to host some Xaml content in a WPF or WinForms app. See [Host WinRT XAML controls in desktop apps (XAML Islands)](/windows/apps/desktop/modernize/xaml-islands) for more info.
63+
64+
By default, the XAML content has an opaque background, meaning that it's not possible to have any of the host content behind the XAML show through. (In WinUI3, this behavior is changed; the XAML always has a transparent background.)
65+
66+
Set this property to `true` to give all [DesktopWindowXamlSource](/uwp/api/windows.ui.xaml.hosting.desktopwindowxamlsource) objects on the current thread a transparent background.
67+
68+
This interface is retrieved from a XAML [Window](/uwp/api/windows.ui.xaml.window).
69+
70+
> [!NOTE]
71+
> Setting this property to `true` in a XAML UWP app will cause a XAML [Window](/uwp/api/Windows.UI.Xaml.Window) to be transparent as well when it's in full screen mode (when you've called [ApplicationView.TryEnterFullScreenMode](/uwp/api/Windows.UI.ViewManagement.ApplicationView.TryEnterFullScreenMode)).

0 commit comments

Comments
 (0)