'Error XDG0062 'System.Windows.Media.RectangleGeometry' is not a valid value for property 'Children'

I have strange error in the Visual Studio at line with <ControlTemplate TargetType="ItemsControl">

Error XDG0062 'System.Windows.Media.RectangleGeometry' is not a valid value for property 'Children'. I suspect that I don't see a control preview due to this error.

At runtime, everything looks OK. Should I worry about it, or ignore it? Maybe I should do something different?

<ItemsControl>
    <ItemsControl.Template>
        <ControlTemplate TargetType="ItemsControl">
            <Canvas x:Name="m_Canvas">
                <Canvas.Resources>
                    <RectangleGeometry x:Key="RectangleGeometry1">
                        <RectangleGeometry.Rect>
                            <MultiBinding Converter="{StaticResource MyRectConverter}">
                                <Binding Path="ActualWidth" ElementName="m_Canvas" />
                                <Binding Path="ActualHeight" ElementName="m_Canvas" />
                            </MultiBinding>
                        </RectangleGeometry.Rect>
                    </RectangleGeometry>

                    <RectangleGeometry x:Key="RectangleGeometry2">
                        <RectangleGeometry.Rect>
                            <MultiBinding Converter="{StaticResource MyRectConverter}">
                                <Binding Path="ActualWidth" ElementName="m_Canvas" />
                                <Binding Path="ActualHeight" ElementName="m_Canvas" />
                            </MultiBinding>
                        </RectangleGeometry.Rect>
                    </RectangleGeometry>
                </Canvas.Resources>

                <Path Fill="#35A500"
                      Opacity="0.15">
                    <Path.Data>
                        <GeometryGroup FillRule="EvenOdd">
                            <StaticResource ResourceKey="RectangleGeometry1" />
                            <StaticResource ResourceKey="RectangleGeometry2" />
                        </GeometryGroup>
                    </Path.Data>
                </Path>
            </Canvas>
        </ControlTemplate>
    </ItemsControl.Template>
</ItemsControl>


Solution 1:[1]

Use the ReportPrintTool class to create an instance of a report and immediately send it to a printer.

The Print a Report documentation offers sample code showing how to directly print a report using the ReportPrintTool.Print method. For instance:

    Dim report As New XtraReport1()
    Dim printTool As New ReportPrintTool(report))
    ' Invoke the Print dialog.
    printTool.PrintDialog()
    ' Send the report to the default printer.
    printTool.Print()

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Brendon