If I were you I would implement a converter that produced the desired string based on the node data, along with a mouse click event handler for the whole TextBlock (not just the “<<” or “>>”) that would toggle the behavior of the converter.
That would keep the information up-to-date if the data property changed, and makes it easier for users to toggle the amount that is shown.
As per your suggestion I have added converter and now at first time when description is greater than 10 character then it's showing description in correct format.Since we have to show full description on click of current description text withâ€<
<go:NodePanel Sizing="Auto"
go:Node.LinkableFrom="{Binding Path=AllowLink, Source={StaticResource graphControlBindingSettings}}"
go:Node.LinkableTo="{Binding Path=AllowLink, Source={StaticResource graphControlBindingSettings}}"
>
<Path go:NodePanel.Figure="Rectangle" Fill="{Binding Path=Data.NodeColor}" />
<StackPanel>
<TextBlock Text="{Binding Path=Data.InnerTermData.Name, Converter={StaticResource graphNodeDescLengthConvertor}}" MinWidth="130" MaxWidth="130" TextWrapping="Wrap"
HorizontalAlignment="Left" Visibility="{Binding Data.DescriptionVisibility}" KeyDown="txtGraphNodeDesc_KeyDown" KeyUp="txtGraphNodeDesc_KeyUp"/>
<StackPanel Orientation="Horizontal" Visibility="{Binding Data.IdVisibility}">
<TextBlock Text="{Binding Text,ElementName=txtblkId}"/>
<TextBlock Text="{Binding Path=Data.InnerTermData.PK}"/>
</StackPanel>
<StackPanel Orientation="Horizontal" Visibility="{Binding Data.SynonymVisibility}">
<TextBlock Text="{Binding Text,ElementName=txtblkSynonym}" Width="30"/>
<TextBlock Text="{Binding Path=Data.InnerTermData.Synonym}" Foreground="Blue" TextWrapping="Wrap" MinWidth="100" MaxWidth="100"/>
</StackPanel>
</StackPanel>
</go:NodePanel>
Can you please suggest why the event is not triggering?
Can you please provide any sample what exactly should i do?
Don’t you want the MouseLeftButtonDown event instead of a keyboard event?
we can’t use MouseLeftButtonDown.
I tried this event but it's creating problem for our existing functionality. Since we have drag and drop feature for our node also.
can we have">>" and "<<" as button and add their click event?
If yes then please send sample for that.
Note: if description is less than 10 character then we will not have "<>" button so our button should also create run time based on condition
At this moment I have way too many people asking for help, so I cannot produce this code for you.
But I think it is pretty easy to add a Button that does what you want and is visible only when you want.