Ich möchte einen Tooltip mit Multibinding in einem Textblock machen, aber was auch immer ich versuche, es funktioniert nicht. HierWPF - ToolTip mit Multibinding
ist, was ich versucht habe, so weit:
<TextBlock Text="{Binding Description, StringFormat='Description : {0}{}'}">
<ToolTipService.ToolTip>
<TextBlock>
<TextBlock.Text>
<MultiBinding StringFormat="Description : {0}{1}{}">
<Binding Path="FirstDescription" />
<Binding Path="SecondDescription" />
</MultiBinding>
</TextBlock.Text>
</TextBlock>
</ToolTipService.ToolTip>
</TextBlock>
Aber wenn ich es versuchen, was ich auf dem Tooltip zu sehen ist: System.Windows.Controls.TextBlock.
, wenn ich es ohne tooltipservice versuchen, und nur Tooltip, wie folgt aus:
<TextBlock Text="{Binding Description, StringFormat='Description : {0}{}'}">
<ToolTip>
<TextBlock>
<TextBlock.Text>
<MultiBinding StringFormat="Description : {0}{1}{}">
<Binding Path="FirstDescription" />
<Binding Path="SecondDescription" />
</MultiBinding>
</TextBlock.Text>
</TextBlock>
</ToolTip>
</TextBlock>
Der Bildschirm bekommen nur stecken.
@Pachu ok Ich antwortete Ihnen über Klammern und fügen Sie ganzen Workong-Code hinzu. Hatten Sie nach dem Gebrauch noch Probleme? –
Ich tue, ich sehe den folgenden Text in der QuickInfo: "System.Windows.Controls.TextBlock" anstelle des gewünschten Textes. – Pachu
Leider kann ich Ihr Problem nicht reproduzieren. Ich habe leere Klammern gelöscht und nun funktioniert der Code einwandfrei. Welche Version von .net Framework verwenden Sie? Ist Ihr Beispiel ein Teil von Style/Template oder nicht? –