To use Mvx.MvxBindableListView,I have to inferit my activity from MvxBindingAvtivityView.
But I could't find this class anywhere in my Mvvmcross libraries.
I am using MvvmCross 3.1.1 which beta prerelease.
Which version of MvvmCross should I use?
Mvx.MvxBindableListView is an old name, in MvvmCross v.3 this control is called Mvx.MvxListView
https://github.com/MvvmCross/MvvmCross/blob/v3.1/Cirrious/Cirrious.MvvmCross.Binding.Droid/Views/MvxListView.cs
Related
I'm working on .net standard 2.0 library project for my solution.
It have to include this method:
public Task ShutdownAsync()
{
Application.Current.Shutdown();
}
Problem is it gives me an error:
The name 'Application' does not exist in the current context
It also doesn't exist in System.Windows.
As answers to similar questions suggests I tried to add reference to PresentationFramework. But it isn't on the list.
Looks like it have something to do with the fact I'm doing it in a library project targeted at .net standard 2.0.
Is here any way to add proper reference to this project?
.Net standard 2.0 was the problem.
This class is platform-specific so I should target .Net Platform instead.
I have not tried it myself but wanted to see if someone has already explored this scenario?
Will MVVMCross be able to detect/link View-ViewModels etc. and work just as is if:
I have an X.Droid and X.iOS project along with a shared core PCL project in Solution A.
I want to write ViewModel classes in additional/separate core (PCL) projects, added in Solution B, have a nuget package as output and then consume/reference/add package in the Droid and iOS projects.
You can override your Setup.cs class to provide more assemblies in where MvvmCross should look for ViewModels.
So if you are writing most of your app in assembly A, but have some shared ViewModels in assembly B and maybe some in assemby C, you would do something like this:
protected override IEnumerable<Assembly> GetViewModelAssemblies()
{
var vmAssemblies = new List<Assembly>(base.GetViewModelAssemblies())
{
typeof(ViewModelInAssemblyB).Assembly,
typeof(ViewModelInAssemblyC).Assembly
};
return vmAssemblies;
}
I'm using the latest NuGet packages for MvvmCross CrossCore, Hot Tuna, Location and Picture Plug ins, but I can't seem to find in the object browser the IMvxServiceProducer and IMvxServiceConsumer classes that are used in many examples. Doing a search for RegisterServiceInstance, I found Cirrious.CrossCore.IoC.MvxIoCExtensions. Did the two interfaces go away in place of something simpler?
Those interfaces were used in many v1 and vNext samples, but in v3 they have all been replaced with Mvx.Resolve<T> service location, or with cleaner constructor injection.
All the examples in https://github.com/slodge/MvvmCross-Tutorials/ and in the N+1 videos have been updated to use the newer APIs.
For a full explanation of v3's service location and IoC see: Instantiation of ViewModels and Service classes
I'm trying to recreate the sample provided on the castle windsor wiki about channel action policies (found here: http://docs.castleproject.org/Windsor.WCF-Facility-Channel-Action-Policy.ashx ) but i can't seem to find IChannelActionPolicy interface in the Castle.Facilities.WcfIntegration namespace anywhere.
I've installed the wcf facility via Nuget.
What am i doing wrong here?
The documentation is outdated in this regard. Have a look at IWcfPolicy interface and its implementors
How to correctly call my code when Glassfish v3.x is READY or going to SHUTDOWN?
I was succesfully using lifecycle listener on glassfish v2.x.
Unfortunatelly, this interface is marked as DEPRECATED in Glassfish v3.x. A new interface Startup is recomended instead but I don't know how to use it and could not find any useful documentation or examples. Could you please point me to how use it?
You want what's called a lifecycle module. Chapter 12, Developing Lifecycle Listeners is a good place to start. This explains the available events and when they fire. Once you have your class codded and ready to go this blog entry will explain how to deploy the module to GlassFish using the admin console..