Skip to content

Commit 4a570d7

Browse files
committed
Brushes too
1 parent 3019f23 commit 4a570d7

1 file changed

Lines changed: 1 addition & 22 deletions

File tree

hub/apps/develop/platform/xaml/brushes.md

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -212,25 +212,4 @@ For [**ImageBrush**](/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.Media.
212212

213213
[**ImageSource**](/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.media.imagebrush.imagesourceproperty) requires a [**BitmapImage**](/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.Media.Imaging.BitmapImage) (not a URI) when you define an [**ImageBrush**](/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.Media.ImageBrush) using code. If your source is a stream , use the [**SetSourceAsync**](/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.media.imaging.bitmapsource.setsourceasync) method to initialize the value. If your source is a URI, which includes content in your app that uses the **ms-appx** or **ms-resource** schemes, use the [**BitmapImage**](/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.media.imaging.bitmapimage) constructor that takes a URI. You might also consider handling the [**ImageOpened**](/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.media.imagebrush.imageopened) event if there are any timing issues with retrieving or decoding the image source, where you might need alternate content to display until the image source is available.
214214

215-
For code examples, see [**ImageBrush**](/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.Media.ImageBrush) and [**XamlCompositionBrushBase**](/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.media.xamlcompositionbrushbase).
216-
217-
## UWP and WinUI for UWP
218-
219-
[!INCLUDE [uwp-winui2-note](../../../../includes/uwp-winui-2-note.md)]
220-
221-
Brush APIs exist in the [Windows.UI.Xaml.Controls](/uwp/api/Windows.UI.Xaml.media) and [Windows.UI.Xaml.Controls](/uwp/api/windows.ui.xaml.controls) namespaces.
222-
223-
> [!div class="checklist"]
224-
>
225-
> - **Platform APIs:** [Brush class](/uwp/api/windows.ui.xaml.media.brush)
226-
> - [Open the WinUI for UWP Gallery app and see RadialGradientBrush in action](winui2gallery:/item/RadialGradientBrush). [!INCLUDE [winui-2-gallery](../../../../includes/winui-2-gallery.md)]
227-
228-
We recommend using the latest [WinUI for UWP](/windows/uwp/get-started/winui2/) to get the most current styles, templates, and features for all controls.
229-
230-
### WebViewBrush (UWP only)
231-
232-
A [**WebViewBrush**](/uwp/api/windows.ui.xaml.controls.webviewbrush) is a special type of brush that can access the content normally viewed in a [**WebView**](/uwp/api/windows.ui.xaml.controls.webview) control. Instead of rendering the content in the rectangular **WebView** control area, **WebViewBrush** paints that content onto another element that has a [**Brush**](/uwp/api/windows.ui.xaml.Media.Brush)-type property for a render surface. **WebViewBrush** isn't appropriate for every brush scenario, but is useful for transitions of a **WebView**. For more info, see [**WebViewBrush**](/uwp/api/windows.ui.xaml.controls.webviewbrush).
233-
234-
If you create a [**WebViewBrush**](/uwp/api/windows.ui.xaml.controls.webviewbrush) in code, use the default constructor and then call other APIs before you attempt to use that brush for a UI property. You might need to call [**Redraw**](/uwp/api/windows.ui.xaml.controls.webviewbrush.redraw) if you've recently reset the [**SourceName**](/uwp/api/windows.ui.xaml.controls.webviewbrush.sourcename) property or if the content of the [**WebView**](/uwp/api/windows.ui.xaml.controls.webview) is also being changed with code.
235-
236-
For code examples, see [**WebViewBrush**](/uwp/api/windows.ui.xaml.controls.webviewbrush).
215+
For code examples, see [**ImageBrush**](/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.Media.ImageBrush) and [**XamlCompositionBrushBase**](/windows/windows-app-sdk/api/winrt/microsoft.ui.xaml.media.xamlcompositionbrushbase).

0 commit comments

Comments
 (0)