Chris,
I'm actually attempting to customize an application created with the Silverlight Viewer, so the popup template is one that is already created. I've made some changes to it previously, so I'm fairly familiar with it; (very new to Silverlight) I've included the code for that template below. Do you think you can give me a few lines of code as an example, to get me started?
When you refer to a TypeIDField, do you mean the one that is the same for the entire layer? My TypeIDField is "SubtypeCD". Or do you mean the "ID" field that is different for each subtype?
Here's an example of what is shown at my endpoint:
Type ID Field: SubtypeCD
Types:
ID: 9
Name: Loopfeed
Domains:
Field Name: ENABLED
Inherited
ID: 3
Name: Vault
Domains:
Field Name: ENABLED
Inherited
I don't care about any of the inherited values; only about the names. (Loopfeed, etc.)
Below is my code for the popup template. (There were about 900 lines of code, so I've cut some out to make it a bit more concise.)
<Style x:Key="OnClickPopupContainerStyle" TargetType="Control">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Control">
<Grid x:Name="LayoutRoot" Height="300" Background="{TemplateBinding Background}" Width="300"
FlowDirection="{Binding Source={StaticResource RTLHelper}, Path=FlowDirection}">
<Grid.Resources>
<LinearGradientBrush x:Name="OpacityGradient" StartPoint="0,0.5" EndPoint="1,0.5">
<GradientStop Color="White" Offset="0" />
<GradientStop Color="#22FFFFFF" Offset="1" />
</LinearGradientBrush>
<extensibility:HasAttachmentsConverter x:Key="HasAttachmentsConverter" />
<Style x:Key="CloseButtonStyle" TargetType="Button">
.......
</Style>
.......
<extensibility:BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
<extensibility:NotNullVisibilityConverter x:Key="NotNullVisibilityConverter" />
</Grid.Resources>
<Grid.RowDefinitions>
<RowDefinition Height="30" />
<RowDefinition Height="Auto"/>
<RowDefinition Height="1"/>
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" MaxHeight="30" />
</Grid.RowDefinitions>
<Grid Margin="3,3,3,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" ></ColumnDefinition>
<ColumnDefinition Width="70"></ColumnDefinition>
</Grid.ColumnDefinitions>
<TextBlock Text="{Binding PopupItem.LayerName}" Grid.Row="0"
Foreground="{TemplateBinding Foreground}"
FontSize="13" FontWeight="Bold"
HorizontalAlignment="Left"
VerticalAlignment="Center"
TextTrimming="WordEllipsis">
<i:Interaction.Triggers>
.......
</i:Interaction.Triggers>
</TextBlock>
<StackPanel Grid.Column="1" HorizontalAlignment="Right" Orientation="Horizontal" Margin="0">
<StackPanel x:Name="PagerStack" HorizontalAlignment="Right" Orientation="Horizontal" Margin="0" Visibility="Collapsed" >
<Button >
<Button.RenderTransform>
<RotateTransform Angle="90" />
</Button.RenderTransform>
</Button>
<Button Style="{StaticResource ArrowButtonStyle}" Command="{Binding Next}"
Foreground="{TemplateBinding Foreground}" Cursor="Hand" RenderTransformOrigin="0.5,0.5"
Margin="0" Width="20" Height="20">
<Button.RenderTransform>
<RotateTransform Angle="270" />
</Button.RenderTransform>
</Button>
</StackPanel>
<Button Style="{StaticResource CloseButtonStyle}" Foreground="{TemplateBinding Foreground}" Cursor="Hand" Margin="10,0,0,0">
<i:Interaction.Triggers>
<i:EventTrigger EventName="Click">
<ei:ChangePropertyAction TargetObject="{Binding Container}" PropertyName="IsOpen" Value="false" />
</i:EventTrigger>
</i:Interaction.Triggers>
</Button>
</StackPanel>
</Grid>
<StackPanel Orientation="Horizontal" Grid.Row="1" Margin="12,0,0,2">
<TextBlock Text="{Binding SelectionDescription}" VerticalAlignment="Top" HorizontalAlignment="Left" Foreground="{TemplateBinding Foreground}" Visibility="{Binding Path=Visibility, ElementName=PagerStack}" />
<ContentControl Margin="5,0,0,0"
Template="{StaticResource ActivityIndicatorTemplate}"
HorizontalAlignment="Right" Visibility="{Binding InProgress,
Converter={StaticResource BooleanToVisibilityConverter}}" />
</StackPanel>
<Rectangle HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Row="2" Margin="0" OpacityMask="{StaticResource OpacityGradient}"
Fill="{TemplateBinding Foreground}" />
<ScrollViewer x:Name="AttributeContainer" HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto"
MinHeight="150" MaxHeight="300" MaxWidth="300" Grid.Row="3" BorderThickness="0"
Padding="0" BorderBrush="{TemplateBinding BorderBrush}" Foreground="{TemplateBinding Foreground}" Margin="5">
<Grid>
<ContentControl ContentTemplate="{Binding PopupItem.DataTemplate}" Content="{Binding}"
HorizontalAlignment="Stretch" HorizontalContentAlignment="Stretch" VerticalAlignment="Top"
Foreground="{TemplateBinding Foreground}" Background="{TemplateBinding Background}"
Visibility="{Binding PopupItem.DataTemplate, Converter={StaticResource NotNullVisibilityConverter}}" >
</ContentControl>
</Grid>
</ScrollViewer>
...
<ContentControl x:Name="PopupToolbarContainer"
DataContext="{Binding }"
Grid.Row="5"
Margin="2"
VerticalAlignment="Center"
HorizontalAlignment="Right" />
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
Thanks for the guidance thus far!