views:

25

answers:

1

I'm working on a new WPF application and we've been experimenting with some attached / dependency properties and triggers to do some things in our XAML. The question came up the other day about the ease of editing xaml in an existing executable. Similar to an IL dump / injection, If someone could export xaml, edit it, and re-package it some of the UI behavior could be undesirably adjusted.

The question is, Is it possible?, and if so how easy is it?

(Is it a manner of a tool someone can download, or a lot of analysis & setup / recompiling / etc...)

A: 

There is a BAML viewer add-in for Red Gate's .NET Reflector that allows the viewing of BAML (compiled XAML) and dumping it. I'm sure from there it is a matter of editing and recompiling, not hard tasks, just time consuming.

There's also Snoop (a tool for inspecting XAML at runtime) and Mole (a Visual Studio debugger add-in for inspecting elements at runtime).

jgraves