- geographicrepresentation.zip
- GeographicRepresentation
- bin
- Release
- GeographicRepresentation.Interfaces.dll
- GeographicRepresentation.Interfaces.pdb
- GeographicRepresentation.Lib.dll
- GeographicRepresentation.Lib.pdb
- GeographicRepresentation.TestLib.dll
- GeographicRepresentation.TestLib.pdb
- GeographicRepresentation.UILib.exe
- GeographicRepresentation.UILib.pdb
- GeographicRepresentation.UILib.vshost.exe
- GeographicRepresentation.UILib.vshost.exe.manifest
- Resources
- GeographicRepresentation.sln
- GeographicRepresentation.suo
- GeographicRepresentation.TestLib
- GeographicRepresentation.vsmdi
- Interfaces
- Lib
- LocalTestRun.testrunconfig
- TestResults
- UILib
|
<Grid x:Class="GeographicRepresentation.UILib.View.SelectedObjectView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:GeographicRepresentation.UILib.View"
>
<Grid.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="CommonViewDictionary.xaml" />
</ResourceDictionary.MergedDictionaries>
<DataTemplate x:Key="readOnlyContinentDataTemplate">
<DataTemplate.Resources>
<Style BasedOn="{StaticResource textBlockStyle}" TargetType="{x:Type TextBlock}" />
</DataTemplate.Resources>
<Grid VerticalAlignment="Top">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="200" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<TextBlock Text="Name" Grid.Column="0" Grid.Row="0" />
<TextBlock Text="{Binding Path=ContinentName}" Grid.Column="1" Grid.Row="0" />
<TextBlock Text="Number of countries" Grid.Column="0" Grid.Row="1" />
<TextBlock Text="{Binding Path=NumberOfCountries}" Grid.Column="1" Grid.Row="1" />
<TextBlock Text="Best city to be in" Grid.Column="0" Grid.Row="2" />
<TextBlock Text="{Binding Path=BestCityToBeIn}" Grid.Column="1" Grid.Row="2" />
</Grid>
</DataTemplate>
<DataTemplate x:Key="readOnlyCountryDataTemplate">
<DataTemplate.Resources>
<Style BasedOn="{StaticResource textBlockStyle}" TargetType="{x:Type TextBlock}" />
</DataTemplate.Resources>
<Grid VerticalAlignment="Top">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="200" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<TextBlock Text="Name" Grid.Column="0" Grid.Row="0" />
<TextBlock Text="{Binding Path=CountryName}" Grid.Column="1" Grid.Row="0" />
<TextBlock Text="Country size in square km" Grid.Column="0" Grid.Row="1" />
<TextBlock Text="{Binding Path=Size}" Grid.Column="1" Grid.Row="1" />
<TextBlock Text="Birth rate" Grid.Column="0" Grid.Row="2" />
<TextBlock Text="{Binding Path=BirthRate}" Grid.Column="1" Grid.Row="2" />
</Grid>
</DataTemplate>
<DataTemplate x:Key="readOnlyCityDataTemplate">
<DataTemplate.Resources>
<Style BasedOn="{StaticResource textBlockStyle}" TargetType="{x:Type TextBlock}" />
</DataTemplate.Resources>
<Grid VerticalAlignment="Top">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="200" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<TextBlock Text="Name" Grid.Column="0" Grid.Row="0" />
<TextBlock Text="{Binding Path=CityName}" Grid.Column="1" Grid.Row="0" />
<TextBlock Text="City population" Grid.Column="0" Grid.Row="1" />
<TextBlock Text="{Binding Path=Population}" Grid.Column="1" Grid.Row="1" />
<TextBlock Text="Time zone" Grid.Column="0" Grid.Row="2" />
<DockPanel Grid.Column="1" Grid.Row="2" HorizontalAlignment="Left">
<TextBlock Text="UTC " Margin="0,5,0,0"/>
<TextBlock Text="{Binding Path=TimeZone}" Margin="0,5,0,0" />
<TextBlock Text=":00" Margin="0,5,0,0" />
</DockPanel>
</Grid>
</DataTemplate>
<local:ReadOnlyObjectsDataTemplateSelector
x:Key="selector"
ContinentDataTemplate="{StaticResource readOnlyContinentDataTemplate}"
CountryDataTemplate="{StaticResource readOnlyCountryDataTemplate}"
CityDataTemplate="{StaticResource readOnlyCityDataTemplate}"
/>
</ResourceDictionary>
</Grid.Resources>
<Grid.RowDefinitions>
<RowDefinition />
</Grid.RowDefinitions>
<ContentControl ContentTemplateSelector="{StaticResource selector}" Content="{Binding}" />
</Grid>
|
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.