I have:
<CustomControl:GridControl ShowCustomGridLines="True" Grid.Column="2" Grid.Row="0"> <Grid.ColumnDefinitions> <ColumnDefinition /> </Grid.ColumnDefinitions> <Grid.RowDefinitions> <RowDefinition /> <RowDefinition /> </Grid.RowDefinitions> <TextBlock Grid.Column="0" Grid.ColumnSpan="3" Grid.Row="0" HorizontalAlignment="Center" VerticalAlignment="Center" Name="txbCaption" Text="{Binding Caption}" /> <CustomControl:GridControl ShowCustomGridLines="True" Grid.Column="2" Grid.Row="1"> <Grid.ColumnDefinitions> <ColumnDefinition /> <ColumnDefinition /> <ColumnDefinition /> </Grid.ColumnDefinitions> <Grid.RowDefinitions> <RowDefinition /> </Grid.RowDefinitions> <TextBlock Grid.Column="0" Grid.Row="1" Text="" HorizontalAlignment="Center" VerticalAlignment="Center" /> <TextBlock Grid.Column="1" Grid.Row="1" Text="" HorizontalAlignment="Center" VerticalAlignment="Center" Background="Yellow" /> <TextBlock Grid.Column="2" Grid.Row="1" Text="%" HorizontalAlignment="Center" VerticalAlignment="Center" /> </CustomControl:GridControl>
I want to set the background of a TextBox cell (where Background = "Yellow"). Setting the background for the TextBox does not help, because I need to set the background color for the entire cell, even if the text is missing.
How can I do that?
background wpf xaml
Cynede
source share