Reputation: 1441
iam trying to populate the HyperlinkButton.NavigateUri Property with a string from the properties... But i would like also to append some additional text to the string saved in the app property.
here is what i have: in the application property under the name Email i saved the following information: [email protected]
in window.xaml i have:
<TextBlock>
<Hyperlink NavigateUri="mailto:{Binding Source={x:Static my:Settings.Default}, Path=Email}?subject=Email From My App" RequestNavigate="Hyperlink_RequestNavigate">
<Run Text="Email ME!"/>
</Hyperlink>
</TextBlock>
Problem is:
mailto:{Binding Source={x:Static my:Settings.Default}, Path=Email}?subject=Email From My App"
How would i just join the string to be a valid NavigateUri Property ?
Thanks in advance
Upvotes: 0
Views: 1394
Reputation: 6882
You could take also advantage of a custom converter using the IValueConverter interface.
You would be more flexible because I saw that you are also setting the subject (and maybe other proberties).
So your Converter could do other fancy thinks and it would be clean plugable, just if you want to go more fancy =)...
Example of IValueConverter Interface... this has to be changed to bind to the proper case of course: http://msdn.microsoft.com/en-us/library/system.windows.data.ivalueconverter.aspx
HTH
Upvotes: 1