F# Tools for working with XAML Projects.
Questions tagged [fsxaml]
21 questions
7
votes
1 answer
Can FsXaml be used in an F# interpreted script?
I just converted one of the FsXaml demo programs to an interpreted F# script so I could experiment with it and learn. It wouldn't run, and the interpreter gave me the following error message:
System.NotSupportedException: The invoked member is not…

Bob McCrory
- 183
- 1
- 3
6
votes
2 answers
Advantage of FsXaml type provider over XamlReader
F# doesn't support partial classes nor precompilation of XAML files. The workaround: instead of compile-time code behind, load graphical object definitions at runtime. There are various ways to supply XamlReader with the content of a referenced…

kaefer
- 5,491
- 1
- 15
- 20
5
votes
1 answer
How to keep button enabled while performing asynchronous task
In my xaml I have a Button and a TextBlock
and in my ViewModel I have following Code
let aText = self.Factory.Backing(<@…
user6283344
5
votes
1 answer
FsXaml.Wpf.TypeProvider cannot be loaded
I'm trying to use WPF with F#. I've created a project using the F# Empty Windows App template (in fact, I've created several using different settings). Then I added the FSharp.ViewModule and FsXaml.Wpf references. It works fine when the project only…

DenisV
- 279
- 1
- 8
4
votes
0 answers
Memory usage by SpeechSynthesizer
I have writtten an application using SpeechSynthesizer which reads out text of a TextBox. In my ViewModel I have created a Single instance of that class and overridden Finalize method for disposal. When I paste some text in the TextBox and keep…
user6283344
3
votes
1 answer
Updating ProgressBar.Value in FsXaml and ElmishWPF
I am trying to update ProgressBar.Value in FsXaml. In C#, I used the below-mentioned code. I haven't tried to implement the C# approach in F# as using a public field (myCaller) does not seem to me as being a functional approach (let alone the fact…

Miroslav Husťák
- 203
- 1
- 10
3
votes
1 answer
Difference between an F# function name and a function value pointed at that name
I'm using the following code snippet in a WPF / FsXaml application:
let groupSelected(e: SelectionChangedEventArgs) =
e.AddedItems
|> Seq.cast
|> Seq.head
|> SelectedGroupChanged
let GroupSelected = groupSelected
When I…

Wallace Kelly
- 15,565
- 8
- 50
- 71
3
votes
1 answer
Can I use FsXaml with .NET 4.0?
FsXaml seems to be available only for projects targeting at least .NET 4.5.
It there a way to use it while targeting .NET 4.0?
If so how can I achieve this?

oli
- 682
- 1
- 12
- 21
3
votes
1 answer
Bind to TextChanged event for TextBox in F# WPF MVVM application
I'd like to bind to a WPF TextBox in an MVVM F# application built using FsXaml and FSharp.ViewModule. I added a command called "SetA" to the application described here, and attempted to bind to it with the following XAML:

Brian Berns
- 15,499
- 2
- 30
- 40
3
votes
1 answer
Referencing event from .xaml file in .fs file
I want to declare an event in a XAML file and then add a handler in a fs file.
The upper part of the XAML file would be something like (MouseRightButtonDown):

Funk
- 10,976
- 1
- 17
- 33
2
votes
1 answer
How to use Crystal Report in FsXaml
I have added Report.rpt and a Report.fs file by right clicking on project in Solution Explorer. In Report.fs I have declared two Type Report() and CachedReport(), which in C# are generated automatically, and added F# code in it by looking at a .cs…
user6283344
2
votes
1 answer
Adding WindowsFormsHost throws XamlParseException
I was trying to add a Line Chart using FSharp.Charting in MainWindow. In MainViewModel I have -
let chart = Chart.Line [ for i in 0 .. 10 -> (i, i * i) ]
let control = new ChartControl(chart)
member self.LineChart = control
and in xaml…
user6283344
2
votes
1 answer
How to use FsXaml's CommandDependecy/(ies)
Here is what I have done using FsXaml
type MainViewModel() as self =
inherit ViewModelBase()
let listOfData = self.Factory.Backing(<@self.ListOfData@>, 0 :> obj)
let selectedId = self.Factory.Backing(<@self.SelectedId@>, 0)
member…
user6283344
2
votes
2 answers
FSC: error FS2024: Static linking may not use assembly that targets different profile with oxyplot example and FsXaml
I'm using oxyplot with fsxaml and gjallarhorn. It works when using it directly and binding to output from DataPoint(x,y). However when I try the following example from SimpleDemoFsharp:
type MainViewModel() =
let myModel = PlotModel()
do
…

s952163
- 6,276
- 4
- 23
- 47
1
vote
2 answers
Progress bar with async in FsXaml application
In my F# (FsXaml/Code Behind) application, I would like to use a progress bar without the utilisation of a background worker as I do in C#. Based on an article on the internet (the link is here), I tried to use asynchronous workflows.
I created code…

Miroslav Husťák
- 203
- 1
- 10