Ich möchte (bzw. habe es schon gemacht) ein einfaches UserControl erstellen:
Das Control findet Verwendung im Fenster:
Allerdings wird hier der Content vom Label "Stammdaten aktiv | deaktiv "nicht angezeigt. Das Image wird angezeigt.
Was mache ich falsch?
XML-Quellcode
-
- <UserControl x:Class="ToolTip_UserControl"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:local="clr-namespace:CLIENTVISION"
- mc:Ignorable="d"
- Height="Auto"
- Width="Auto">
- <StackPanel Orientation="Horizontal" VerticalAlignment="Center">
- <Image Source="/CLIENTVISION;component/images/png/007.png" Stretch="Uniform" Height="15" Width="15"/>
- <Label Margin="10 0 10 0" Foreground="Gray" Content="{Binding ToolTip, ElementName=ToolTip_UserControl}"/>
- </StackPanel>
- </UserControl>
Das Control findet Verwendung im Fenster:
Allerdings wird hier der Content vom Label "Stammdaten aktiv | deaktiv "nicht angezeigt. Das Image wird angezeigt.
Was mache ich falsch?