The text of this article is not in this database — only its details are. Read it on the old site: XAML Label
1 Comment
Join the conversation! Your thoughts help the community grow.
Sign in to leave a comment.
The text of this article is not in this database — only its details are. Read it on the old site: XAML Label
Join the conversation! Your thoughts help the community grow.
Sign in to leave a comment.
kiran kumarPosted Jul 13, 2010, 11:02 AM
I have an issue with the forecolor of link label in wpf. Here is the template. When I select a row in the grid the first column which is Link label's text becoming blue. Because of that users can't read the text. Please let me know how do I change the forecolor of Link Label when a user click on the row. This is in WPF in winforms. < Grid Name="rootCanvas" OverridesDefaultStyle="True"> <Grid.RowDefinitions> <RowDefinition Height="Auto"/> <RowDefinition Height="*"/> </Grid.RowDefinitions> <Border BorderThickness="0" BorderBrush="{StaticResource ButtonBorderBrush}" Background="{StaticResource ScrollViewerBackgroundBrush}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Row="0" IsHitTestVisible="True"> <StackPanel Orientation="Vertical" Grid.Row="0"> <ComboBox Height="20" Margin="0,2,5,2" Name="bdListFilterComboBox" Width="100" HorizontalAlignment="Right" ItemTemplate="{StaticResource FilterListTemplate}" Foreground="{StaticResource DefaultForeground}" SelectionChanged="bdListFilterComboBox_SelectionChanged" /> </StackPanel> </Border> <Border BorderBrush="{StaticResource GreyBorderBrush}" Background="{StaticResource ScrollViewerBackgroundBrush}" Margin="0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Row="1"> <Grid> <controls:SortableListView Focusable="False" IsSynchronizedWithCurrentItem="True" Name="bdMeetingListView" Foreground="{StaticResource DefaultForeground}" BorderThickness="0" HorizontalAlignment="Stretch" HorizontalContentAlignment="Stretch" DependancyProperties:ListViewColumns.Stretch="true" ColumnHeaderSortedAscendingTemplate="HeaderTemplateArrowUp" ColumnHeaderSortedDescendingTemplate="HeaderTemplateArrowDown" ColumnHeaderNotSortedTemplate="HeaderTemplateTransparent" ListView.ItemContainerStyle="{DynamicResource ItemContainerStyle}" KeyboardNavigation.TabNavigation="Continue"> <ListView.View> <GridView AllowsColumnReorder="False" ColumnHeaderContainerStyle="{DynamicResource GridViewColumnHeaderStyle}"> <GridView.Columns> <!-- Title Column --> <controls:SortableGridViewColumn Width="180" Header="Title" SortPropertyName="BDMeeting.Header"> <GridViewColumn.CellTemplate> <DataTemplate> <controls:LinkLabel TextTrimming="CharacterEllipsis" Foreground="{StaticResource DefaultForeground}" LinkLabelBehavior="AlwaysUnderline" Command="local:BDMeetingCommands.OpenBDMeetingWindow" CommandParameter="{Binding}" ToolTip="{Binding Path=BDMeeting.Header}" Content="{Binding Path=BDMeeting.Header}"/> </DataTemplate> </GridViewColumn.CellTemplate> </controls:SortableGridViewColumn> <!-- Client Column --> <controls:SortableGridViewColumn Width="150" Header="Client" SortPropertyName="ClientListString"> <GridViewColumn.CellTemplate> <DataTemplate> <TextBlock TextTrimming="CharacterEllipsis" Text="{Binding Path=ClientListString}" ToolTip="{Binding RelativeSource={RelativeSource Self}, Path=Text}"/> </DataTemplate> </GridViewColumn.CellTemplate> </controls:SortableGridViewColumn> <!-- Client Attendee Column --> <controls:SortableGridViewColumn Width="150" Header="Client Attendee" SortPropertyName="ClientAttendeeString" > <GridViewColumn.CellTemplate> <DataTemplate> <TextBlock TextTrimming="CharacterEllipsis" Text="{Binding Path=ClientAttendeeString}" ToolTip="{Binding RelativeSource={RelativeSource Self}, Path=Text}"/> </DataTemplate> </GridViewColumn.CellTemplate> </controls:SortableGridViewColumn> <!-- Meeting Date Column --> <controls:SortableGridViewColumn Width="105" Header="Meeting Date" SortPropertyName="MeetingDateString"> <GridViewColumn.CellTemplate> <DataTemplate> <TextBlock TextTrimming="CharacterEllipsis" Text="{Binding Path=MeetingDateString}" ToolTip="{Binding RelativeSource={RelativeSource Self}, Path=Text}"/> </DataTemplate> </GridViewColumn.CellTemplate> </controls:SortableGridViewColumn> <!-- Complete By Column --> <controls:SortableGridViewColumn Width="105" Header="Complete By" SortPropertyName="CompletedByDateString"> <GridViewColumn.CellTemplate> <DataTemplate> <TextBlock TextTrimming="CharacterEllipsis" Text="{Binding Path=CompletedByDateString}" ToolTip="{Binding RelativeSource={RelativeSource Self}, Path=Text}"/> </DataTemplate> </GridViewColumn.CellTemplate> </controls:SortableGridViewColumn> <!-- Assigned To Column --> <controls:SortableGridViewColumn Width="Auto" Header="Assigned To" SortPropertyName="BDMeeting.AssignedTo.FullName"> <GridViewColumn.CellTemplate> <DataTemplate> <TextBlock TextTrimming="CharacterEllipsis" Text="{Binding Path=BDMeeting.AssignedTo.FullName}" ToolTip="{Binding RelativeSource={RelativeSource Self}, Path=Text}"/> </DataTemplate> </GridViewColumn.CellTemplate> </controls:SortableGridViewColumn> </GridView.Columns> </GridView> </ListView.View> </controls:SortableListView> <!-- No Results Message --> <TextBlock Name="resultsMessageTextBox" FontSize="14" Text="" HorizontalAlignment="Center" VerticalAlignment="Center"/> </Grid>