c# - 如何将按钮放在 WebView 之上

标签 c# xaml layout windows-8 windows-runtime

<分区>

我是 C# 初学者,我使用 C#/XAML 开发 Windows 8 应用程序。 我想在 WebView 的右上角放置一个关闭 Button 但我无法完成它。

有人知道怎么做吗?

最佳答案

如果你的目标是 Windows 8,你不能在 WebView 之上放置任何东西,因为它的呈现是原生的并且独立于布局的其余部分:

http://blogs.msdn.com/b/wsdevsol/archive/2012/10/18/nine-things-you-need-to-know-about-webview.aspx#AN2

根据 msdn这应该在 Windows 8.1 中得到修复:

Windows 8.1 introduces changes to the WebView control that fix several issues and add new functionality, including:

•Support for displaying XAML content (for example, an AppBar) on top of a WebView control. This fixes the "airspace problem" in Windows 8 that required you to render WebView content using a WebViewBrush if you wanted to overlay XAML content.

•Support for using RenderTransform to translate, scale, skew, and rotate a WebView control.

•Support for using the Opacity property with the WebView control.

关于c# - 如何将按钮放在 WebView 之上,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19833956/

相关文章:

c# - DialogResult.Ok 就像自定义类

javascript - 使用提交按钮的 JQuery DataTable 内联编辑 - 后返回 405(方法不允许)

c# - 从 OleDbDataAdapter 填充数据集

html - 仅为页面的一半生成正文框

android - 奇数ListView

c# - 尝试返回 json 并填充选择列表

c# - 具有分布式宽度的元素的布局控制

windows - Xaml + Directx Fullscene Windows 10 移动版

xaml - 如何删除 ListView GroupStyle 标题分隔线?

css - 为什么我的 flex-box 元素 "float"在我将它们的元素设置为彼此堆叠( block )时彼此相邻?