我希望在标签内显示文本和图像。如何实现?
<toolkit:LabelledButton x:Name="Test"
AutomationProperties.AutomationId="TestBtn"
Margin="0,1,0,0" Height="56"
>
<toolkit:LabelledButton.Content>
<Rectangle Fill="{DynamicResource Icon_Test}" Margin="0,2,0,-5"/>
<!-- Content="{Binding TestParam}" **How do I set a text here and bind it to a property.** -->
</toolkit:LabelledButton.Content>
</toolkit:LabelledButton>
u在label的content属性中应具有面板控件,以容纳多个控件。
<toolkit:LabelledButton.Content>
<Grid>
<Rectangle Fill="{DynamicResource Icon_Test}" Margin="0,2,0,-5"/>
<ContentPresenter Content="{Binding Content}"/>
</Grid>
</toolkit:LabelledButton.Content>
U可以使用任何面板,在此示例中使用网格。