Finding the mythical root_visual object in Gestalt

Hi all,

I’m currently writing about Gestalt using the 1.0 release. The best
documentation I can find for it is the PDF “sl-back-to-just-text.pdf”,
by Jimmy, which states:

"XAML accessors
root_visual maps to System.Windows.Application.Current.RootVisual …
When a method is called that does not exist on root_visual, then
FindName(methodName) is called. This allows access to any XAML elements
with an x:Name value…

root_visual.Message.Text = “New Message”
"

This is the code that I’m using to try and experiment with this:

I cannot find this object placed anywhere I would expect; at least it’s
not as easily available as the documentation leads me to believe.

Can anyone throw some light onto what I’m doing wrong, or if there has
been a change in the way this works?

Thank you kindly,
Adam Burmister

I can add the “root_visual” variable; the current implementation only
defines “me” and “xaml”, which do exactly what “root_visual” would do.
Unfortunately the implementation doesn’t quite match the spec at the
moment (I’m not sure why they called it 1.0 =P).

On Nov 25, 2009, at 9:12 AM, “Adam Burmister”
<[email protected]mailto:[email protected]> wrote:

Hi all,

I’m currently writing about Gestalt using the 1.0 release. The best
documentation I can find for it is the PDF “sl-back-to-just-text.pdf”,
by Jimmy, which states:

"XAML accessors
root_visual maps to System.Windows.Application.Current.RootVisual …
When a method is called that does not exist on root_visual, then
FindName(methodName) is called. This allows access to any XAML elements
with an x:Name value…

root_visual.Message.Text = “New Message”
"

This is the code that I’m using to try and experiment with this:

I cannot find this object placed anywhere I would expect; at least it’s
not as easily available as the documentation leads me to believe.

Can anyone throw some light onto what I’m doing wrong, or if there has
been a change in the way this works?

Thank you kindly,
Adam Burmister


Ironruby-core mailing list
[email protected]mailto:[email protected]
http://rubyforge.org/mailman/listinfo/ironruby-core