Hey ,
I'm currently working on a WPF application that is build upon the Smart client software factory.I'm using your xamribbon , editors and datagrid throughout the application.
I was wondering if there will be something like the infragistics Composite ui application block made available for the WPF infragistics.
greetz,
Hello Greetz,
It is my understanding that NetAdvantage for WPF does not require an extensibility kit in order to work with CAB. There is MSDN documentation about the new extensions for CAB which support WPF:http://msdn.microsoft.com/en-us/library/aa480482.aspx
In order to use NetAdvantage for WPF with CAB (for WinForms) you will need to use a WPF layer:http://msdn.microsoft.com/en-us/library/cc540739.aspx
NetAdvantage for WPF are standard WPF controls and should not require any extra support. Please let us know if you do find any problem using NetAdvantage with any of Microsoft's initiatives to support WPF with CAB.
Thank you
Hi
I am trying to convert a WPF CAB Application and to use DockManager. I have named CAB Named Regions that are ContentControl's within ContentPane, on creation all works fine.
When I "Unpin" a Panel, I can see in the call stack the panel is moved, this means the parent is changed (to the Unpinned area) and this causes the RegionManager to be changed, it is set to null and then back to RegionManager.
As the Panel already has content and as its setting the Region Manager again, this throws an exception as :-
"ContentControl's Content property is not empty. \r\n This control is being associated with a region, but the control is already bound to something else. \r\n If you did not explicitly set the control's Content property, \r\n this exception may be caused by a change in the value of the inherited RegionManager attached property."
call stack
System.Reflection.TargetInvocationException was unhandled Message="Exception has been thrown by the target of an invocation." Source="mscorlib" StackTrace: at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[ arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[ parameters, CultureInfo culture, Boolean skipVisibilityChecks) at System.Delegate.DynamicInvokeImpl(Object[ args) at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter) at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler) at System.Windows.Threading.DispatcherOperation.InvokeImpl() at System.Threading.ExecutionContext.runTryCode(Object userData) at System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Windows.Threading.DispatcherOperation.Invoke() at System.Windows.Threading.Dispatcher.ProcessQueue() at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o) at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter) at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler) at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Boolean isSingleParameter) at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam) at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg) at System.Windows.Threading.Dispatcher.TranslateAndDispatchMessage(MSG& msg) at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame) at System.Windows.Application.RunInternal(Window window) at Ittv4Application.App.Main() in C:\ITTV4\Code\ITTv4\Ittv4Application\obj\Debug\App.g.cs:line 49 at System.AppDomain._nExecuteAssembly(Assembly assembly, String[ args) at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart() InnerException: System.ApplicationException Message="my exception" Source="Microsoft.Practices.Composite.Wpf" StackTrace: at Microsoft.Practices.Composite.Wpf.Regions.RegionManager.OnSetRegionManagerCallback(DependencyObject element, DependencyPropertyChangedEventArgs args) in C:\ITTV4\Code\ITTv4\CAB\Source\CAL\Composite.Wpf\Regions\RegionManager.cs:line 149
at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, OperationType operationType)
at System.Windows.TreeWalkHelper.InvalidateTreeDependentProperty(TreeChangeInfo info, DependencyObject d, FrameworkObject& fo, DependencyProperty
p, FrameworkPropertyMetadata fMetadata, Style selfStyle, Style selfThemeStyle, ChildRecord& childRecord, Boolean isChildRecordValid, Boolean hasStyleChanged, Boolean isSelfInheritanceParent)
at System.Windows.TreeWalkHelper.InvalidateTreeDependentProperties(TreeChangeInfo info, FrameworkElement fe, FrameworkContentElement fce, Style selfStyle, Style selfThemeStyle, ChildRecord& childRecord, Boolean isChildRecordValid, Boolean hasStyleChanged, Boolean isSelfInheritanceParent)
at System.Windows.FrameworkElement.InvalidateTreeDependentProperties(TreeChangeInfo parentTreeState, Boolean isSelfInheritanceParent)
at System.Windows.FrameworkElement.OnAncestorChangedInternal(TreeChangeInfo parentTreeState) at System.Windows.TreeWalkHelper.OnAncestorChanged(DependencyObject d, TreeChangeInfo info) at System.Windows.DescendentsWalker`1._VisitNode(DependencyObject d) at MS.Internal.PrePostDescendentsWalker`1._VisitNode(DependencyObject d) at System.Windows.DescendentsWalker`1.WalkLogicalChildren(FrameworkElement feParent, FrameworkContentElement fceParent, IEnumerator logicalChildren) at System.Windows.DescendentsWalker`1.WalkFrameworkElementLogicalThenVisualChildren(FrameworkElement feParent, Boolean hasLogicalChildren) at System.Windows.DescendentsWalker`1.IterateChildren(DependencyObject d) at System.Windows.DescendentsWalker`1.StartWalk(DependencyObject startNode, Boolean skipStartNode) at MS.Internal.PrePostDescendentsWalker`1.StartWalk(DependencyObject startNode, Boolean skipStartNode) at System.Windows.TreeWalkHelper.InvalidateOnTreeChange(FrameworkElement fe, FrameworkContentElement fce, DependencyObject parent, Boolean isAddOperation) at System.Windows.FrameworkElement.ChangeLogicalParent(DependencyObject newParent)
at System.Windows.FrameworkElement.RemoveLogicalChild(Object child)
at Infragistics.Windows.DockManager.SplitPane.Infragistics.Windows.DockManager.ISplitElementCollectionOwner.OnElementRemoved(FrameworkElement oldElement) at jp.a(NotifyCollectionChangedEventArgs A_0)
at Infragistics.Windows.Helpers.ObservableCollectionExtended`1.RemoveItem(Int32 index)
at System.Collections.ObjectModel.Collection`1.RemoveAt(Int32 index)
at Infragistics.Windows.DockManager.SplitPane.Infragistics.Windows.DockManager.IContentPaneContainer.RemoveContentPane(ContentPane pane, Boolean replaceWithPlaceholder)
at Infragistics.Windows.DockManager.XamDockManager.a(ContentPane A_0, PaneLocation A_1, Boolean A_2) at Infragistics.Windows.DockManager.ContentPane.a(Object A_0) InnerException:
This sounds like a bug in the CAB/CAL framework. The dockmanager has to remove the element from the tree to move it to a new location when its unpinned, undocked, etc.but it sounds like the RegionManager isn't set up to handle that situation.
Yes, this is the latest WPF / CAB and not the Winforms CAB / Crossbow
I have a workaround which involves
a)2 lines of code change in the MS CAB code
b) any View added to CAB MUST have content added at creation (not the normal operation)
I am not sure the workaround is 100% until I run through all the underlying code. I will try and come up with a small demo showing the error
thanks
Martin