Quantcast
Channel: patterns & practices: Prism
Viewing all 1878 articles
Browse latest View live

New Post: Navigation to Dynamic Modules

$
0
0
Hi Don,

Prism may differ on how some features are achieved, as it have a custom particular workflow.
View-Based Navigation is the type of Navigation on which you go from one View to another. But this Navigation feature would be performed limited into the list of registered Views inside a specific Region. This way you could Navigate independently on each defined Region.

The following MSDN Prism chapters may answer your question about Prism design architecture, specially the last two regarding Navigation:

Regards,
Gabriel Ostrowsky.
https://blogs.southworks.net/gostrowsky

New Post: Prism+MEF: using TreeView through Prism & MEF Framework

$
0
0
If possible I need to implement the following two classes using MEF and I will follow up for rest of the sample. How to handle the Constructors and LoadChildren() method in terms of MEF. I asked the same question in many forums but no answer!!!

public class CountryViewModel
{
readonly ReadOnlyCollection<RegionViewModel> _regions;
public ReadOnlyCollection<RegionViewModel> Regions
{
get { return _regions; }
}
//---------------------------------------------------------
public CountryViewModel(Region[] regions)
{
_regions = new ReadOnlyCollection<RegionViewModel>(
(from region in regions
select new RegionViewModel(region))
.ToList());
}
}


public class RegionViewModel : TreeViewItemViewModel
{
readonly Region _region;
public RegionViewModel(Region region)
: base(null, true)
{
_region = region;
}
public string RegionName
{
get { return _region.RegionName; }
}
protected override void LoadChildren()
{
foreach (State state in Database.GetStates(_region))
base.Children.Add(new StateViewModel(state, this));
}
}

Created Unassigned: Interaction requests in nested region aware menu items only work once [10590]

$
0
0
Hi,

I’m stomped on this one. The Raised event of the InteractionRequest<T> is null the second time an interaction request is raised and hence doesn’t open the dialog.

I managed to reproduce the issue in a simple example. Check out the Menu in the MainWindow to see a working example, and one that doesn't:

<Menu>
<MenuItem Header="RootMenuItem">
<MenuItem Header="NotWorkingMenuItem" Prism:RegionManager.RegionName="MenuRegion"/>
</MenuItem>
<!--<MenuItem Header="WorkingMenuItem" Prism:RegionManager.RegionName="MenuRegion"/>-->
</Menu>

Help!!! :)

René

Reviewed: Prism 4.2 for .NET 4.5 (апр 13, 2014)

$
0
0
Rated 4 Stars (out of 5) - Good asdfasdf asdfa sdfsdf

New Post: 4.2 beta Navigation journal entries + NavigationParameters

$
0
0
Sorry to chase on this. But what's happening? Haven't seen any news on the actual release of 4.2 for a while now?

New Post: Prism 4.2 for .NET 4.5 RTM

$
0
0
Just checking in to see if there were updates for an RTM on Prism 4.2 for .NET 4.5. It appears the original goal was to be completed by March. Any thoughts/updates?

Thanks

New Post: Prism+MEF: using TreeView through Prism & MEF Framework

$
0
0
Hi,

I want to apologize for the late response to your question. I´ve been investigating how to accomplish the scenario you are asking about.

As commented in the StackOverflow discussion related to this same problem (Unable to build Hierarchical View Models using MEF), you would need to register the ViewModel classes in the container, taking into account if the ViewModel needs to be registered as Singleton or not. In order to do this you would use Export attributes.

In addition, constructors would be imported from the container when instances are resolved. Therefore any argument of the constructors should be imported from the container as well. And this feature would need to perform some changes on the solution you provided. For example, the Region list parameter may need to be registered in the container, inside a RegionList class that contains te list. I will come back to you when I manage to resolve those dependencies.

The Prism Guide may be helpful for finding the way on configuring the MefBootstrapper and register the object types on it.

Regards.
Gabriel Ostrowsky
https://blogs.southworks.net/gostrowsky

New Post: Prism+MEF: using TreeView through Prism & MEF Framework

$
0
0
Hi Gabriel,
I'm glad that you follow up my question, and I wish you could figure out an answer because it is very important to be able to build hierarchy like Treeview using the powerful DI IOC MEF.
But the core problem that I am facing is that we can't pass parameters to constructor while composing parts using MEF which is the base to build a hierarchy.
I hope you can find out a way around this obstacle and I think this capability must be added to MEF
Good Luck.

New Post: NullReferenceException in DelayedRegionCreationBehavior

$
0
0
Hi ran up with same issue.

If I keep my application running for long time, say whole night and keep my PC locked. when i switch tabs of perform any interaction with application, It crashes and I get following error in Event logs.

ApplicationNeedsToClose The exception is: Microsoft.Practices.Prism.Regions.UpdateRegionsException: An exception occurred while trying to create region objects.
The most likely causing exception was: 'System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> Microsoft.Practices.Prism.Regions.Behaviors.RegionCreationException: An exception occurred while creating a region with name ''. The exception was: System.ArgumentNullException: Value cannot be null.
Parameter name: regionName
at Microsoft.Practices.Prism.Regions.RegionAdapterBase1.Initialize(T regionTarget, String regionName)
at Microsoft.Practices.Prism.Regions.RegionAdapterBase
1.Microsoft.Practices.Prism.Regions.IRegionAdapter.Initialize(Object regionTarget, String regionName)
at Microsoft.Practices.Prism.Regions.Behaviors.DelayedRegionCreationBehavior.CreateRegion(DependencyObject targetElement, String regionName). ---> System.ArgumentNullException: Value cannot be null.
Parameter name: regionName
at Microsoft.Practices.Prism.Regions.RegionAdapterBase1.Initialize(T regionTarget, String regionName)
at Microsoft.Practices.Prism.Regions.RegionAdapterBase
1.Microsoft.Practices.Prism.Regions.IRegionAdapter.Initialize(Object regionTarget, String regionName)
at Microsoft.Practices.Prism.Regions.Behaviors.DelayedRegionCreationBehavior.CreateRegion(DependencyObject targetElement, String regionName)
--- End of inner exception stack trace ---
at Microsoft.Practices.Prism.Regions.Behaviors.DelayedRegionCreationBehavior.CreateRegion(DependencyObject targetElement, String regionName)
at Microsoft.Practices.Prism.Regions.Behaviors.DelayedRegionCreationBehavior.TryCreateRegion()
at Microsoft.Practices.Prism.Regions.Behaviors.DelayedRegionCreationBehavior.OnUpdatingRegions(Object sender, EventArgs e)
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Delegate.DynamicInvokeImpl(Object[] args)
at Microsoft.Practices.Prism.Events.WeakDelegatesManager.Raise(Object[] args)
at Microsoft.Practices.Prism.Regions.RegionManager.UpdateRegions()'.
But also check the InnerExceptions for more detail or call .GetRootException().  ---> Microsoft.Practices.Prism.Regions.Behaviors.RegionCreationException: An exception occurred while creating a region with name ''. The exception was: System.ArgumentNullException: Value cannot be null.
Parameter name: regionName
at Microsoft.Practices.Prism.Regions.RegionAdapterBase1.Initialize(T regionTarget, String regionName)
at Microsoft.Practices.Prism.Regions.RegionAdapterBase
1.Microsoft.Practices.Prism.Regions.IRegionAdapter.Initialize(Object regionTarget, String regionName)
at Microsoft.Practices.Prism.Regions.Behaviors.DelayedRegionCreationBehavior.CreateRegion(DependencyObject targetElement, String regionName). ---> System.ArgumentNullException: Value cannot be null.
Parameter name: regionName
at Microsoft.Practices.Prism.Regions.RegionAdapterBase1.Initialize(T regionTarget, String regionName)
at Microsoft.Practices.Prism.Regions.RegionAdapterBase
1.Microsoft.Practices.Prism.Regions.IRegionAdapter.Initialize(Object regionTarget, String regionName)
at Microsoft.Practices.Prism.Regions.Behaviors.DelayedRegionCreationBehavior.CreateRegion(DependencyObject targetElement, String regionName)
--- End of inner exception stack trace ---
at Microsoft.Practices.Prism.Regions.Behaviors.DelayedRegionCreationBehavior.CreateRegion(DependencyObject targetElement, String regionName)
at Microsoft.Practices.Prism.Regions.Behaviors.DelayedRegionCreationBehavior.TryCreateRegion()
at Microsoft.Practices.Prism.Regions.Behaviors.DelayedRegionCreationBehavior.OnUpdatingRegions(Object sender, EventArgs e)
--- End of inner exception stack trace ---
at Microsoft.Practices.Prism.Regions.RegionManager.UpdateRegions()
at Microsoft.Practices.Prism.Regions.RegionManager.RegionCollection.ContainsRegionWithName(String regionName)

New Post: Prism 4.2 for .NET 4.5 RTM

$
0
0
Updating the documentation is taking longer than expected. We will finish this week and publish by early next week.

New Post: 4.2 beta Navigation journal entries + NavigationParameters

$
0
0
We will finish everything this week and publish early next week. Documentation is taking longer than expected.

New Post: Prism 4.2 for .NET 4.5 RTM

New Post: Prism 4.2 for .NET 4.5 RTM

$
0
0
We are starting the publish the new version today. We just published the NuGet packages as version 5.0. We decided to change the version to Prism 5.0 since it only includes WPF and there are reference breaking changes as well.

Blaine

New Post: 4.2 beta Navigation journal entries + NavigationParameters

$
0
0
The release is complete and we are now starting to publish the different components. We just published the NuGet packages.

Created Release: Prism 5.0 Documentation (Apr 18, 2014)

$
0
0
Initially we provide the API reference documentation. This will expand to include the PDF once it is ready.

Released: Prism 5.0 Documentation (Apr 18, 2014)

$
0
0
Initially we provide the API reference documentation. This will expand to include the PDF once it is ready.

Updated Release: Prism 5.0 Documentation (Apr 18, 2014)

$
0
0
Initially we provide the API reference documentation. This will expand to include the PDF once it is ready.

Released: Prism 5.0 for .NET 4.5 (Jan 14, 2014)

Updated Release: Prism 5.0 for .NET 4.5 (Jan 14, 2014)

New Post: Project Templates for Prism 4.2

$
0
0
I would really like to see this, too. Setting up the shell and each module is a pretty time consuming process. There are VS 2010 templates out there, they just need to be updated for VS 2013.
Viewing all 1878 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>