我正在尝试使用加载 ESRI 的 ArcEngine 的 WindowsFormsHost 安装 C# WPF。
MSI 安装程序出现此错误:
Unable to install. The app requires assembly ESRI.ArcGIS.Framework Version
10.0.0.0 to be installed in the GAC first
Run Code Online (Sandbox Code Playgroud)
我已经安装了 ESRI ArcEngine Runtime 10,它应该可以处理这类事情,但我想它并不完美。
在目标计算机上,文件 Framework.dll 位于文件夹: 中 C:\Program Files\ArcGIS\DeveloperKit10.0\DotNet,但不在 中c:\windows\assembly。
我右键单击程序集,然后单击“注册”进行注册,但这并没有解决我的问题。
为什么WPF有x:名称和名称XAML?与x有什么关系:名字?
我有这个代码可以通过编程方式按下按钮,但我希望有一个版本适用于ToggleButton.
public static void PushButton(Button b)
{
ButtonAutomationPeer peer = new ButtonAutomationPeer(b);
System.Windows.Automation.Provider.IInvokeProvider invokeProv = peer.GetPattern(PatternInterface.Invoke) as System.Windows.Automation.Provider.IInvokeProvider;
invokeProv.Invoke();
}
Run Code Online (Sandbox Code Playgroud)
所以我尝试了ToggleButtonAutomationPeer ......
public static void PushButton(ToggleButton b)
{
ToggleButtonAutomationPeer peer = new ToggleButtonAutomationPeer(b);
System.Windows.Automation.Provider.IInvokeProvider invokeProv = peer.GetPattern(PatternInterface.Invoke) as System.Windows.Automation.Provider.IInvokeProvider;
//But invokeProv is null. Peer is ok.
}
Run Code Online (Sandbox Code Playgroud) 我有时可以分配null到int?但不是里面? :,为什么呢?
例
int? a; // good
int? b; // good
a = null; // why is this allowed?
b = (a != null) ? 1 : null /* and this not allowed? */;
b = (a != null) ? 1 : (int?)null /* this is a fix */;
Run Code Online (Sandbox Code Playgroud) <table>
<tr>
<td>A</td>
<td>B</td>
</tr>
</table>
Run Code Online (Sandbox Code Playgroud)
I think I can replace my td's with div tags, but not sure how.