How to set a StringFormat in a textblock inside the AdornmentInfo?
I tried some alternatives, any works.
No works: Text="{Binding StringFormat={}{0:C}}"
No works: Text="{Binding StringFormat=${0:C}}"
No works: Text="{Binding Path=SomeNumber, ConverterCulture='en-US', StringFormat={} {0:C}}"
No works: Text="{Binding Path=Number, StringFormat={} {0:##.0}}"
I want to show this number: 300000000 in $300,000,000 in the adornmentInfo.
Thanks for help.
SIGN IN To post a reply.
5 Replies
SR
Samuel Rajadurai Edwin Rajamanickam
Syncfusion Team
May 12, 2016 11:54 AM UTC
Hi Tomas,
Thanks for contacting Syncfusion Support.
For applying required format, we need to apply the string format as like in the below code example.
Thanks for contacting Syncfusion Support.
For applying required format, we need to apply the string format as like in the below code example.
Code Snippet:
|
[XAML]
<DataTemplate x:Key="TextTemplate">
<TextBlock Background="Red" Text="{Binding YData,StringFormat=C0}" Padding="5"/>
</DataTemplate>
|
Demo sample: Column
For more information about the adornments, please refer the below documentation link.
TR
Tomas Raziel Garza Amaya
May 12, 2016 03:17 PM UTC
Thanks, its works
SR
Samuel Rajadurai Edwin Rajamanickam
Syncfusion Team
May 13, 2016 04:45 AM UTC
Hi Tomas,
We are glad that your requirement has been met.
Please let us know if you have any queries.
Regards,
Samuel
We are glad that your requirement has been met.
Please let us know if you have any queries.
Regards,
Samuel
Hi Tomas,
We are glad that your requirement has been met.
Please let us know if you have any queries.
Regards,
Samuel
Hi
can you help me?
as I can assign a specific value to a textblock, I'm using Diagramming of Syncfusion, but in the draft DiagramBuilder cannot assign a special value.
I am using wpf.
I teach them the code.
<!--Número de Escenario de Etiqueta-->
<DataTemplate x:Key="ndede">
<Viewbox Stretch="Fill">
<Grid>
<TextBlock Text="Número de Escenario de Etiqueta"></TextBlock>
</Grid>
</Viewbox>
</DataTemplate>
the name of the class is DiagramBuilderUI.xaml
Attachment: error_d7834f61.rar
KR
Keerthivasan Ramamoorthy
Syncfusion Team
September 23, 2016 08:55 AM UTC
Hi Fernando,
Requirement:” Need to Add text and change this text according to different SymbolItems”.
We have analyzed and achieved your requirement in DiagramBuilder. Please refer the code example as below.
Code Example:
|
Add your text into Content Property of the NodeViewModel.
Add ContentTemplate Property inside the NodeView Style.
In NodeVM.CS class, remove the Content= null from the ContentDummy Property.
|
Explanation:
We have used ContentTemplate Property to Display the Content of the NodeViewModel.
Note:
If the provided information not meet your requirement, please provide more details like sample/video to represent your requirement. This helps us to provide a prompt solution at the earliest.
Regards,
Keerthivasan R.
SIGN IN To post a reply.
- 5 Replies
- 4 Participants
-
TR Tomas Raziel Garza Amaya
- May 11, 2016 08:44 PM UTC
- Sep 23, 2016 08:55 AM UTC