BAML Decompiler / Viewer - wpf

Could anyone recommend a good BAML Decompiler / Viewer besides BAML Viewer plugin for Reflector, which doesn't handle path geometry/data?

You might like to have another look at the BAML addin for reflector as it's been recently updated by Andrew Smith. Have a look at his at blog post you'll note that he has fixed the issue with path data.

You can try this one by Cristian Ricciolo Civera.
I did not want to use its ClickOnce installer, but the CodePlex site provides a zip file for download.
I had to place Ricciolo.StylesExplorer.exe and Ricciolo.StylesExplorer.MarkupReflection.dll into GAC to make it work. I guess that is what the installation does in the first place.

BAML source can be viewed in
ILSpy.
Just load your compiled managed code, find and click on the *.baml file you will see the source.

styles explorer
Haven't tried it myself yet but worth a try

Related

Accessing Spire.PdfViewer.Wpf.dll via Nuget

I am working with Spire.PdfViewer for a WPF Application.
After downloading the package, the Spire.PdfViewer.Wpf.dll should be found in the bin folder of my project. Unfortunately I'm not able to find the library on my network.
The documentation is found under this link:
http://www.e-iceblue.com/Tutorials/Spire.PDFViewer/Demos/Quick-guide/WPF-How-to-add-Controls-to-Toolbox.html
Thank you
According to the description for Spire.PDFViewer NuGet package on the official site, it mentioned that “With Spire.PDFViewer, developers can create any WinForms application to open, view and print PDF document in C# and Visual Basic on .NET”. It is a free version for .NET.
For the version for WPF, you need to buy download the Spire.PDFViewer Pack from below link, which contains Spire.PDFViewer for WPF components.
http://www.e-iceblue.com/Introduce/word-viewer-wpf-introduce.html#.V8Uzrih94z4
After installing, please choose the Spire.PdfViewer.Wpf.dll from C:\Program Files (x86)\e-iceblue\Spire.PdfViewer\Bin\WPF4.0. Then you can add PDFViewer controls into Toolbox.

Is there a Silverlight Decompiler Available?

Is there any silverlight decompiler available?
Nothing specific to my knowledge, but you can open the xap file (it's just a zip file) and use Reflector to decompile the dlls.
JetBrains have made DotPeek available. It is currently free (hope it stays that way, unlike .Net Reflector).
It will also convert Silverlight DLLs all the way back to readable source code! I have tried it on several SL projects and it works like a charm.
**Note: as of the time of this writing it still gets a couple of things wrong: string concatenations and event handlers generate the wrong code.*
XAPs are just zip files, so you can crack them open and decompile the code using Reflector. Also, it's worth taking a look at Silverlight Spy.
It's all .Net so you can just use Reflector

Hosting Flash movie in a WPF project

I want to host a SWF (Flash animation) in a WPF project.
I searched Google and found something. I tried that technique but had some troubles.
In this article, it says:
**Then, as mentioned in this posting, it is necessary to run AxImp.exe from
the .net sdk on the Flash ocx to
generate following files.
1. AxShockwaveFlashObjects.dll
AxShockwaveFlashObjects.pdb
ShockwaveFlashObjects.dll
AxShockwaveFlashObjects.cs In Visual
Studio, add the references to the
AxShockwaveFlashObjects.dll and
ShockwaveFlashObjects.dll generated
by aximp**
But I couldn't understand this. Can anyone write it out step by step? I am new to WPF.
you could look at the WebBrowser class. then have your flash on a html page that the browser control is pointed at.
Busra, take a look at AxShockwaveFlashObjects and ShockwaveFlashObjects from Flash ocx
I think that has what you are looking for.
Essentially, you need to open a dos prompt, and run
C:\Windows\SysWOW64\Macromed\Flash>"c:\Program Files (x86)\Microsoft SDKs\Window
s\v7.0A\Bin\aximp.exe" Flash10n.ocx /nologo
Generated Assembly: C:\Windows\SysWOW64\Macromed\Flash\ShockwaveFlashObjects.dll
Generated Assembly: C:\Windows\SysWOW64\Macromed\Flash\AxShockwaveFlashObjects.d
ll
Keeping in mind, you're paths may very by if your machine is 32bit, and on where the visual studio sdk is installed on your machine.
#Blounty, I don't think that was his intent. He wants to run the actual flash file inside his WPF application.

Get code from Silverlight publish?

Is there a way to get the code from a Silverlight publish?
My laptop has completely crashed, and the only thing I have left from my application, is the published website.
Is there a tool or something to get the code from my application?
You can rename the xap to zip, extract it, and use Reflector to pull out the code. It won't recover it exactly or recover the XAML though. As far as I know there's no way to reverse engineer XAML.
Edit: +1 for Shawn for pointing out that the XAML is stored as plaintext resources, so you can recover that too. Not quite sure why it does that, but hey, it's good news :-)
Using .NET Reflector you can can all the XAML. It's stored as resources in plain text.
Try Silverlight Spy. It's a great tool for debugging Silverlight. If you use it in combination with .NET Reflector you can view the decompiled code of any running Silverlight application.
BTW, here are all features of Silverlight Spy.
JetBrains have made DotPeek available. It is currently free (I hope it stays that way, unlike .NET Reflector).
It will also convert Silverlight DLL files all the way back to readable source code! I have tried it on several Silverlight projects, and it works like a charm.
**Note: as of the time of this writing it still gets a couple of things wrong: string concatenations and event handlers generate the wrong code.*

Disassembling WPF4 beta2 DLLs with Reflector

I'm trying to disassemble some of the DLL of the new WPF4 Beta2 framework. However, all I have is empty methods for all types. I'm not having this problem for other DLL (for example mscorlib).
Do you have any idea what is causing this behavior ? Is this anything to do with type forwarding (I know that some WPF types have moved in System.Xaml.dll).
Actually I found the problem (however I don't really understand it...), I was not using the right DLL.
I was using DLL in C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.0 whereas I should use C:\Windows\Microsoft.NET\Framework\v4.0.21006\WPF
I personally am not sure, but Red-Gate does have a group they watch for Reflector:http://www.red-gate.com/messageboard/viewforum.php?f=85 you might try posting there if you don't hear anything back soon.
I would imagine that the problem is the fact that this relies on some of the new features of .NET 4.0. Support for these has just been added to the latest early access build of Reflector, which you can download from here:
http://www.red-gate.com/messageboard/viewtopic.php?t=10835

Resources