He tries to create TypeProvider for Xamarin.Forms, but he suffers from error FS2024.
- Parse your own library from XAML Xamarin.Forms
- Assign x: Name to Propertis
`F #
type MainPage = Moonmile.XamarinFormsTypeProvider.XAML<"MainPage.xaml">
type MainPageEx(target:MainPage) =
let mutable count = 0
do
target.btn1.Clicked.Add( fun e ->
count <- count + 1
target.btn1.Text <- "Clicked " + count.ToString())
member this.CurrentPage
with get() = target.CurrentPage
When you reference a property, assembly, and operation, you can fine. But the inner class is Xamarin.Forms, for example Button.Clicked. If you are trying to access it, this is a build error.
Sample code for the error
https://github.com/moonmile/SimpleEventTypeProvider
Generating Code for XamarinFormsTypeProvider github.com/moonmile/XamarinFormsTypeProvider
Perhaps I suspect inconsistencies and occur in part of the generation of Native TypeProvider and Xamrin.Forms.Core PCL.
F# Compiler for F# 3.1 (Open Source Edition)
Freely distributed under the Apache 2.0 Open Source License my error!!!
isMscorlib: true
name: "System.Runtime"
PrimaryAssembly.DotNetCore.Name: "System.Runtime"
PrimaryAssembly.Mscorlib.Name: "mscorlib"
parameter error FS2024: Static linking may not use assembly that targets different profile.
, , , , MVVM.
Butt Button.Clicked events
, , .
?
XAML WPF, .
github.com/fsprojects/FsXaml