FreshMvvm | FreshMvvm is a super light Mvvm Framework | Form library
kandi X-RAY | FreshMvvm Summary
kandi X-RAY | FreshMvvm Summary
FreshMvvm is a super light Mvvm Framework designed specifically for Xamarin.Forms. It's designed to be Easy, Simple and Flexible.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of FreshMvvm
FreshMvvm Key Features
FreshMvvm Examples and Code Snippets
Community Discussions
Trending Discussions on FreshMvvm
QUESTION
I have a xamarin.forms app using FreshMvvm. The following method in App.xaml.cs handles a push notification:
...ANSWER
Answered 2021-Jan-04 at 14:17Have you thought about using Messaging Center?
Messaging Center Documentation
You could send a message once you are sure you are ready and then whatever is subscribed to it, will do the work for you once the Message has been received.
QUESTION
I need to set two ViewModels from the code behind in the xaml code. Or if there is better way doing would be great to.
When I do it like this way the application crashes. When I set ProductDetailViewModel in the code behind (BindingContext = ViewModel) everything works fine.
update It's not an good idea to pass viewModels as parameters. I have now one class "ViewModelLocator" which contains all the ViewModels as static properties. Use Google for more info. This way things are way easier.
example ViewModelLocator
...ANSWER
Answered 2020-Oct-21 at 11:31If I understood this correctly and if you want to keep the pattern to pass in the view model as constructor argument ...
QUESTION
I have a mobile app with Xamarin.Forms and FreshMvvm. Every page uses a control template defined in App.xaml:
...ANSWER
Answered 2020-Oct-26 at 19:05When setting your BindingContext
to your {RelativeSource TemplatedParent}
, your binding context is the page.
To access your ViewModel, you must change your xaml to access your property through the "BindingContext" of your page.
QUESTION
I have a Xamarin.Forms application using FreshMVVM. Can anybody tell me if I can use binding to handle changing the PageModel in Page's code-behind? E.g. if an event happens in the PageModel like this:
...ANSWER
Answered 2020-Aug-21 at 20:43define a custom event in your model
QUESTION
I am trying to implement a xamarin app that will have a MainPage like a container that will host the rest of my pages(as content view?).
MainPage.xaml
...ANSWER
Answered 2020-Aug-09 at 17:48Control templates help you define the root view like navbar or headers in all pages. I am not sure why you want to bind content property if you want to use a static resource. If you are going to change the content then we can use data templates and use a converter to convert the ViewModel to view.
If you are interested to change the content of the ContentView, then you can use data templates as follows:
QUESTION
I have implemented tabbed navigation using FreshMVVM. When my app launches, I could notice that the 'ViewIsAppearing' method is getting invoked for all the tabs. However, if I switch to one tab, the 'ViewIsAppearing' method in its ViewModel is not getting called. If go to some other tab and switch back to this same tab, then it works. i.e. 'ViewIsAppearing' is not getting invoked in the initial tab change click. How do I make it invoke in the first attempt itself. I have come across a github issue similar to this. Just adding for reference https://github.com/xamarin/Xamarin.Forms/issues/3855
...ANSWER
Answered 2020-May-22 at 14:33As suggested by @FreakyAli, I did a workaround by creating custom events 'OnAppearing' and 'OnDisappearing'. Its working fine so far. Code provided below. Please post your comments.
CustomTabbedNavigationQUESTION
I have a Xamarin.Forms app with FreshMvvm, and I use secondary ToolbarItems. To do it in iOS, I had to make a custom renderer (unlike in Android). I was given a solution on how to implement it here: ToolbarItems do not look right in iOS
This solution works perfectly for me. But by now, the toolbar menu grew longer, and some of its elements do not fit the iPhone's screen. I can slide the menu and see all the elements, but as soon as I release the screen, the view jumps back up, and while it is held by a finger, the elements are not clickable. How can this be solved? Can the menu made to wrap, or something else? On Android, the menu stays where I scroll and I can click every item. Can it made stay where scrolled on iOS, too?
Here is my renderer's code:
...ANSWER
Answered 2020-May-05 at 02:13Well, I still can't reproduce the problem with your updated code. I don't if it is a solution and I just want to clarify my comment here.
In your code, you add the _table
to the View:
QUESTION
I have a Xamarin.Forms application, and it uses FreshMvvm. I have two picker controls for selecting countries and states/provinces. The picker of countries is populated initially, but the list of states/provinces should be populated on the fly based on the selected country. I cannot find how it can be done using command and not code-behind event handling. Here are my controls in MyPage.xaml:
...ANSWER
Answered 2020-Apr-17 at 20:02using Freshmvvm you can make use of the WhenAny
method and listen to changes on the SelectedCountry
property. When this happens you will get filter the collection of the states by country using the SelectedCountry and update your States
collection with the result.
That should look like this:
QUESTION
- FreshMVVM 3.0.0
- Xamarin Forms 4.2
A number of our input pages are loaded modally and when the user presses Save we execute a Command
like this
ANSWER
Answered 2020-Feb-21 at 09:26Just note that the service is being awaited, holding the UI until service completes,
have you tried removing await
and popping the page immediately or displaying a loader while the service is busy?
this.InsertReports(metadata.Reports).ConfigureAwait(false);
QUESTION
With WPF I use "MVVM Light Toolkit from galasoft" but with Xamarin does it bring more functionality or simplicity to use a MVVM framework ?
And which framework is best all by being simple ?
I saw that there was "freshmvvm" but it seems that there are quite a few basic things.
...ANSWER
Answered 2020-Feb-06 at 10:07With WPF I use "MVVM Light Toolkit from galasoft" but with Xamarin does it bring more functionality or simplicity to use a MVVM framework ?
This part of the question is OK and I'll answer it, the rest is not and it is strictly prohibited here to ask which library is the best because there is no such thing as the best library.
Speaking of the above there is a major difference between WPF and Xamarin. You can't do some major things in WPF without passing some variables from the backend to the model which deifies the purpose of MVVM, and that's where MVVM libraries got in place, to resolve that. As this is unnecessary in Xamarin, they bring almost no value and a nice pile of problems.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install FreshMvvm
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page