48 lines
1.9 KiB
XML
48 lines
1.9 KiB
XML
<!--
|
||
Dieses UserControl ist eine "Kachel" für ein einzelnes chemisches Element.
|
||
Es wird z. B. 118-mal innerhalb eines ItemsControl verwendet.
|
||
-->
|
||
<UserControl xmlns="https://github.com/avaloniaui"
|
||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||
x:Class="Project_Periodensystem.View.ElementTile"
|
||
Width="80" Height="100"> <!-- Feste Größe für eine Kachel -->
|
||
|
||
<!-- Rahmen um die Kachel -->
|
||
<Border Background="LightGray" <!-- Hintergrundfarbe (ggf. später dynamisch je nach Series) -->
|
||
BorderBrush="Black" <!-- Farbe des Rahmens -->
|
||
BorderThickness="1" <!-- Rahmendicke -->
|
||
CornerRadius="4" <!-- Abgerundete Ecken -->
|
||
Padding="4"> <!-- Innenabstand zum Rand -->
|
||
|
||
<!-- Inhalte werden vertikal zentriert angeordnet -->
|
||
<StackPanel HorizontalAlignment="Center">
|
||
|
||
<!-- 1. Zeile: Ordnungszahl (z. B. 1 für Wasserstoff) -->
|
||
<TextBlock Text="{Binding AtomicNumber}"
|
||
FontSize="12" />
|
||
|
||
<!-- 2. Zeile: Symbol (z. B. H für Wasserstoff), hervorgehoben -->
|
||
<TextBlock Text="{Binding Symbol}"
|
||
FontWeight="Bold"
|
||
FontSize="16" />
|
||
|
||
<!-- 3. Zeile: Element-Name (z. B. Wasserstoff) -->
|
||
<TextBlock Text="{Binding ElementName}"
|
||
FontSize="10" />
|
||
|
||
<!-- 4. Zeile: Atommasse -->
|
||
<TextBlock Text="{Binding AtomicWeight}"
|
||
FontSize="10" />
|
||
|
||
<!-- 5. Zeile: Elektronegativität -->
|
||
<TextBlock Text="{Binding Electronegativity}"
|
||
FontSize="10" />
|
||
|
||
<!-- 6. Zeile: Dichte -->
|
||
<TextBlock Text="{Binding Density}"
|
||
FontSize="10" />
|
||
|
||
</StackPanel>
|
||
</Border>
|
||
</UserControl>
|