Is it possible to set the text as a link and when a user clicks on link I can run a routine?
Yes, this is possible with a custom template for the editor. You can find the default style for the XamTextEditor in the DefaultStyles\Editors\EditorsGeneric_Express.xaml and add Hyperlink as a content of the TextBlock that is used in the Template. Probably you will have to use some of the events on the hyperlink or disable edit mode of the grid because when you click the editor will enter edit mode by default.
Let me know if you have any questions or concerns.
Also, I set theme properity to [current] when I use style and change theme the control stays the same theme. Is there a way to add hyperlink and keep the ability to change theme?
Should I create a class and inherit XamTextEditor and set hyperlink in the custom class and will that retain theme features?
Thanks
I copied style from EditorsGeneric_Express.xamlto my app.xaml
Added Hyperlink to the content of the textblock:
<Hyperlink> <TextBlock Text="{TemplateBinding DisplayText}"/> </Hyperlink>
It shows correctly:
<igEditors:XamTextEditor Style="{DynamicResource Hyperlink}" Grid.Row="0" Grid.Column="1" Name="XamTextEditorPayAddrName" Value="{Binding Path=PaymentOfficeAddr.Name, Mode=OneWay}" IsReadOnly="True" Theme="[current]" Width="300" />
When I try to click on hyperlink it disappears and just shows text. It's going into edit mode I believe.
How do you disable edit mode? How do I set an event handler for the click event on the hyperlink?
can I do something like this <igEditors:XamTextEditor Style="{DynamicResource Hyperlink}" ... Click="clickHandler"/> or do I have to assign event handler in code?
Hmm, seems my question are rather more towards WPF concepts rather than your controls. Excuse my ignorance I appreciate greatly your help.
Thank you
Rick