Update view using Message Center? - view

I'm quiet new to Xamarin.Forms.
This is to clear a doubt.
Is it possible to update view using Messaging Center in Xamarin.Forms ?

The MessagingCenter is a centralized messaging service, meaning you subscribe to it, and other places raise events to it.
What you do when you receive an event is whatever you want. You can use it to update the View if you want but normally its used to update the Model and the INotifyPropertyChanged event notifies the view of any properties that have changed.
This blog article may help further.
http://www.xamarinhelp.com/messenger-service-day-7/

Related

GA4 event for form input

I want to create event to track form input in my website form. For example someone types in name section, phone sectio or email I want to see that as event in my GA4 account. But I couldn't manage to create triger and event from tag manager. Any tips guys?
I created additional variables threw tag manager. But couldn't create trigger.
GTM's best practices advice not to do so-called DOM scraping. The proper solution here would be you asking your front-end developers to push dataLayer events for which you would be listening from GTM. This way, when things change on the front-end, the developers can effortlessly move the tracking to a new form, or a new field.
In some cases, inferior tracking methods must be used, however. In this case, you would want to deploy a custom HTML, which would be a <script> tag in your DOM deploying event listeners on form field interactions. The callbacks of the listeners would deploy dataLayer events with payloads containing whatever else you need to know about the interactions.
After you deploy the listeners and confirm that the callbacks work as you want, you make custom event triggers, indicating your event names from the dataLayer pushes. You can make dataLayer Variables to declare used datapoints in the DL events and use the new variables in your tags.

Subscribing to event but wanting to get initial value

I have a question about prism. I have the main app with ViewModel and a module with business logic. I have set up events in the module for properties that I want to be updated in the main apps ViewModel. On ViewModel load, I subscribe to all the events that are in the Module. I want to get those initial values of the in those properties when they got published on the Module Initialization but I am not sure how to do that. Could someone help me understand how it's supposed to be done?
You cannot receive events that were published before you subscribed. But you should have a service that provides the current values, anyway, so just inject it into the view model and get the initial values from there.

How to make parent component to listen, events fired by child components using eventbus in gwt

I have a custom panel with a couple of components, eg. a button and a text box.
Once the button is clicked I would like custom panel that is also the parent panel receives the event and decides what to do, like call setText on the textbox.
Is it possible to achieve this using an eventbus ?
This means that the child components need not handle their event and then relay it.
I don't know the exact classes and how they work together. But sure you could use the GWT EventBus to achieve this. Fire an event in your button class and handle this event in your custom panel. You can google or find related answers here on stackoverflow.
I think this answer will help you: How to use the GWT EventBus
It's pretty simple to fire events and handle this events in other classes in your application.

Trouble with Google Tag Manager (GTM) New Event Listener Tags

I'm very excited about GTM introducing the Event Listener tag options, and have used them with success on some websites. With several of my company's clients, however, I am having this strange issue.
I can see, using the debugger software that the Link Click Listener tag is firing, and I can see that the Record Event tag is firing. However the Events never show up in Analytics.
Any advice?
Thanks in advance!
Becky
Even with the Link Click Listener and the Event Listener firing, you still need to add an additional Google Analytics tag OR Universal Analytics tag to utilize them within GTM. Remember, the only thing the listeners do is create new dataLayers for you to use.
To make events work in Analytics, add a NEW Google Analytics (or UA) tag to GTM.
Select the Track type as 'Event'
Category: Whatever you'd like the category to be (you can use macros here as well)
Action: Whatever the action is, download, click, etc. (macros are helpful here too!)
Label: Whatever you'd like it to be.
The key here is how you setup the rules. Your {{event}} needs to utilize the dataLayer - gtm.click, then you need to specify an element you'd like to track.
For a fantastic tutorial, I recommend - http://cutroni.com/blog/2013/10/07/auto-event-tracking-with-google-tag-manager/

Using MVVM Light messaging instead of query strings in Windows Phone

I am trying to use MVVM light messaging to send a value from one page to another during Navigation (for example, send the id of an item that was selected to an edit page). So the list page's viewmodel sends a message and then sends a navigation message to the view which redirects to the edit page. The edit page's viewmodel gets created only when the navigation to the page happens. So when I register for this event in the edit page viewmodel, I never get the message? What is the best solution for this?
Thanks in advance.
Your best solution would be to use the querystring instead of messaging. If you don't use the querystring, you'll have to deal with situations like the application being deactivated (tomestoned), then the user clicking "back" and your application loads the second page without receiving the message.
However, if you want to continue down this path, you can modify your ViewModelLocator such that your page's ViewModel is created immediately (in ctor for instance) instead of as needed. Since the ViewModelLocator is created as soon as your App.xaml is loaded, you know that any view models will be created immediately. As long as your view model is registering for messages in it's constructor it should receive the message.

Resources