- android - RelativeLayout 背景可绘制重叠内容
- android - 如何链接 cpufeatures lib 以获取 native android 库?
- java - OnItemClickListener 不起作用,但 OnLongItemClickListener 在自定义 ListView 中起作用
- java - Android 文件转字符串
我有一个 Outlook 插件 (VSTO),在 Outlook 窗体区域我有一个 ElementHost 中的 WPF 用户控件。我有一个问题,我的用户控件中的文本框没有撤消功能......在某些配置中。特别是在 Windows 7/Outlook 2007 中,撤消(即 Ctrl-Z)不起作用,即使剪切/复制等都可以。有趣的是,Windows 8/Outlook 2010 撤消确实有效。
TextBox XAML 是:
<TextBox
Name="txtnote"
VerticalScrollBarVisibility="Auto"
SpellCheck.IsEnabled="True"
Text="Topic notes..."
TextWrapping="Wrap"
AcceptsReturn="True" />
注意:我已尝试设置以下属性以使其工作但无济于事:IsUndoEnabled="True"UndoLimit="-1"
谁能告诉我为什么会这样,我可以做些什么来让它按预期工作?
2014 年 1 月 7 日更新。我已将以下 KeyBindings 添加到文本框:
<TextBox.InputBindings>
<KeyBinding Command="ApplicationCommands.Undo" Key="Z" Modifiers="Control" />
<KeyBinding Command="ApplicationCommands.Redo" Key="Y" Modifiers="Control" />
<KeyBinding Command="ApplicationCommands.Undo" Key="G" Modifiers="Alt" />
</TextBox.InputBindings>
结果是 - Cntl-Z/Cntrl-Y 仍然无效,但是 Alt-G 有效!
最佳答案
不允许插件处理核心 Excel 快捷方式。可能正因为如此,快捷方式不起作用。
关于c# - 当托管在 VSTO/Outlook 加载项中的 ElementHost 中时,WPF 文本框不允许撤消,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20657350/
我正在使用非 WPF 应用程序,因此我只能创建 WPF 用户控件。我解决这个问题的方法是将我的窗口创建为用户控件,然后我创建了一个通用的 winform 来托管 wpf 用户控件(使用 Element
我在 WinForms 容器中托管 WPF UserControl。现在,我希望能够为 UserControl 设置主题/外观。为此,我有几个定义“皮肤”的资源词典。当我的应用程序启动时,我创建了一个
是否可以从 WPF 用户控件(即 ElementHost 的子级)显示模态窗口,并将模态窗口的所有者/父级设置为包含表单控件? 我猜你不能这样做,因为 Owner 属性采用 Window 的一个实例,
我有一个小的 WPF 控件,它有一个 TextBlock,TextWrapping 设置为 Wrap。我试图在现有的 WinForms 应用程序中托管它。我将 ElementHost 停靠在表单顶部,
我正在 WinForms 应用程序一侧构建一组 WPF 控件,以便最终可以将整个项目转换为 WPF。我正在使用 WinForms ElementHost 模块并在其中设置我的 WPF 控件。 这是我的
我有一个 Form(winform),它包含 Elementhost。在运行时,我将我的 WPF 用户控件托管到此 elementhost。我对 elementhost 使用了 AutoSize =
我对这个 ElementHost 有很多问题。有人可以看看我有什么,让我知道发生了什么或为什么没有显示吗?一切似乎都正常,只是我看不到 ElementHost 在屏幕上显示/刷新(用户控件)。 测试.
我需要在 Winform 用户控件上托管 WPF 控件。为此,我使用了 ElementHost 控件。当我运行 Ants Memory profiler 时,我知道 ElementHost 控件中存在
我在 ElementHost 内的 Winforms 项目中有一个 WPF 控件(ICSharpCode.AvalonEdit.TextEditor)。 我已经通过调试器确认 TextEditor 实
我试图在 WinForms 应用程序中使用 WPF 文本框,同时将与 WPF 相关的详细信息完全封装在另一个程序集中,但窗体编辑器并没有使它变得简单。 也就是说,Child 访问器总是被分配给一个新的
我正在编写一个程序来在 C# 中实现 COM 组件。该组件也提供了一个 UI 组件。为了便于实现组件的 future 添加,我决定使用 WPF 在 Xaml 中编写 UI,并将其包装在 Element
我有一个 WinForms 控件,里面有一个 TableLayoutPanel,它包含多个 ElementHosts,每个 ElementHost 都包含一个 WPF 控件。 一切正常,除非控件的大小
我有 UserControl,它位于 ElementHost 中. 它包含 DataGrid当用户按下回车键或双击该行时,将显示新窗口(无模式),并且当该窗口关闭时,带有 ElementHost 的窗
我使用 WPF 互操作性在 WinForms 表单中托管 WPF 用户控件。 除了丑陋的文本渲染外,一切正常: -- 这是 WPF 窗口上的简单标签: WPF Window htt
我有一个 Windows 窗体应用程序,它有一个包含 WPF 用户控件的 ElementHost... 在我的 WPF 中,我有一个非常简单的 ListView:
对于生产应用程序,我们希望在 Windows 窗体应用程序的 ElementHost 内显示 DatePicker,但我们遇到了 SelectedDate 和 CurrentDate 不可读的问题,因
我有一个 winforms 应用程序,我想向其添加 WPF 用户控件。问题是当我运行程序时,WPF 用户控件不响应鼠标事件。我可以在控件中切换并使用键盘就好了,但是控件不响应鼠标点击(当您将鼠标悬停在
长期潜伏者和自学 OOP 和 c# 的大部分人都感谢这里的伟人。我 99% 的问题似乎都是通过全网搜索找到的,但我仍然被这个问题困住了。 我的问题是我有一个自定义 GUI,我在其中堆叠托管 WPF 用
我在个人库中使用 WPF 用户控件。这些库包含在我的 WPF 和 WindowsForms 程序中。现在我的 UserControl 必须显示一个新的 (WPF) 窗口。在新窗口中,我想设置所有者。我
[更新,见底部!] 我们托管 WPF 的 WinForms 应用程序中存在内存泄漏 FlowDocumentReader在 ElementHost .我在一个简单的项目中重新创建了这个问题并添加了下面
我是一名优秀的程序员,十分优秀!