Closed AcidRaZor closed 4 years ago
I think that should be ActiveItem.
Yup, tried that. I even have my navigation happen on Shell using event aggregators and everything gets called, except when ActivateItemAsync runs, it doesnt change the ContentControl. (There is no ActivateItem for the .net core 3 implementation if that is what you were referring to)
/edit One thing I havent tried is binding the control explicitly instead of relying on Caliburn to resolve it for me. Will try that
ActiveItem works for me. I'm using Caliburn.Micro 4.0.140-rc
.
View:
<ContentControl x:Name="ActiveItem" />
ShellViewModel:
public class ShellViewModel : Conductor
{
public ShellViewModel()
{
ActivateItemAsync(new MainViewModel())
}
}
MainViewModel:
public class MainViewModel : Screen
{
public MainViewModel()
{
}
}
@CoreyVincent My mistake was using ActivateItem as the name for the content control, not ActiveItem. Thanks so much for your input with code example. Otherwise I would not have realized my mistake.
I'm having some difficulty with Caliburn not picking up the ContentControl. I've tried using x:Name="ActivateItem" and x:Name="ActivateItemAsync" but neither works when I call await ActivateItemAsync and use the IoC to get the ViewModel
Everything is setup correctly as far as I'm aware. I've been working on a new .NET Core project, the only part I need to finish now is the ContentControl navigation between UserControls