1

我尝试将 GanttView 添加到 ChildWindow 并获取 Error HRESULT E_FAIL has been returned from a call to a component

我什么都没做,只是添加了 GanttView 控件,下面是我的代码。

<controls:ChildWindow.Resources>
    <viewmodel:ISizeConvertr x:Name="SizeConvertr"/>
    <viewmodel:IDateTimeConvertr x:Name="DateTimeConvertr"/>
</controls:ChildWindow.Resources>
<controls:ChildWindow.DataContext>
    <viewmodel:PlanningInfoGanttWindowModel x:Name="planningInfoGanttWindowModel"></viewmodel:PlanningInfoGanttWindowModel>
</controls:ChildWindow.DataContext>
<i:Interaction.Triggers>
    <i:EventTrigger EventName="Loaded">
        <i:InvokeCommandAction Command="DataLoadCommand"></i:InvokeCommandAction>
    </i:EventTrigger>
</i:Interaction.Triggers>
<ScrollViewer ScrollViewer.VerticalScrollBarVisibility="Auto" ScrollViewer.HorizontalScrollBarVisibility="Disabled">
    <Grid x:Name="LayoutRoot" Margin="2" ScrollViewer.VerticalScrollBarVisibility="Auto">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="1*" />
            <ColumnDefinition Width="1*" />
            <ColumnDefinition Width="1*" />
            <ColumnDefinition Width="1*" />
            <ColumnDefinition Width="1*" />
            <ColumnDefinition Width="1*" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="35"/>
            <RowDefinition Height="35"/>
        </Grid.RowDefinitions>
        <sdk:TabControl Grid.Column="0" Grid.ColumnSpan="6" Grid.Row="3" MinHeight="300">
            <sdk:TabItem Header="Plans">
                <Border Grid.Row="5" Grid.Column="0" Grid.ColumnSpan="6" Margin="2,5" Style="{StaticResource CornerBorderStyle}">
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="5*"></ColumnDefinition>
                            <ColumnDefinition Width="1*"></ColumnDefinition>
                        </Grid.ColumnDefinitions>
                          <telerik:RadGanttView ></telerik:RadGanttView>
                    </Grid>

                </Border>
            </sdk:TabItem>
        </sdk:TabControl>
    </Grid>
</ScrollViewer>

谁来帮帮我?

4

0 回答 0