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

PathButton PathGeometry error Glyph has an incompatible type

3 Answers 46 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Don
Top achievements
Rank 1
Veteran
Don asked on 12 Oct 2020, 03:37 AM

I have a HeaderTemplate that contains two RadPathButtons.

One of the button's PathGeometry is defined in xaml:

PathGeometry="{telerik:RadGlyph Glyph=}"

 

The other one's PathGeometry is defined using the RadGlyph markup extension:

PathGeometry="{telerik:RadGlyph Glyph={StaticResource GlyphInvertColors}}"

 

When using the markup extension the Visual Studio 2019 (Preview) xaml editor shows error "The resource GlyphInvertColors has an incompatible type"

There are no errors when not using the markup extension.

In both cases it works perfectly at runtime. The errors only appear at Design time.

As of a day or two ago, these errors would disappear if I rebuilt the solution. But now they are persistent and never go away.

Here is the xaml I am using:

<telerik:RadWindow.HeaderTemplate>
    <DataTemplate>
        <DockPanel LastChildFill="False">
            <TextBlock DockPanel.Dock="Left" Text="{StaticResource ApplicationTitle}" VerticalAlignment="Center" Margin="0,0,8,0"/>
            <StackPanel DockPanel.Dock="Right" Orientation="Horizontal" FlowDirection="RightToLeft">
 
                <telerik:RadPathButton Style="{DynamicResource RadPathHeaderButtonStyle}"
                                       PathGeometry="{telerik:RadGlyph Glyph=}"
                                       Command="{Binding DataContext.ShowSettingsDialogCommand, ElementName=mainWindow}"
                                       CommandParameter="{Binding RelativeSource={RelativeSource AncestorType={x:Type telerik:RadWindow}}}"
                                       telerik:RadToolTipService.Placement="Mouse"
                                       telerik:RadToolTipService.VerticalOffset="1"
                                       telerik:RadToolTipService.ToolTipContent="Settings">
                    <telerik:RadToolTipService.ToolTipContentTemplate>
                        <DataTemplate>
                            <telerik:RadToolTipContentView>
                                <TextBlock Text="{Binding}" />
                            </telerik:RadToolTipContentView>
                        </DataTemplate>
                    </telerik:RadToolTipService.ToolTipContentTemplate>
                </telerik:RadPathButton>
 
                <telerik:RadPathButton Style="{DynamicResource RadPathHeaderButtonStyle}"
                                       PathGeometry="{telerik:RadGlyph Glyph={StaticResource GlyphInvertColors}}"
                                       Command="{Binding DataContext.TogglePaletteCommand, ElementName=mainWindow}">
                    <telerik:RadToolTipService.ToolTipContentTemplate>
                        <DataTemplate>
                            <telerik:RadToolTipContentView>
                                <TextBlock Text="{Binding}" />
                            </telerik:RadToolTipContentView>
                        </DataTemplate>
                    </telerik:RadToolTipService.ToolTipContentTemplate>
                </telerik:RadPathButton>
 
            </StackPanel>
        </DockPanel>
    </DataTemplate>
</telerik:RadWindow.HeaderTemplate>

 

I'm not certain this is actually an issue with the RadGlyph or RadPathButton. It could very well be a Visual Studio issue. Or, of course, it could be a mistake that I am making (maybe something missing or incorrect in my xaml or maybe I am missing a required dependency. Any ideas would be greatly appreciated.

3 Answers, 1 is accepted

Sort by
0
Don
Top achievements
Rank 1
Veteran
answered on 12 Oct 2020, 03:47 AM
I noticed that I am missing some xaml regarding the tooltip on the second button. However, the errors occur even with no tooltip code at all.
0
Dinko
Telerik team
answered on 14 Oct 2020, 01:32 PM

Hello Don,

Thank you for the provided details.

As the error appears in design time, can you try the steps described in this help article: Resolving Design Time Errors. Give this article a try and let me know if you were able to remove the error.

Regards,
Dinko
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

0
Don
Top achievements
Rank 1
Veteran
answered on 15 Oct 2020, 05:33 PM
Thank you for your reply Dinko. I tried the steps in that article but I still get the error. It is not a major issue though since using the "Glyph string value" works well and is just as easy to use.
Tags
General Discussions
Asked by
Don
Top achievements
Rank 1
Veteran
Answers by
Don
Top achievements
Rank 1
Veteran
Dinko
Telerik team
Share this question
or