forked from MicrosoftDocs/windows-dev-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add page for IsBackgroundTransparent (MicrosoftDocs#3672)
* Add page for IsBackgroundTransparent * updates * add page for EnterDisplayMode * updates from review, formatting
- Loading branch information
Showing
2 changed files
with
114 additions
and
0 deletions.
There are no files selected for viewing
43 changes: 43 additions & 0 deletions
43
...rence/interface-members/iaccesskeymanagerstaticsdisplaymode-enterdisplaymode.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
--- | ||
title: IAccessKeyManagerStaticsDisplayMode.EnterDisplayMode method | ||
description: Specifies that keytips for currently valid access keys should be displayed and the access keys enabled. | ||
ms.topic: article | ||
ms.date: 07/28/2023 | ||
ms.author: jimwalk | ||
author: jwmsft | ||
ms.localizationpriority: low | ||
--- | ||
|
||
# IAccessKeyManagerStaticsDisplayMode.EnterDisplayMode(XamlRoot) method | ||
|
||
## Definition | ||
|
||
Namespace: Windows.UI.Xaml.Input | ||
|
||
Specifies that keytips for currently valid access keys should be displayed and the access keys enabled. | ||
|
||
```csharp | ||
[uuid(3e602318-59f6-5f2c-9752-bcbb9c907d45)] | ||
interface IAccessKeyManagerStaticsDisplayMode | ||
{ | ||
void EnterDisplayMode(Windows.UI.Xaml.XamlRoot xamlRoot); | ||
}; | ||
``` | ||
|
||
### Parameters | ||
|
||
**`xamlRoot`** [XamlRoot](/uwp/api/windows.ui.xaml.xamlroot) | ||
|
||
The XamlRoot for the currently focused element. Cannot be `null`. | ||
|
||
## Windows requirements | ||
|
||
<table><tr><td>Device family</td><td>Windows 11, version 22H2 (introduced in 10.0.22621.0)</td></tr></table> | ||
|
||
## Remarks | ||
|
||
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. | ||
|
||
After calling this method, the [IsDisplayModeEnabled](/uwp/api/windows.ui.xaml.input.accesskeymanager.isdisplaymodeenabled) property will be `true`. | ||
|
||
Call [ExitDisplayMode](/uwp/api/windows.ui.xaml.input.accesskeymanager.exitdisplaymode) to disable display mode. |
71 changes: 71 additions & 0 deletions
71
...-reference/interface-members/ixamlsourcetransparency-isbackgroundtransparent.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
--- | ||
title: IXamlSourceTransparency.IsBackgroundTransparent property | ||
description: Gets or sets the background transparency of all DesktopWindowXamlSource objects on the current thread. | ||
ms.topic: article | ||
ms.date: 07/28/2023 | ||
ms.author: jimwalk | ||
author: jwmsft | ||
ms.localizationpriority: low | ||
--- | ||
|
||
# IXamlSourceTransparency.IsBackgroundTransparent property | ||
|
||
## Definition | ||
|
||
Namespace: Windows.UI.Xaml | ||
|
||
Gets or sets a value that specifies whether the background of all DesktopWindowXamlSource objects on the current thread is transparent. | ||
|
||
```csharp | ||
[uuid(06636c29-5a17-458d-8ea2-2422d997a922)] | ||
interface IXamlSourceTransparency | ||
{ | ||
Boolean IsBackgroundTransparent; | ||
}; | ||
``` | ||
|
||
### Property Value | ||
|
||
[Boolean](/dotnet/api/system.boolean) | ||
|
||
`true` if the window background is transparent; otherwise, `false`. | ||
|
||
## Windows requirements | ||
|
||
<table><tr><td>Device family</td><td>Windows 10 (introduced in 10.0.17763.0)</td></tr></table> | ||
|
||
## Examples | ||
|
||
This example shows the [DesktopWindowXamlSource](/uwp/api/windows.ui.xaml.hosting.desktopwindowxamlsource) objects being configured to have a transparent background. | ||
|
||
```csharp | ||
// Make all DesktopWindowXamlSource objects on this | ||
// thread have a transparent background. | ||
var xamlSourceTransparency = (IXamlSourceTransparency)Window.Current; | ||
xamlSourceTransparency.IsBackgroundTransparent = true; | ||
``` | ||
|
||
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. | ||
|
||
```xaml | ||
<Grid ColumnDefinitions="Auto,*"> | ||
<TextBlock>Column 0 text</TextBlock> | ||
|
||
<Border Grid.Column="1" Background="White"> | ||
<TextBlock>Column 1 text</TextBlock> | ||
</Border> | ||
</Grid> | ||
``` | ||
|
||
## Remarks | ||
|
||
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. | ||
|
||
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.) | ||
|
||
Set this property to `true` to give all [DesktopWindowXamlSource](/uwp/api/windows.ui.xaml.hosting.desktopwindowxamlsource) objects on the current thread a transparent background. | ||
|
||
This interface is retrieved from a XAML [Window](/uwp/api/windows.ui.xaml.window). | ||
|
||
> [!NOTE] | ||
> 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)). |