[Ironruby-core] Finding the mythical root_visual object in Gestalt
Jimmy.Schementi at microsoft.com
Sat Nov 28 19:23:57 EST 2009
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" <adam.burmister at gmail.com<mailto:adam.burmister at gmail.com>> wrote:
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:
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:
<script type="application/xml+xaml" width="200" height="50">
<UserControl xmlns="<http://schemas.microsoft.com/winfx/2006/xaml/presentation>http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="<http://schemas.microsoft.com/winfx/2006/xaml>http://schemas.microsoft.com/winfx/2006/xaml" Width="200" Height="50">
<Button x:Name="button1" Content="Button Text" />
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,
Ironruby-core mailing list
Ironruby-core at rubyforge.org<mailto:Ironruby-core at rubyforge.org>
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Ironruby-core