TabControl不显示我的DataTemplate

时间:2016-04-05 16:11:50

标签: .net wpf xaml user-interface c#-4.0

我有这个XAML:

<max:MaxUserControl.Resources>
    <BooleanToVisibilityConverter x:Key="BoolToVisConverter"/>

    <DataTemplate x:Key="tbProvince">
        <max:MaxGrid>
            <max:MaxGrid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="Auto" />
            </max:MaxGrid.ColumnDefinitions>
            <max:MaxListBox Grid.Column="0" ItemsSource="{Binding Path=Calculations, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}"></max:MaxListBox>
            <max:MaxListBox Grid.Column="1"></max:MaxListBox>
            <max:MaxListBox Grid.Column="2"></max:MaxListBox>
        </max:MaxGrid>
    </DataTemplate>
</max:MaxUserControl.Resources>

<max:MaxTabControl ItemsSource="{Binding Path=WorkingEntity.CodeIncludedInCalculation.Calculations, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}" ContentTemplate="{StaticResource tbProvince}">
</max:MaxTabControl>

这显示:

enter image description here

我的问题是为什么我的DataTemplate不显示?为什么我不看我的ListBox

0 个答案:

没有答案