|
<UserControl x:Class="WpfApplication1.<#= DataContract.Name #>Control"
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-->
<#
foreach(DataMember dataMember in DataContract.DataMembers)
{
#>
<RowDefinition Height="50"/>
<#
}
#>
</Grid.RowDefinitions>
<#
int index = 0;
foreach(DataMember dataMember in DataContract.DataMembers)
{
#>
<Label Content="<#= dataMember.Name #>" Height="25" Grid.Column="0" Grid.Row="<#= index #>" Foreground="White"/>
<TextBox Text="{Binding Path=<#= dataMember.Name #>, Mode=TwoWay}" Height="25" Grid.Column="1" Grid.Row="<#= index #>" />
<!-- if Data Member is not Nullable then -->
<#
if(dataMember.WPFMold.IsNullable == "False")
{
#>
<Label Content="*" Foreground="Red" Grid.Column="2" Grid.Row="<#= index #>" />
<#
}
index++;
}
#>
</Grid>
<Grid Grid.Column="0" Grid.Row="1">
<InfragisticControls:XamDataGrid x:Name="MyGrid" CellActivated="MyGrid_CellActivated" Theme="<#= DataContract.WPFMold.GridTheme #>"/>
</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.