|
Hi All,
we have done application using WPF .Net framework 3.5.Now I want to migrate application to .Net framework 4.5 but application building successfully.I am not able to see the design (XAML) part.
In Xaml showing many errors as below.Could you please help me out.Thanks in advance
System.ArgumentException
'{DependencyProperty.UnsetValue}' is not a valid value for the 'System.Windows.Controls.Image.Source' property on a Setter.
at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.WaitForCompletion(NestedCallContext nestedCallContext, BlockingCall call, WaitHandle timeoutSignal)
at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.MarshalOutSynchronous(Action action, Int32 targetApartmentId, WaitHandle aborted, WaitHandle timeoutSignal)
at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.MarshalOut(Action action, Int32 targetApartmentId, WaitHandle aborted, CallSynchronizationMode syncMode, WaitHandle timeoutSignal)
at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.MarshalOut[TValue](RemoteHandle`1 targetObject, Action action, CallSynchronizationMode syncMode)
at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.MarshalOut[TResult,TValue](RemoteHandle`1 targetObject, Func`2 func, CallSynchronizationMode syncMode)
at Microsoft.Expression.DesignHost.Isolation.Remoting.LocalDesignerService.CreateDesignerImpl(IHostSourceItem item, IHostTextEditor editor, RemoteCancellationToken remoteCancelToken)
at Microsoft.Expression.DesignHost.Isolation.Remoting.LocalDesignerService.<>c__DisplayClass12.<microsoft.expression.designhost.idesignerservice.createdesigner>b__11(RemoteCancellationToken remoteToken)
at Microsoft.Expression.DesignHost.Isolation.Remoting.LocalDesignerService.CallWithCancellation[TResult](CancellationToken cancelToken, Func`2 func)
at Microsoft.Expression.DesignHost.Isolation.Remoting.LocalDesignerService.Microsoft.Expression.DesignHost.IDesignerService.CreateDesigner(IHostSourceItem item, IHostTextEditor editor, CancellationToken cancelToken)
at Microsoft.Expression.DesignHost.IsolatedDesignerService.IsolatedDesignerView.CreateDesignerViewInfo(CancellationToken cancelToken)
System.ArgumentException
'{DependencyProperty.UnsetValue}' is not a valid value for the 'System.Windows.Controls.Image.Source' property on a Setter.
Server stack trace:
at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.WaitForCompletion(NestedCallContext nestedCallContext, BlockingCall call, WaitHandle timeoutSignal)
at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.MarshalIn(Action action, Int32 targetApartmentId)
at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.MarshalIn(IRemoteObject targetObject, Action action)
at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.MarshalIn[TResult](IRemoteObject targetObject, Func`1 func)
at Microsoft.Expression.DesignHost.Isolation.Remoting.RemoteDesignerService.Microsoft.Expression.DesignHost.Isolation.Remoting.IRemoteDesignerService.CreateDesigner(IRemoteHostSourceItem remoteItem, IRemoteHostTextEditor remoteEditor, IRemoteCancellationToken remoteToken)
at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at Microsoft.Expression.DesignHost.Isolation.Remoting.IRemoteDesignerService.CreateDesigner(IRemoteHostSourceItem remoteItem, IRemoteHostTextEditor remoteEditor, IRemoteCancellationToken cancelToken)
at Microsoft.Expression.DesignHost.Isolation.Remoting.LocalDesignerService.<>c__DisplayClass8.<createdesignerimpl>b__6(IRemoteDesignerService d)
at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.<>c__DisplayClass4`2.<marshalout>b__3()
at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.Call.InvokeWorker()
System.ArgumentException
'{DependencyProperty.UnsetValue}' is not a valid value for the 'System.Windows.Controls.Image.Source' property on a Setter.
at System.Windows.Setter.Seal()
at System.Windows.SetterBaseCollection.Seal()
at System.Windows.TriggerBase.ProcessSettersCollection(SetterBaseCollection setters)
at System.Windows.Trigger.Seal()
at System.Windows.TriggerCollection.Seal()
at System.Windows.StyleHelper.SealTemplate(FrameworkTemplate frameworkTemplate, Boolean& isSealed, FrameworkElementFactory templateRoot, TriggerCollection triggers, ResourceDictionary resources, HybridDictionary childIndexFromChildID, FrugalStructList`1& childRecordFromChildIndex, FrugalStructList`1& triggerSourceRecordFromChildIndex, FrugalStructList`1& containerDependents, FrugalStructList`1& resourceDependents, ItemStructList`1& eventDependents, HybridDictionary& triggerActions, HybridDictionary& dataTriggerRecordFromBinding, Boolean& hasInstanceValues, EventHandlersStore& eventHandlersStore)
at System.Windows.FrameworkTemplate.Seal()
at System.Windows.FrameworkTemplate.System.Windows.ISealable.Seal()
at System.Windows.StyleHelper.SealIfSealable(Object value)
at System.Windows.ResourceDictionary.SealValue(Object value)
at System.Windows.ResourceDictionary.SealValues()
at System.Windows.ResourceDictionary.AddOwner(DispatcherObject owner)
at System.Windows.ResourceDictionary.PropagateParentOwners(ResourceDictionary mergedDictionary)
at System.Windows.ResourceDictionary.OnMergedDictionariesChanged(Object sender, NotifyCollectionChangedEventArgs e)
at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
at System.Collections.ObjectModel.ObservableCollection`1.InsertItem(Int32 index, T item)
at System.Windows.ResourceDictionaryCollection.InsertItem(Int32 index, ResourceDictionary item)
at System.Collections.ObjectModel.Collection`1.Add(T item)
at Microsoft.Expression.DesignSurface.View.WPFSceneView.WpfResourceHost.TrySetApplicationResources()
at Microsoft.Expression.DesignSurface.View.WPFSceneView.WpfResourceHost.EndInstanceBuilding()
at Microsoft.Expression.DesignSurface.View.WPFSceneView.CrossDocumentUpdateToken.System.IDisposable.Dispose()
at Microsoft.Expression.Platform.InstanceBuilders.ViewNodeManager.UpdateInstances(IAttachViewRoot siteRoot, IList`1 contextNodes, CancellationToken cancelToken)
at Microsoft.Expression.DesignSurface.View.XamlSceneView.UpdateInstancesInternal()
at Microsoft.Expression.DesignSurface.View.XamlSceneView.UpdateInternal(Boolean updateInstances, Boolean updateReferences)
at Microsoft.Expression.DesignSurface.View.WPFSceneView.UpdateInternal(Boolean updateInstances, Boolean updateReferences)
at Microsoft.Expression.DesignSurface.View.XamlSceneView.Update(Boolean updateReferences)
at Microsoft.Expression.DesignSurface.View.ViewUpdateManager.UpdateInvalidRelatedDocuments(SceneView view)
at Microsoft.Expression.DesignSurface.View.XamlSceneView.EnsureActiveViewUpdated()
at Microsoft.Expression.DesignSurface.View.WPFSceneView.EnsureActiveViewUpdated()
at Microsoft.Expression.DesignSurface.View.XamlSceneView.SetVisible(Boolean visible)
at Microsoft.Expression.DesignSurface.View.WPFSceneView.SetVisible(Boolean visible)
at Microsoft.Expression.DesignSurface.DocumentViewContext.CreateAndOpenView(ISourceItemContext sourceItem, CancellationToken cancelToken, Boolean activate, Boolean ensureOpenInHost, Boolean suppressUI)
at Microsoft.Expression.DesignSurface.DesignerService.CreateDesigner(IHostSourceItem item, IHostTextEditor editor, CancellationToken cancelToken)
at Microsoft.Expression.DesignHost.Isolation.Remoting.RemoteDesignerService.<>c__DisplayClass10.<>c__DisplayClass12.<microsoft.expression.designhost.isolation.remoting.iremotedesignerservice.createdesigner>b__f(CancellationToken cancelToken)
at Microsoft.Expression.DesignHost.Isolation.Remoting.RemoteDesignerService.CallWithCancellation[TResult](IRemoteCancellationToken remoteToken, Func`2 func)
at Microsoft.Expression.DesignHost.Isolation.Remoting.RemoteDesignerService.<>c__DisplayClass10.<microsoft.expression.designhost.isolation.remoting.iremotedesignerservice.createdesigner>b__e()
at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.<>c__DisplayClass16`1.<marshalin>b__15()
at Microsoft.Expression.DesignHost.Isolation.Remoting.STAMarshaler.Call.InvokeWorker()
|
|
|
|
|
Build in 3.5 and look at the XAML in the designer; and see if you get the same error. This may not even be a 4.5 problem; on the surface, it looks like there is a problem with the "source" for an "image" (IMO... just a guess... no warranty).
|
|
|
|
|
|
All,
I am looking for a control that allows modification of a floormap image.
As it stands the floormaps are cad based and BMPs too, but I want to be able to display them in WPF app and modify them (move walls, add pre-defined icons to it for phone points for example).
The intersoft hospital floor is something Id like to do for example but plan needs to be modifiable at runtime. I think that uses KML type files but not sure how to create them from a CAD image (is that possible?). And then how can they be modified in run-time?
Is this possible? Is there a better / easier file format to use for this project?
Its at the design stage so just getting an idea of how to do it!
Thanks
|
|
|
|
|
|
Thanks. The project died a death and Ive only just seen your message! Appreciate the thought...
|
|
|
|
|
And here I am looking at when I last posted and thinking it was "the future" (March 30 at 16:35) ... Whaaa ?
Only noticed it was 2015 at little later...
"(I) am amazed to see myself here rather than there ... now rather than then".
― Blaise Pascal
|
|
|
|
|
Does anyone have a VS2012 start page? I converted from VS2010 but it's giving me trouble.
Thanks
If it's not broken, fix it until it is
|
|
|
|
|
What do you mean by Start Page, that page where Create new project or Recent projects are given? What problem would it give?
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
Kevin Marois wrote: but it's giving me trouble. I don't know what sort of trouble you mean, but Google seems to find lots of links[^].
|
|
|
|
|
Google gave me lots of links too.
But none seem to deal using the VS2010 resources in VS2012/13.
|
|
|
|
|
Unfortunately Microsoft tend to change their systems with each new release, so you (almost) have to start from scratch each time. The only thing for it is to plough through their documentation. I have to say that I did once post a query on a similar problem to their development forum, and got some very useful help from them.
|
|
|
|
|
The problem is that all they've provided is the XAML for the start page. No code. It's referring to some resources that are internal to VS2010. And there's no real documentation that I can see.
|
|
|
|
|
zephaneas wrote: no real documentation that I can see. Assuming it is documented somewhere on MSDN, you have to search quite hard to find it. You could always try the Microsoft developer forum and ask there.
|
|
|
|
|
I upgraded a VS 2010 start page to 2010. At the top are 3 objects:
"New Project..."
"Open A Project..."
"Connect To Team Foundation Server"
In VS2010 these are ImageButtons. In VS2012 I can't figure out what they are. So I changed the buttons from:
<vs:ImageButton
x:Uid="ConnectToTSButton"
Margin="15,2,15,2"
Width="Auto"
Content="Connect To Team Foundation Server"
Style="{StaticResource linkStyle}"
Visibility="{Binding Path=TeamFoundationClientSupported, Converter={StaticResource boolToVisibilityConverter}}"
Command="{x:Static sp:VSCommands.ExecuteCommand}" CommandParameter="Team.ConnecttoTeamFoundationServer" ImageNormal="pack://application:,,,/Microsoft.VisualStudio.Shell.StartPage;component/Images/StartPage/ConnectToTFS.png" ImageHover="pack://application:,,,/Microsoft.VisualStudio.Shell.StartPage;component/Images/StartPage/ConnectToTFSMouseOver.png" ImagePressed="pack://application:,,,/Microsoft.VisualStudio.Shell.StartPage;component/Images/StartPage/ConnectToTFSMouseDown.png">
</vs:ImageButton>
to hyperlinks:
<TextBlock Grid.Row="0"
Margin="10,2,15,2">
<Hyperlink Command="{x:Static sp:VSCommands.ExecuteCommand}"
CommandParameter="Team.ConnecttoTeamFoundationServer">
<TextBlock Text="Connect To Team Foundation Server"
FontSize="14"
Foreground="{StaticResource linkColor}"/>
</Hyperlink>
</TextBlock>
But the links are never enabled. I dropped in a button and wire it to the command, and it also is disabled. So the question is, what makes this command enabled?
If it's not broken, fix it until it is
|
|
|
|
|
You are trying to edit Visual Studio's start page?
I don't find any solid reason why to do so... Secondly, if you need help, please see the XMLNS for vs and look for what is provided there to make these buttons run. I would like to say, don't do it. Let it be the actual page.
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
Afzaal Ahmad Zeeshan wrote: I don't find any solid reason why to do so
I didn't ask you if you found a reason to do so.
Let me educate you a bit since you clearly don't know... Starting in VS 2010 MS introduced Start Page templates so developers could create their own start pages. It's a WPF user control and is easy to modify. But they did not provide templates for later versions of VS, so you have to use the 2010 template, which can be difficult.
Please, if you don't have a solution to the problem, don't responde.
If it's not broken, fix it until it is
|
|
|
|
|
I have to display a PDF file in a WPF form. What are the possible ways other than using adobe library.
|
|
|
|
|
Convert to XPS and use a DocumentViewer.
|
|
|
|
|
Thanks for the answer..
Could you please suggest any free libraries to convert PDF to XPS.
|
|
|
|
|
The easiest way to "convert" a PDF to XPS is to "print" the PDF; where one selects the "Microsoft XPS Document Writer" as the printer / driver.
The XPS printer driver is freely available, as are PDF readers / printers (e.g. Foxit).
|
|
|
|
|
Hi folks,
for some weeks now, I'm getting my head around an interesting problem: I'd like to display a text file of several gigs, and let it be editable.
Now - how would you do that? All standard approaches fail, because they rely on the file being fully loaded into RAM, which is impossible with several gigabytes of data. So, I thought I'll create a CustomControl. Basically, I've derived a Control from the Control class, which embeds a FrameworkElement in it's Generic.xaml. This FrameworkElement has a VisualCollection. Now, I hand over a Stream to this control. The Stream must be seekable and writable, otherwise you will encounter an exception. So far, I do the following: I read a chunk of data from the Stream, draw that using FormattedText on a DrawingContext, retrieved by a DrawingVisual. For scrolling, I simply adjust the offset of the FormattedText-function. To achieve seamless scrolling (which is needed, so you can scroll from one buffer chunk to the next without a visible gap), I have a function which calculates the amount of text that fits precisely into a rectangle (e.g. the Window's viewport), so that the rest of the current buffer, together with the next buffer, can be printed on the next rectangle.
But, for the sake of it, I can't find out how I would do standard editing functionality. Because, for the scrollbar and this "chunking" to work, one needs to precompute the needed amount of text to fill the rectangle, which changes when editing the text.
tl;dr:
Do you have a smart concept on hand, together with WPF and C#, to create a TextEditor, which is capable of editing gigabytes of text?
|
|
|
|
|
I'm curious, is there any text editor that will handle gb of data?
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Not really, at least for Windows. On the one hand, there is Large Text File Viewer, but that is hard to find at the moment. EmEditor is commercial Software, but disables word wrapping and some other options, afaik. And I don't think editing will work.
Then, there is HxD, a Hexeditor. It can even read your disk. That would be the last option, cause with a hex editor, you dont have to deal with line breaks etc. Everything can be set to fixed with. But that would be too easy.^^
A little bit easier to approach would be paging, I guess, instead of scrolling. But that is not so nice, but would be an Option, too.
|
|
|
|
|
Personally I would go for chaptering or chunking the physical data on the drive, split it up into edible volumes, store it and when print, ghu forbid, put it back together.
What sort of data is it that is gb big and requires editing? In a text editor!
Never underestimate the power of human stupidity
RAH
|
|
|
|
|