Moderators: Konstantin.Scheglov, gnebling, Alexander.Mitin, jwren, Eric Clayberg
<Shell xmlns="http://www.eclipse.org/xwt/presentation" xmlns:x="http://www.eclipse.org/xwt" x:Class="test.Example2" text="XWT Application" layout="{x:Null}">
<MyText control="{Binding ElementName=label} bounds="10, 10, 76, 19"/>
<Label text="New Label" bounds="10, 76, 49, 13"/>
</Shell>
<Shell xmlns="http://www.eclipse.org/xwt/presentation" xmlns:x="http://www.eclipse.org/xwt" x:Class="test.Application_3" text="XWT Application" layout="{x:Null}" xmlns:p1="clr-namespace:test">
<Label text="New Label" x:Name="label" bounds="10, 76, 49, 13"/>
<p1:MyText control="{Binding ElementName=label}" bounds="10, 10, 142, 44"/>
</Shell>
<Shell xmlns="http://www.eclipse.org/xwt/presentation" xmlns:x="http://www.eclipse.org/xwt" x:Class="it.test.Example2" text="XWT Application" layout="{x:Null}" xmlns:p1="clr-namespace:mydesign">
<Label text="New Label" x:Name="label" bounds="10, 76, 49, 13"/>
<p1:MyText myProperty="{Binding ElementName=label}" bounds="10, 10, 76, 19"/>
</Shell>
<Shell xmlns="http://www.eclipse.org/xwt/presentation" xmlns:x="http://www.eclipse.org/xwt" x:Class="it.test.Example2" text="XWT Application" layout="{x:Null}" xmlns:p1="clr-namespace:mydesign">
<p1:MyText myProperty="{Binding ElementName=label}" bounds="10, 10, 76, 19"/>
<Label text="New Label" x:Name="label" bounds="10, 76, 49, 13"/>
</Shell>
domfe wrote:This don't works because the object Label isn't in memory when XWT calls setMyProperty.
domfe wrote:I don't see why you have disabled a features already present in the editor.
Or do you only intend to reference controls defined prior to the current control?
private Label myProperty;
...
public void setMyProperty(Label myProperty) {
this.myProperty = myProperty;
}
public Label getMyProperty() {
return myProperty;
}
<Shell xmlns="http://www.eclipse.org/xwt/presentation" xmlns:x="http://www.eclipse.org/xwt" x:Class="test.Example2" text="XWT Application" xmlns:p1="clr-namespace:test">
<Shell.layout>
<RowLayout/>
</Shell.layout>
<p1:MyComponent/>
<Button text="Double click me!"/>
</Shell>
Users browsing this forum: Bing [Bot] and 1 guest