New Post: Hook into ContentControl view creation
The simplest way is to re-define the View generation callback: ViewLocator.GetOrCreateViewType:var baseGetOrCreateViewType = ViewLocator.GetOrCreateViewType; ViewLocator.GetOrCreateViewType = (type,...
View ArticleNew Post: Bind a viewmodel and its view without displaying the view?
CM will try to bind a view-model/model together (hence to display the view) if you either specify the View.Model explicitly, or use naming convention:publicclass MyViewModel { publicobject MyVMProperty...
View ArticleNew Post: Master/Details with multiple views for Master and for Details
It depends. :) If your master and detail view-models are the same, indipendently from the actual view (which is the case, I suppose), you can explicitly bind View.Model to the master vm, and use a...
View ArticleCreated Unassigned: Buttons inside a Flyout [360]
Hi together,i have a little problem using Buttons inside of a Flyout.The Buttons methods should be invoked via caliburn.message.... .Every time the application starts, the Buttons wont react.Open the...
View ArticleNew Post: IHandle not working on View's behind code
I currently have 3 separate projects in a solution, Main application which contains my bootstrapper, a View project, and a ViewModel project The main application's bootstrapper is set up correctly to...
View ArticleNew Post: IHandle not working on View's behind code
You need to have the ViewModel subscribe to the IEventAggregator.
View ArticleNew Post: IHandle not working on View's behind code
Let me elaborate on the problem. UtilityViewModel.cs (from my ViewModel project)public class UtilityViewModel { private IEventAggregator myevent; [ImportingConstructor] public...
View ArticleNew Post: IHandle not working on View's behind code
Hmm, looks correct. Have you place a breakpoint in the constructor to see you're getting the right values for window and events?
View ArticleNew Post: IHandle not working on View's behind code
And you should be using IoC.Get<IEventAggregator>() instead of passing those values. Thats why it's there.
View ArticleNew Post: IHandle not working on View's behind code
do i need to do any subscriing in the View's behind code or simply just that IHandle like i have it? ive replaced those parametesr with just calling IoC.Get<IEventAggregator>(), but the Handle...
View ArticleNew Post: IHandle not working on View's behind code
is it possible that the bootstrapper is "overriding" my View class for IHandle? because like i said, if i implement IHandle<string> inside my bootstrapper class, it gets hit there.. theoretically...
View ArticleNew Post: IHandle not working on View's behind code
I don't know what happens if you have behind code in the view. I typically delete it.
View ArticleNew Post: IHandle not working on View's behind code
ah okay i misunderstood. So you've never be able to use IHandle on a View's behind code before? From my view model class, i am trying to raise an event so that my view's behind code can run some things...
View ArticleNew Post: IHandle not working on View's behind code
I think you've misunderstood me. I was only referring to your use of the Views, not the IEventAggregator. I've look at the code the IEventAggreator and it doesn't have anything specific to Views or...
View ArticleNew Post: IHandle not working on View's behind code
if thats all its doing then i have no idea why the view's behind code isnt being evaluated. do instances get removed automatically from the list? i will provide sample code in the next day or so when i...
View ArticleNew Post: IHandle not working on View's behind code
ok got it working. the problem was my bootstrapper had 2 instances of the IEventAggregator so i was pulling the wrong one when i was subscribing from the View's behind code. thanks for your help...
View ArticleNew Post: ConventionManager configuration for code-behind dependency properties
Did you find a solution Rufus? I have a similar issue, I am adapting a project with views and viewmodels not written with Caliburn in mind, and it has dependency properties in the code behind. How do I...
View ArticleNew Post: ConventionManager configuration for code-behind dependency properties
Hello Jeroen! I'm very sorry, but I didn't find a solution - finally I changed the whole architecture. Best regards Rufus
View ArticleNew Post: Query String
I am using the MUI library https://mui.codeplex.com/ with Caliburn for a WPF project. so I switched my code to use view first using MEF bootstrapper and a contentloader class. How do I pass items...
View Article