<Composite xmlns="http://www.eclipse.org/xwt/presentation" | |
xmlns:x="http://www.eclipse.org/xwt" | |
xmlns:j="clr-namespace:org.eclipse.xwt.tests.jface.comboviewer.collection" | |
x:Class="org.eclipse.xwt.tests.jface.comboviewer.collection.ComboViewer" | |
DataContext="{StaticResource myCompany}"> | |
<Composite.layout> | |
<GridLayout numColumns="2"/> | |
</Composite.layout> | |
<Composite.resources> | |
<j:Company x:Key="myCompany"> | |
<j:Company.employees> | |
<j:Employee Name="Thomas"/> | |
<j:Employee Name="Jin"/> | |
</j:Company.employees> | |
</j:Company> | |
</Composite.resources> | |
<ComboViewer name="ComboViewer" input="{Binding Path=employees}" bindingPath="name"> | |
<ComboViewer.control.layoutData> | |
<GridData horizontalAlignment="FILL" verticalAlignment="FILL" | |
grabExcessHorizontalSpace="true" grabExcessVerticalSpace="true"/> | |
</ComboViewer.control.layoutData> | |
</ComboViewer> | |
<Button name="Button" text="Add Person" SelectionEvent="addPerson" /> | |
</Composite> |