|
<UserControl x:Class="WpfApplication1.CategoriesControl"
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"/>
</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="*" Foreground="Red" Grid.Column="2" Grid.Row="0" />
<Label Content="CategoryName" Height="25" Grid.Column="0" Grid.Row="1" Foreground="White"/>
<TextBox Text="{Binding Path=CategoryName, 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="Description" Height="25" Grid.Column="0" Grid.Row="2" Foreground="White"/>
<TextBox Text="{Binding Path=Description, Mode=TwoWay}" Height="25" Grid.Column="1" Grid.Row="2" />
<!-- if Data Member is not Nullable then -->
<Label Content="Picture" Height="25" Grid.Column="0" Grid.Row="3" Foreground="White"/>
<TextBox Text="{Binding Path=Picture, Mode=TwoWay}" Height="25" Grid.Column="1" Grid.Row="3" />
<!-- if Data Member is not Nullable then -->
</Grid>
<Grid Grid.Column="0" Grid.Row="1">
<InfragisticControls:XamDataGrid x:Name="MyGrid" CellActivated="MyGrid_CellActivated" Theme="Aero"/>
</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.