let buttonView = View.External exampleButton View.ContentPage( content = View.StackLayout(padding = Thickness 20.0, verticalOptions = LayoutOptions.Center, children = [ buttonView ])
Fabulous.XamarinForms.View.Buttonworks with no problem. Any help will be welcome. Thank you
@marianogenovese Localization works the same way than you would in XF/other .NET programs.
The RESX file should generate a designer.cs file with all the keys you declared, like this : https://github.com/xamarin/xamarin-forms-samples/blob/master/UsingResxLocalization/UsingResxLocalization/UsingResxLocalization/Resx/AppResources.Designer.cs
Then it's rather simple to use in Fabulous
View.Button( text = AppResources.AddButton )
It will rely on
Thread.CurrentUICulture to determine which language you're using.
@marianogenovese Hmm, based on the wiki, seems like it's its own kind of page. So if you write all the wrappers for the types you need (PopupPage, animations, etc.), you should be good.
Might need to re-expose the virtual event methods in case you need it (OnBackgroundClicked, etc.) if the library does not offer proper events since Fabulous only works with events.
We did that for one of XF controls : https://github.com/fsprojects/Fabulous/blob/984ead5d9bd200f3de143adbcfba2ee79992b285/Fabulous.XamarinForms/src/Fabulous.XamarinForms.Core/CustomControls.fs#L166-L180
Other than that, I don't think you'll need to do anything special to make it work with MVU.
@Pipsy100 Are you using https://github.com/TimLariviere/Fabulous.WPF?
Not sure what is happening but Fabulous.WPF is a proof of concept not updated to work with Fabulous 1.0+
Maybe if you try to update it to use Fabulous 1.1.0, it will work?
Hi @mallibone. To workaround this problem, I added a
Tag property to all ViewElement so you can attach any value you want, and retrieve it later.
There's an example of that in the Fabimals sample.
Set the value : https://github.com/fsprojects/Fabulous/blob/ebcecbfcfcc598c9e8651b22f02652d2796f6ae6/Fabulous.XamarinForms/samples/Shell/Fabimals/Fabimals/Components/Templates.fs#L13
Retrieve the value on CollectionView.SelectionChanged: https://github.com/fsprojects/Fabulous/blob/ebcecbfcfcc598c9e8651b22f02652d2796f6ae6/Fabulous.XamarinForms/samples/Shell/Fabimals/Fabimals/Components/AnimalListPage.fs#L43
Hello :wave: -
I am trying to use XCT tabviews, and I wanted to generate the code associated with it.
Instead of writing the code manually (which I have tried but I am having a runtime exception when using it), I wanted to have it code generated from a json mapping file (thinking it would be better for maintainability). I am trying to use Fabulous.CodeGen nuget for that, but I am a bit unsure of how to use it.
Is there a sample somewhere showing how to use it that nuget package ?
Thank you :)