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

    Phil A Thompson
    @PhilT

    Hi all I'm trying to add the VideoManager to the template SqueakyApp but I get

    Java.Lang.RuntimeException
      Message=Can't create handler inside thread Thread[Thread-8,10,main] that has not called Looper.prepare()

    I added it a StackLayout in the children array. I figure something is trying to render in a separate thread instead of the main one but it's the first time I've looked at Fabulous and just trying to evaluate it.

    SergejDK
    @SergejDK

    @PhilT I think you need to call init in the mainactivity/appdelegate.

    First: open MediaManager
    Then in onInit : CrossMediaManager.Current.Init(this)

    After this it worked for me.

    Phil A Thompson
    @PhilT
    Thanks @SergejDK ! I'll give that a go.
    Phil A Thompson
    @PhilT
    @SergejDK It worked! I added it to the overridden OnCreate method and that seemed to do the job. Many thanks.
    I guess I'm going to need to learn a bit more about how Xamarin.Forms works but I'm not a C# developer so that will take a bit of time. This beats Flutter though. Flutter = Clutter :D
    Phil A Thompson
    @PhilT
    Me again :) I'm now trying to get LiveUpdate working. And it does on .NET 4 code but if I try using something like interpolated strings I get parse error This token is reserved for future use (referring to the $ at the beginning of the string). I have a feeling I'd need to target .NET5 which doesn't seem possible.
    Tim Forkmann
    @tforkmann
    Hi there :) I just started trying out Fabulous. Now I want to get LiveUpdate working. I'm using the FabulousContracts example with Sqlite storage. The dbPath gets pushed through the app which is great but I can't create a let program = ... declaration for the LiveUpdate. I will get the following response from the webhook: RESP FROM WEBHOOK: {"Quacked":"couldn't quack! No declaration called 'program' or 'programLiveUpdate'!"}. Any idea how to get that working?
    Timothé Larivière
    @TimLariviere

    Hi @tforkmann , to be honest LiveUpdate never moved from the PoC made by Don years ago. Mostly due to time constraints and lack of knowledge on the compiler stuff.
    I don't think I even ever managed to get it working on FabulousContacts.

    My guess in your case is that a later version of Fabulous changed the signature of program and LiveUpdate still expects an old one.
    If you still want to try out LiveUpdate, you could start with a simpler sample like CounterApp in the main repo.

    Tim Forkmann
    @tforkmann
    Ok thx for the info. So you develop without hot reloading then? Or can you use the XAML hot reloading instead?
    Timothé Larivière
    @TimLariviere
    Unfortunately Hot Reload is C#-only. MS has no plan for F# for the moment...
    So we don't really have anything right now :/
    gsomix
    @gsomix:matrix.org
    [m]
    Hey 👋
    AngelMunoz
    @tunaxor:matrix.org
    [m]
    Hey 👋!