# Finding the mythical root\_visual object in Gestalt

**URL:** <https://www.ruby-forum.com/t/finding-the-mythical-root-visual-object-in-gestalt/179460>\
**Category:** IronRuby\
**Created:** [November 25, 2009, 3:12pm UTC](https://www.ruby-forum.com/t/finding-the-mythical-root-visual-object-in-gestalt/179460 "2009-11-25T15:12:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Adam\_Burmister](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/b3f665/32.png) [@Adam\_Burmister](https://www.ruby-forum.com/u/Adam_Burmister)\
**Post date:** [November 25, 2009, 3:12pm UTC](https://www.ruby-forum.com/t/finding-the-mythical-root-visual-object-in-gestalt/179460/1 "2009-11-25T15:12:17Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Adam\_Burmister](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/b3f665/32.png) [@Adam\_Burmister](https://www.ruby-forum.com/u/Adam_Burmister)\
**Post date:** [November 29, 2009, 1:27am UTC](https://www.ruby-forum.com/t/finding-the-mythical-root-visual-object-in-gestalt/179460/2 "2009-11-29T01:27:41Z")

</div>

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”  
\<removed\_email\_address@domain.invalid[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)\> 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  
removed\_email\_address@domain.invalid[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
[http://rubyforge.org/mailman/listinfo/ironruby-core](http://rubyforge.org/mailman/listinfo/ironruby-core)
