How to focus only the particular view with "RegisteredName" in container

Nov 29, 2011 at 10:28 AM

Hi All,

Here is my Scenario... I am using the following code for registering the View...

    container.RegisterType<Object, LibraryCataloguePictureView>("LibraryCataloguePictureView");
    container.RegisterType<Object, LibraryCatalogueResourceBoxView>("LibraryCatalogueResourceBoxView");

Is it possible to enable the focus on the particular view using highlighted names in the above code snippet those are the object of the view?

If i have more than 10 layouts in the particular view... I want to limit those to 6/7 like using visibility properties in the View... I want to restrict using count of the layout.... Is it possible?

Thanks and Regards,


Nov 29, 2011 at 5:51 PM

Hi Sakthi,

When a type/instance is registered with a contract name in the container, that name is going to be used by the navigation framework. However, based on my understanding, the contract name is different from the view name and it cannot be used to get a specific view from a region.

To get a specific view from a region using the contract name, you might find the following blog post useful:

Once you have the view that must be focused, you might be able to focus it like any other element.

You might find better support about how to focus a specific element in the following forums:

Also, it might be possible that depending of the type of Region where the view is hosted, you might find useful to activate the view using the Activate method of the region instead of setting the application focus manually.

I hope you find this useful,

Damian Cherubini