This is a migrated thread and some comments may be shown as answers.

GridViewHyperlinkColumn

4 Answers 19 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Maya
Top achievements
Rank 1
Maya asked on 18 Apr 2016, 09:32 AM
Hello, 
How can I set foreground property for cells of GridViewHyperlinkColumn in xaml ?
Thank you in advance,
Maya

4 Answers, 1 is accepted

Sort by
0
Yoan
Telerik team
answered on 18 Apr 2016, 01:10 PM
Hello Maya,

GridViewHyperlinkColumn creates a regular Hyperlink element for its content, so you can use the following style:
<Style TargetType="Hyperlink">
            <Setter Property="Foreground" Value="Red"/>
        </Style>


Regards,
Yoan
Telerik
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
0
Maya
Top achievements
Rank 1
answered on 20 Apr 2016, 11:26 AM

Hello,

unfortunately it didn't work for me. Below is the relevant snippet from xaml:

<telerik:GridViewHyperlinkColumn  DataMemberBinding="{Binding LibraryPath}">

<telerik:GridViewHyperlinkColumn.Header>

<Label x:Uid="Label_Path" Content="Path" Foreground="White" />

</telerik:GridViewHyperlinkColumn.Header>

<Style TargetType="Hyperlink">
            <Setter Property="Foreground" Value="Red"/>
        </Style>

</telerik:GridViewHyperlinkColumn>

Error: The type GridViewHyperlinkColumn does not support direct content

0
Yoan
Telerik team
answered on 20 Apr 2016, 12:57 PM
Hello,

Indeed, GridViewHyperlinkColumn does not support direct content. You can define the style within the Window resources. Please check this help article for a reference.

Regards,
Yoan
Telerik
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
0
Maya
Top achievements
Rank 1
answered on 21 Apr 2016, 09:38 AM
Thank you very much. The article helped me to solve the problem
Tags
General Discussions
Asked by
Maya
Top achievements
Rank 1
Answers by
Yoan
Telerik team
Maya
Top achievements
Rank 1
Share this question
or