Is it possible to add text to a round/circle button? I have the tooltip and background working, but I am not sure how to change the text on the button or if it is possible? What I am wanting to do is to dynaically change the string on the front of the button.
<
Style x:Key="CAButtonTemplate" TargetType="{x:Type igDP:CellValuePresenter}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type igDP:CellValuePresenter}">
<Button x:Name="CAButton" Content="" Style="{StaticResource CircleButton}" Width="20" Height="auto"
??????="{Binding DataItem.CA, Converter={StaticResource CAToStatusConverter}}"
Background ="{Binding DataItem.CA, Converter={StaticResource CAToColorConverter}}"
ToolTip ="{Binding DataItem.CA, Converter={StaticResource CAToToolTipConverter}}"/>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
Hello Jeff,
Thank you for your post!
From the code snippet, that you have provided in your initial post I see, that you are placing the button inside a cell of the XamDataGrid, since you are changing the template of the CellValuePresenter.
Currently the Text in a Button is set by using the Caption property of the Button. In the code snippet you are setting the Caption to an empty string. If you want to dynamically change the text of a button I can suggest setting the Caption property.
Please do not hesitate to let me know if you have any further questions on this matter.