Hello.
I've written a similar post before.
At that time, there was not much warning output, so I didn't care.
But if I get a lot of Resource not found output, I've seen the design load slowly.
Also, the warning didn't come up when I made a general sample project.
When I use it as a module in another program, it happens.
I used [Row Number] of GridView for Telerik Demo.
I used an implicit style and found this in CellStyle.
The GirdViewCell implicit style is as follows, and all warnings are printed for the ResourceKey of telerik1.
<Style x:Key="GridViewCellStyle" TargetType="grid:GridViewCell">
<Setter Property="Template" Value="{StaticResource GridViewCellTemplate}"/>
<Setter Property="FontSize" Value="{telerik1:FluentResource ResourceKey=FontSize}"/>
<Setter Property="FontFamily" Value="{telerik1:FluentResource ResourceKey=FontFamily}"/>
<Setter Property="Background" Value="Transparent"/>
<Setter Property="BorderBrush" Value="{telerik1:FluentResource ResourceKey=BasicSolidBrush}"/>
<Setter Property="SelectedBackground" Value="{telerik1:FluentResource ResourceKey=PressedBrush}"/>
<Setter Property="CurrentBorderBrush" Value="{telerik1:FluentResource ResourceKey=IconBrush}"/>
<Setter Property="MouseOverBackground" Value="{telerik1:FluentResource ResourceKey=MouseOverBrush}"/>
<Setter Property="Padding" Value="5 0"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="HorizontalContentAlignment" Value="Stretch"/>
<Setter Property="SnapsToDevicePixels" Value="True"/>
<Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisualStyle}"/>
</Style>
If this is used, the above warning of the image is output.
<behaviour:GridViewRowNumber.CellStyle>
<Style TargetType="telerik:GridViewCell" BasedOn="{StaticResource GridViewCellStyle}">
<Setter Property="Background" Value="LightGray"/>
<Setter Property="TextBlock.TextAlignment" Value="Center"/>
</Style>
</behaviour:GridViewRowNumber.CellStyle>
However, if you find a property in an implicit style for this warning output and wrap it in style, it does not appear.
<behaviour:GridViewRowNumber.CellStyle>
<Style TargetType="telerik:GridViewCell" BasedOn="{StaticResource GridViewCellStyle}">
<Setter Property="Background" Value="LightGray"/>
<Setter Property="TextBlock.TextAlignment" Value="Center"/>
<Setter Property="FontSize" Value="12"/>
<Setter Property="FontFamily" Value="Segoe UI"/>
<Setter Property="BorderBrush" Value="Transparent"/>
<Setter Property="SelectedBackground" Value="Transparent"/>
<Setter Property="CurrentBorderBrush" Value="Transparent"/>
<Setter Property="MouseOverBackground" Value="Transparent"/>
</Style>
</behaviour:GridViewRowNumber.CellStyle>
Here I want to know two things.
first. When the program crashes and opens a window, is there a way to find and apply the implicit style again?
When loading the program, all styles are read, but when the window is opened, it is assumed that the warning will not occur if read again.
second. If there is no solution, please tell me where to set ValidationBrush, PrimaryBackgroundBrush, and FocusThickness.
Thanks.