问题标签 [gjallarhorn]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
2 回答
256 浏览

wpf - FSC:错误 FS2024:静态链接可能不使用针对不同配置文件的程序集与 oxyplot 示例和 FsXaml

我正在oxyplot使用fsxamlgjallarhorn。它在直接使用它并绑定到 DataPoint(x,y) 的输出时起作用。但是,当我从SimpleDemoFsharp尝试以下示例时:

构建失败,FSC: error FS2024: Static linking may not use assembly that targets different profile.错误似乎是由这一行引起的:myModel.Series.Add(FunctionSeries(cos, 0.0, 10.0, 0.1, "cos(x)")),如果我取消注释它,项目就会编译。我曾尝试针对较低的 .NET 版本,并创建新项目,但没有取得多大成功。有解决方法吗?从搜索看来,这可能会导致一些 PCL 配置文件问题。

该示例自行编译和工作(即没有安装其他 nuget 包,只安装了 oxyplot 和 oxyplot.wpf)。

编辑:经过进一步测试,问题似乎来自 FsXaml 和 Oxyplot 的组合。例如,当尝试通过 FsXaml 加载 MainWindow.xaml 时。

VS2015 的 fsc.exe 命令如下:

C:\Program Files (x86)\Microsoft SDKs\F#\4.0\Framework\v4.0\fsc.exe -o:obj\x64\Debug\Gjallarhorn160611.exe -g --debug:full --noframework --define :DEBUG --define:TRACE --doc:bin\Debug\Gjallarhorn160611.XML --optimize- --platform:x64 --resource:obj\x64\Debug\Gjallarhorn160611.g.resources -r:"C:\Program文件 (x86)\Reference Assemblies\Microsoft\FSharp.NETFramework\v4.0\4.4.0.0\FSharp.Core.dll" -r:"C:\Users\username\Documents\Visual Studio 2015\Projects\Gjallarhorn160611_A\packages \FsXaml.Wpf.2.1.0\lib\net45\FsXaml.Wpf.dll" -r:"C:\Users\用户名\Documents\Visual Studio 2015\Projects\Gjallarhorn160611_A\packages\FsXaml.Wpf.2.1.0\ lib\net45\FsXaml.Wpf.TypeProvider.dll" -r:"C:\Users\username\Documents\Visual Studio 2015\Projects\Gjallarhorn160611_A\packages\Gjallarhorn.Bindable.0.0。3-beta1\lib\portable-net45+netcore45+wpa81+wp8+MonoAndroid1+MonoTouch1\Gjallarhorn.Bindable.dll" -r:"C:\Users\username\Documents\Visual Studio 2015\Projects\Gjallarhorn160611_A\packages\Gjallarhorn .Bindable.Wpf.0.0.3-beta1\lib\net45\Gjallarhorn.Bindable.Wpf.dll" -r:"C:\Users\username\Documents\Visual Studio 2015\Projects\Gjallarhorn160611_A\packages\Gjallarhorn.0.0。 3-beta1\lib\portable-net45+netcore45+wpa81+wp8+MonoAndroid1+MonoTouch1\Gjallarhorn.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\ mscorlib.dll" -r:"C:\Users\username\Documents\Visual Studio 2015\Projects\Gjallarhorn160611_A\packages\OxyPlot.Core.1.0.0-unstable2100\lib\net45\OxyPlot.dll" -r:"C :\Users\用户名\Documents\Visual Studio 2015\Projects\Gjallarhorn160611_A\packages\OxyPlot.Wpf。1.0.0-unstable2100\lib\net45\OxyPlot.Wpf.dll" -r:"C:\Users\username\Documents\Visual Studio 2015\Projects\Gjallarhorn160611_A\packages\OxyPlot.Wpf.1.0.0-unstable2100\lib \net45\OxyPlot.Xps.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\PresentationCore.dll" -r:"C:\Program Files (x86 )\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\PresentationFramework.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\System.Core.dll " -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\System.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework .NETFramework\v4.5\System.Numerics.dll" -r:"C:\Users\username\Documents\Visual Studio 2015\Projects\Gjallarhorn160611_A\packages\Expression.Blend.Sdk.1.0.2\lib\net45\System.Windows.Interactivity.dll" -r:"C:\Program Files (x86 )\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\System.Xaml.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\System.Xml .dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\UIAutomationTypes.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft \Framework.NETFramework\v4.5\WindowsBase.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Collections.Concurrent.dll" - r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Collections.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.ComponentModel.Annotations.dll" -r:" C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.ComponentModel.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework. NETFramework\v4.5\Facades\System.ComponentModel.EventBasedAsync.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Diagnostics.Contracts。 dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Diagnostics.Debug.dll" -r:"C:\Program Files (x86) \Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System。Diagnostics.Tools.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Diagnostics.Tracing.dll" -r:"C:\Program文件 (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Dynamic.Runtime.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\ v4.5\Facades\System.Globalization.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.IO.dll" -r:" C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Linq.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework. NETFramework\v4.5\Facades\System.Linq.Expressions.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Linq.Parallel.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework. NETFramework\v4.5\Facades\System.Linq.Queryable.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Net.NetworkInformation。 dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Net.Primitives.dll" -r:"C:\Program Files (x86) \Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Net.Requests.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\ Facades\System.ObjectModel.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Reflection.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\ v4.5\Facades\System.Reflection.Emit.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Reflection.Emit.ILGeneration。 dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Reflection.Emit.Lightweight.dll" -r:"C:\Program Files ( x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Reflection.Extensions.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4. 5\Facades\System.Reflection.Primitives.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Resources.ResourceManager.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework. NETFramework\v4.5\Facades\System.Runtime.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Runtime.Extensions.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Runtime.InteropServices.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Runtime.InteropServices.WindowsRuntime.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\ Facades\System.Runtime.Numerics.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Runtime.Serialization.Json.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\ Framework.NETFramework\v4.5\Facades\System.Runtime.Serialization.Primitives.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System. Runtime.Serialization.Xml.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Security.Principal.dll" -r:"C: \Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.ServiceModel.Duplex.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework. NETFramework\v4.5\Facades\System.ServiceModel.Http.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.ServiceModel.NetTcp.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework. NETFramework\v4.5\Facades\System.ServiceModel.Primitives.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.ServiceModel.Security。 dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Text.Encoding.dll" -r:"C:\Program Files (x86) \Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Text.Encoding.Extensions.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4. 5\Facades\System.Text.RegularExpressions.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Threading.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\ v4.5\Facades\System.Threading.Tasks.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Threading.Tasks.Parallel。 dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Xml.ReaderWriter.dll" -r:"C:\Program Files (x86) \Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\Facades\System.Xml.XDocument.dll" -r:"C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.5\ Facades\System.Xml.XmlSerializer.dll" --target:exe --warn:3 --warnaserror:76 --vserrors --LCID:1033 --utf8output --fullpaths --flaterrors --subsystemversion:6.00 --highentropyva+ --sqmsessionguid:9587e2f2-adad-4417-931b-00c055df82f8 "C:\Users\username\AppData\Local\Temp.NETFramework,Version=v4 .5.AssemblyAttributes.fs" AssemblyInfo.fs Model.fs Context3.fs Program.fs

0 投票
1 回答
157 浏览

wpf - 使用 Gjallarhorn 处理多个命令(来自按钮)的正确方法

窗口上有几个按钮,我试图找到处理命令的好方法。

例如:

我必须执行一些操作:

将其转换为 xaml 将是:

有点玩图书馆我找到了两种方法来做到这一点而不会烦人的冗长

1. 使用Observable.merge

2. 创建泛化消息

并将行动信息提升到高层

(嗯,我喜欢第一个选项,因为这个动作不会改变模型)

做这些事情是正确的方法(第一个,很明显)还是库包含更合适的功能?

PS我寻找Observable.concat [info; stat; input; ...]但没有幸运。

0 投票
1 回答
122 浏览

wpf - 用 Gjallarhorn 显示对话窗口的好方法是什么?

关于在 MVVM 之后显示对话窗口的几种好方法存在很多问题。但我看到 Gjallarhorn 看起来不一样。

我必须显示几个对话框,例如每个对话框我有一个操作。

和几个窗户

我展示它的方式

是否适合此目的?

PS我不知道为什么,但我觉得有一个更清洁的解决方案来完成这项任务。

0 投票
1 回答
100 浏览

wpf - 命令调用的函数get调用两次

其中一个较小的项目需要功能更改......所以我决定也更新 Gjallarhorn.Bindable.Wpf 库的版本。

事实上,我只是在需要的地方添加了一个附加参数。

但是现在应用程序不能正常工作,因为命令调用的函数被调用了两次。

最小的例子如下:

...

这是图书馆的错误还是我错过了什么?