Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Timothé Larivière
    @TimLariviere
    @thautwarm Fabulous is built on Xamarin.Forms so it shares the same requirements for the various platform sdks.
    Xamarin.Forms supports Android 4.4 and higher, so 8.1 should be good.
    You also have to differentiate the Minimum Android Version and the Target Android Version. Minimum is the lowest version your app can run on, Target is the Android SDK you will use to build your app (it defines what features you will have access to).
    So you can build an app using the latest Android SDK and get it to run on old devices (min Android 4.4 as per XF requirements).
    Taine Zhao
    @thautwarm
    It works. Thanks a lot for developing such a useful package.
    vrescobar
    @vrescobar
    hi people
    I need some help, I am trying to wrap an external component from the syncfusion Library in my view, the component is there but it is not displaying. I searched all the docs and looked to all the available samples but for me it is not clear why it is not showing or how to properly wrap an external component/view in my fabulous app
    at the moment I use a very simple and trivial example with no success:
    let buttonView = View.External exampleButton
    View.ContentPage(
              content = View.StackLayout(padding = Thickness 20.0, verticalOptions = LayoutOptions.Center,
                children = [ buttonView ])
    with other Fabulous controls such as Fabulous.XamarinForms.View.Button works with no problem. Any help will be welcome. Thank you
    Timothé Larivière
    @TimLariviere
    Hi @vrescobar. When using 3rd party controls, you can take a look at the documentation to write extensions: https://fsprojects.github.io/Fabulous/Fabulous.XamarinForms/views-extending.html
    You can find an example showing how to use PancakeView with Fabulous: https://github.com/fsprojects/Fabulous/blob/master/Fabulous.XamarinForms/samples/FabulousWeather/FabulousWeather/PancakeViewExtensions.fs
    vrescobar
    @vrescobar
    thanks, I will take a look in the afternoon and check it
    vrescobar
    @vrescobar
    I tried with not much success to use the wrapping type... this time does not even display an empty object, also no hints with the command line tools or any obvious error
    but what I see as well is that there is some kind of generator
    Just for the record, here is the page of the project (I still have to figure out how to use it)
    https://github.com/fsprojects/Fabulous/blob/master/Fabulous.CodeGen/README.md
    Christian Parpart
    @christianparpart
    FYI: there is a solidity language survey, in case you are having 3 minutes spare: https://docs.google.com/forms/d/e/1FAIpQLSdcTPsWxuXmyG74t_zUI4pYQk1Y7mFcz03Owg4wJqrvRh7SsA/viewform
    Timothé Larivière
    @TimLariviere
    @vrescobar Could you maybe share the wrapper you wrote so I can guide you?
    Not sure about Syncfusion, but 3rd party control libs use some kind of licence keys required to be set up before being able to use the controls.
    So maybe it's linked to that?
    Fabulous.CodeGen will only automate the creation of F# code based on a JSON file.
    Mariano
    @marianogenovese
    Hi @christianparpart do you solve listview selecteditem issue? I am having the same bug
    David Dancy
    @programmation
    Hi all I'm experimenting with Fabulous & trying to implement a design where there's a custom tab button in the (bottom) tab bar. I wondered if I could fake it using a ControlTemplate to present the TabbedPage, with the custom button in the template, but I can't figure out how to make a ControlTemplate in F#/Fabulous. Does Fabulous support ControlTemplates?
    James Murphy
    @recumbent
    Possibly too vague a question, but do we have strong feelings about how one should do Validation of a data entry form?
    Broadly much of this is straightforward given MVU in that one can check each time a field changes and update the model state accordingly (for the field and for the model as a whole) but should I be looking at capabilities in Forms or just inventing everything for myself?
    Christian Parpart
    @christianparpart
    @marianogenovese hey. No. I didn't. Wanna resume. But I had an extended visit to the hospital and it'll take a while to recover (no it's not all Corona :-)
    Sorry for being so straight on my answer :)
    Mariano
    @marianogenovese
    @christianparpart i hope you get well soon, i think i can create an issue for you with this bug report
    btw, anyone have some experience with localization in fabulous/f# with resx?
    Timothé Larivière
    @TimLariviere

    @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.

    Mariano
    @marianogenovese
    Thanks @TimLariviere using PublicResXFileCodeGenerator in a fabulous project works in the same way as c# project?
    Timothé Larivière
    @TimLariviere
    @marianogenovese Yes, should be. It will generate C# code, but you can consume it from F#.
    Mariano
    @marianogenovese
    great i will test it
    Mariano
    @marianogenovese
    i have another question about modals popups, i want to use this lib https://github.com/rotorgames/Rg.Plugins.Popup in my app, but i dont know how this type of ui fit into mvu pattern because it do not has functional or mvu style
    Timothé Larivière
    @TimLariviere

    @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.

    Mariano
    @marianogenovese
    @TimLariviere i see, i need to write wrappers around PopupPage and treat it like another ContentPage. Thanks!
    gsomix
    @gsomix:matrix.org
    [m]
    Hi. 👋
    marlinla
    @marlinla
    Rider + WPF live update 🤔
    I could not get live update working with VS2019 in admin either.
    Learning to rewrite a legacy winforms app.
    Ross Donaldson
    @Gastove
    Hullo! I'm interested in learning about Fabulous, but the docs site appears to be down? https://fsprojects.github.io/Fabulous/ just 404s for me. Is that still the correct URL?
    Timothé Larivière
    @TimLariviere
    @Gastove Hi. Yes, I renamed the branch from master to main. I think I need to do something to fix it...
    In the meantime, you can find the documentation here: https://github.com/fsprojects/Fabulous/tree/v1.0/docs
    Ross Donaldson
    @Gastove
    :+1:
    gsomix
    @gsomix:matrix.org
    [m]
    v1.0.0! 🥳
    gsomix
    @gsomix:matrix.org
    [m]
    @TimLariviere: are MVU components planned for next release?
    Adelar da Silva Queiróz
    @adelarsq

    v1.0.0! 🥳

    So good news! Thanks for everyone that have turned this possible!

    Red-Krow
    @Red-Krow
    Hello everyone. Congratulations for v 1.0!
    I posted a thread recenty in the F# Reddit community about styling elements based on their state. For example, applying a different style to an element when it's disabled, or when it's focused. Sometimes your app is in charge of the logic and you can just set the styles programatically, but in other cases, like in the focused or hover states, it is not.
    One clever user thought about adding a visual state manager group on the Created method of the styled view. And that works indeed (well, not for hover styles, but I guess there is no other way than platform specific code).
    Someone mentioned this gitter and I thought I could go and ask the experts: is that the intended way to do things, or is there something more idiomatic?
    Pipsy100
    @Pipsy100
    Hello, I have installed the templates and I am running into this error: Severity Code Description Project File Line Suppression State
    Error NU1108 Cycle detected.
    Fabulous.WPF -> Fabulous -> Fabulous.XamarinForms 1.1.0 -> Fabulous (>= 1.0.0 && < 2.0.0). Fabulous.WPF C:\Projects\Fabulous\Fabulous.WPF\Fabulous.WPF.fsproj 1
    Does anyone know the solution for this error?
    Timothé Larivière
    @TimLariviere

    @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?

    Fabulous itself has no dependency on Fabulous.XamarinForms
    https://www.nuget.org/packages/Fabulous/
    @gsomix:matrix.org Yes, it's planned for Fabulous v2 (along with MAUI & .NET 6)
    Mark Allibone
    @mallibone
    Hello 👋 - I have been wondering if there is a sample of how to handle a selection using the CollectionView(and it's sibling CarouselView)? I have seen there is a callback one can override but it delivers the ViewElement? Since the data in the model is usually not a view element... I was wondering if there is a different approach that is less of a chore to find the corresponding element? In ListView one get's the index, which is easy to map but I could not find the equivalent on the CollectionView... Thanks in advance for any hints and pointers 🙂
    Timothé Larivière
    @TimLariviere

    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

    Mark Allibone
    @mallibone
    Thank you @TimLariviere will check them out and see if I can dump that good old ListView in my code with the more performant CollectionView 🙂
    Fahd Abdeljallal
    @Lleutch

    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 :)