|
<UserControl x:Class="WpfApplication1.ProductsControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:InfragisticControls="http://infragistics.com/DataPresenter"
Height="400" Width="550" Loaded="UserControl_Loaded" Background="#1e1e1e">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="150" />
</Grid.RowDefinitions>
<Grid x:Name="ControlsGrid" Grid.Column="0" Grid.Row="0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="120" />
<ColumnDefinition Width="300" />
<ColumnDefinition Width="30" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<!--Add Row For Each Data Member in this Data Contract-->
<RowDefinition Height="50"/>
<RowDefinition Height="50"/>
<RowDefinition Height="50"/>
<RowDefinition Height="50"/>
<RowDefinition Height="50"/>
<RowDefinition Height="50"/>
<RowDefinition Height="50"/>
<RowDefinition Height="50"/>
<RowDefinition Height="50"/>
<RowDefinition Height="50"/>
</Grid.RowDefinitions>
<Label Content="CategoryID" Height="25" Grid.Column="0" Grid.Row="0" Foreground="White"/>
<TextBox Text="{Binding Path=CategoryID, Mode=TwoWay}" Height="25" Grid.Column="1" Grid.Row="0" />
<!-- if Data Member is not Nullable then -->
<Label Content="Discontinued" Height="25" Grid.Column="0" Grid.Row="1" Foreground="White"/>
<TextBox Text="{Binding Path=Discontinued, Mode=TwoWay}" Height="25" Grid.Column="1" Grid.Row="1" />
<!-- if Data Member is not Nullable then -->
<Label Content="*" Foreground="Red" Grid.Column="2" Grid.Row="1" />
<Label Content="ProductID" Height="25" Grid.Column="0" Grid.Row="2" Foreground="White"/>
<TextBox Text="{Binding Path=ProductID, Mode=TwoWay}" Height="25" Grid.Column="1" Grid.Row="2" />
<!-- if Data Member is not Nullable then -->
<Label Content="*" Foreground="Red" Grid.Column="2" Grid.Row="2" />
<Label Content="ProductName" Height="25" Grid.Column="0" Grid.Row="3" Foreground="White"/>
<TextBox Text="{Binding Path=ProductName, Mode=TwoWay}" Height="25" Grid.Column="1" Grid.Row="3" />
<!-- if Data Member is not Nullable then -->
<Label Content="*" Foreground="Red" Grid.Column="2" Grid.Row="3" />
<Label Content="QuantityPerUnit" Height="25" Grid.Column="0" Grid.Row="4" Foreground="White"/>
<TextBox Text="{Binding Path=QuantityPerUnit, Mode=TwoWay}" Height="25" Grid.Column="1" Grid.Row="4" />
<!-- if Data Member is not Nullable then -->
<Label Content="ReorderLevel" Height="25" Grid.Column="0" Grid.Row="5" Foreground="White"/>
<TextBox Text="{Binding Path=ReorderLevel, Mode=TwoWay}" Height="25" Grid.Column="1" Grid.Row="5" />
<!-- if Data Member is not Nullable then -->
<Label Content="SupplierID" Height="25" Grid.Column="0" Grid.Row="6" Foreground="White"/>
<TextBox Text="{Binding Path=SupplierID, Mode=TwoWay}" Height="25" Grid.Column="1" Grid.Row="6" />
<!-- if Data Member is not Nullable then -->
<Label Content="UnitPrice" Height="25" Grid.Column="0" Grid.Row="7" Foreground="White"/>
<TextBox Text="{Binding Path=UnitPrice, Mode=TwoWay}" Height="25" Grid.Column="1" Grid.Row="7" />
<!-- if Data Member is not Nullable then -->
<Label Content="UnitsInStock" Height="25" Grid.Column="0" Grid.Row="8" Foreground="White"/>
<TextBox Text="{Binding Path=UnitsInStock, Mode=TwoWay}" Height="25" Grid.Column="1" Grid.Row="8" />
<!-- if Data Member is not Nullable then -->
<Label Content="UnitsOnOrder" Height="25" Grid.Column="0" Grid.Row="9" Foreground="White"/>
<TextBox Text="{Binding Path=UnitsOnOrder, Mode=TwoWay}" Height="25" Grid.Column="1" Grid.Row="9" />
<!-- if Data Member is not Nullable then -->
</Grid>
<Grid Grid.Column="0" Grid.Row="1">
<InfragisticControls:XamDataGrid x:Name="MyGrid" CellActivated="MyGrid_CellActivated" Theme="Onyx"/>
</Grid>
</Grid>
</UserControl>
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
Program Manager in Sculpture project, Interesting in .NET Model driven development.