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

System.NullReferenceException in 2011.1 315

3 Answers 73 Views
TileView
This is a migrated thread and some comments may be shown as answers.
Jeremy Brown
Top achievements
Rank 1
Jeremy Brown asked on 17 Mar 2011, 02:29 PM
Last night I downloaded and installed the RadControls for WPF 2011.1 315 (Mar 16, 2011). The upgrade wizard would not allow me to upgrade my project to this version, it would only allow me to select 2010 Q3, so I manually browsed to the DLLS and then upgrade from it. (C:\Program Files (x86)\Telerik\RadControls for WPF Q1 2011\Binaries\WPF)

Now, when I rebuild my project (which was working just fine) I get the following error:

System.NullReferenceException
Object reference not set to an instance of an object.
   at Telerik.Windows.Controls.TileViewPanel.UpdateScrollViewer() in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\Navigation\TileView\TileViewPanel.cs:line 359
   at Telerik.Windows.Controls.TileViewPanel.MeasureOverride(Size availableSize) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\Navigation\TileView\TileViewPanel.cs:line 270
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)
   at System.Windows.Controls.ItemsPresenter.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)
   at System.Windows.Controls.ScrollContentPresenter.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV)
   at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV)
   at System.Windows.Controls.Grid.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Border.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.ScrollViewer.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Border.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV)
   at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV)
   at System.Windows.Controls.Grid.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Control.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)
   at Telerik.Windows.Controls.TransitionControl.TransitionPresenter.MeasureOverride(Size availableSize) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Core\Controls\TransitionControl\TransitionPresenter.cs:line 321
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Control.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV)
   at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV)
   at System.Windows.Controls.Grid.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Border.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV)
   at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV)
   at System.Windows.Controls.Grid.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV)
   at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV)
   at System.Windows.Controls.Grid.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)
   at System.Windows.Controls.ContentPresenter.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Border.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV)
   at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV)
   at System.Windows.Controls.Grid.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Grid.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Control.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Documents.AdornerDecorator.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV)
   at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV)
   at System.Windows.Controls.Grid.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Border.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Border.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.DockPanel.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Border.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Grid.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Control.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Border.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at MS.Internal.Designer.ZoomableViewPresenter.DesignerBackground.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Decorator.MeasureOverride(Size constraint)
   at Microsoft.Windows.Design.Interaction.DesignerView.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at MS.Internal.Designer.Viewport.MeasureOverride(Size availableSize)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)
   at System.Windows.Controls.ScrollContentPresenter.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV)
   at System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV)
   at System.Windows.Controls.Grid.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.ScrollViewer.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Grid.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)
   at System.Windows.Controls.ContentPresenter.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Controls.Control.MeasureOverride(Size constraint)
   at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   at System.Windows.UIElement.Measure(Size availableSize)
   at System.Windows.Interop.HwndSource.SetLayoutSize()
   at System.Windows.Interop.HwndSource.set_RootVisualInternal(Visual value)
   at System.Windows.Interop.HwndSource.set_RootVisual(Visual value)
   at MS.Internal.DeferredHwndSource.ProcessQueue(Object sender, EventArgs e)

Regards,

Jeremy

3 Answers, 1 is accepted

Sort by
0
Zarko
Telerik team
answered on 17 Mar 2011, 03:12 PM
Hello Jeremy Brown,

 Could you please send us a code snippet showing the code where you define the RadTileView?

All the best,
Zarko
the Telerik team
0
Jeremy Brown
Top achievements
Rank 1
answered on 17 Mar 2011, 03:21 PM
Thank you for the quick reply! I hope these snipplets are enough, I'll start working on a sample application in the mean time just in case it isn't.

Regards,

Jeremy

    <Window.Resources>
        <DataTemplate x:Key="TimeScheduleHeaderTemplate">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition MinWidth="27"/>
                    <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton Grid.Column="0" Style="{DynamicResource BtnAddStyle}" Click="RadButton_Click" />
                <ContentControl Grid.Column="1" Content="{Binding}" VerticalAlignment="Center" Margin="5,0,0,0" />
            </Grid>
        </DataTemplate>
        <DataTemplate x:Key="CMLockHeaderTemplate">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition MinWidth="27"/>
                    <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton Grid.Column="0" Style="{DynamicResource BtnAddStyle}" ToolTipService.ToolTip="Add a AD-200/CM Lock" Click="RadButton_Click_1" />
                <ContentControl Grid.Column="1" Content="{Binding}" VerticalAlignment="Center" Margin="5,0,0,0" />
            </Grid>
        </DataTemplate>
        <DataTemplate x:Key="CLLockHeaderTemplate">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition MinWidth="27"/>
                    <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton Grid.Column="0" Style="{DynamicResource BtnAddStyle}" ToolTipService.ToolTip="Add a AD-250/CL Lock"/>
                <ContentControl Grid.Column="1" Content="{Binding}" VerticalAlignment="Center" Margin="5,0,0,0" />
            </Grid>
        </DataTemplate>
        <DataTemplate x:Key="HolidayHeaderTemplate">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition MinWidth="27"/>
                    <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton Grid.Column="0" Style="{DynamicResource BtnAddStyle}" ToolTipService.ToolTip="Add a holiday" Click="RadButton_Click_2" />
                <ContentControl Grid.Column="1" Content="{Binding}" VerticalAlignment="Center" Margin="5,0,0,0" />
            </Grid>
        </DataTemplate>
        <DataTemplate x:Key="AutoUnlockScheduleHeaderTemplate">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition MinWidth="27"/>
                    <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <telerik:RadButton Grid.Column="0" Style="{DynamicResource BtnAddStyle}" ToolTipService.ToolTip="Add a auto unlock schedule" Click="RadButton_Click_3" />
                <ContentControl Grid.Column="1" Content="{Binding}" VerticalAlignment="Center" Margin="5,0,0,0" />
            </Grid>
        </DataTemplate>
    </Window.Resources>
  
<telerik:RadTileView x:Name="radTileView" TileStateChanged="radTileView_TileStateChanged">
    <telerik:RadTileViewItem x:Name="CMLockViewItem" Header="AD-200/CM Locks" Background="{x:Null}" HeaderTemplate="{DynamicResource CMLockHeaderTemplate}">
        <telerik:RadFluidContentControl ContentChangeMode="Manual">
            <telerik:RadFluidContentControl.ContentTemplate>
                <DataTemplate>
                    <local:TiledBGControl>
                        <ContentControl />
                    </local:TiledBGControl>
                </DataTemplate>
            </telerik:RadFluidContentControl.ContentTemplate>
            <telerik:RadFluidContentControl.SmallContent>
                <local:CMDoors/>
            </telerik:RadFluidContentControl.SmallContent>
            <telerik:RadFluidContentControl.Content>
                <local:CMDoors/>
            </telerik:RadFluidContentControl.Content>
            <telerik:RadFluidContentControl.LargeContent>
                <Grid Margin="8">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <local:CMDoors Margin="0,0,22,0" MinWidth="150"/>
                    <GridSplitter/>
                    <ScrollViewer Grid.Column="1" Margin="0" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
                        <local:CMDoorInfo Margin="15" DataContext="{Binding SelectedCMDoor, Mode=TwoWay}" ShowTabControl="True" />
                    </ScrollViewer>
                </Grid>
            </telerik:RadFluidContentControl.LargeContent>
        </telerik:RadFluidContentControl>
    </telerik:RadTileViewItem>
    <telerik:RadTileViewItem x:Name="CLLockViewItem" Header="AD-250/CL Locks" Background="{x:Null}" HeaderTemplate="{DynamicResource CLLockHeaderTemplate}">
        <telerik:RadFluidContentControl ContentChangeMode="Manual">
            <telerik:RadFluidContentControl.ContentTemplate>
                <DataTemplate>
                    <local:TiledBGControl>
                        <ContentControl />
                    </local:TiledBGControl>
                </DataTemplate>
            </telerik:RadFluidContentControl.ContentTemplate>
            <telerik:RadFluidContentControl.SmallContent>
                <Grid/>
            </telerik:RadFluidContentControl.SmallContent>
            <telerik:RadFluidContentControl.Content>
                <Grid/>
            </telerik:RadFluidContentControl.Content>
            <telerik:RadFluidContentControl.LargeContent>
                <Grid/>
            </telerik:RadFluidContentControl.LargeContent>
        </telerik:RadFluidContentControl>
    </telerik:RadTileViewItem>
    <telerik:RadTileViewItem x:Name="TimeSchedulesViewItem" Header="Time Schedules" Background="{x:Null}" HeaderTemplate="{DynamicResource TimeScheduleHeaderTemplate}">
        <telerik:RadFluidContentControl ContentChangeMode="Manual">
            <telerik:RadFluidContentControl.ContentTemplate>
                <DataTemplate>
                    <local:TiledBGControl>
                        <ContentControl />
                    </local:TiledBGControl>
                </DataTemplate>
            </telerik:RadFluidContentControl.ContentTemplate>
            <telerik:RadFluidContentControl.SmallContent>
                <local:TimeSchedules/>
            </telerik:RadFluidContentControl.SmallContent>
            <telerik:RadFluidContentControl.Content>
                <local:TimeSchedules/>
            </telerik:RadFluidContentControl.Content>
            <telerik:RadFluidContentControl.LargeContent>
                <Grid Margin="8">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <local:TimeSchedules Margin="0,0,22,0" MinWidth="150"/>
                    <GridSplitter/>
                    <ScrollViewer Grid.Column="1" Margin="0" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
                        <local:TimeScheduleInfo Margin="15" DataContext="{Binding SelectedTimeZone, Mode=TwoWay}"/>
                    </ScrollViewer>
                </Grid>
            </telerik:RadFluidContentControl.LargeContent>
        </telerik:RadFluidContentControl>
    </telerik:RadTileViewItem>
    <telerik:RadTileViewItem x:Name="AutoUnlockViewItem" Header="Auto Unlock Schedules" Background="{x:Null}" HeaderTemplate="{DynamicResource AutoUnlockScheduleHeaderTemplate}">
        <telerik:RadFluidContentControl ContentChangeMode="Manual">
            <telerik:RadFluidContentControl.ContentTemplate>
                <DataTemplate>
                    <local:TiledBGControl>
                        <ContentControl />
                    </local:TiledBGControl>
                </DataTemplate>
            </telerik:RadFluidContentControl.ContentTemplate>
            <telerik:RadFluidContentControl.SmallContent>
                <local:AutoUnlocks/>
            </telerik:RadFluidContentControl.SmallContent>
            <telerik:RadFluidContentControl.Content>
                <local:AutoUnlocks/>
            </telerik:RadFluidContentControl.Content>
            <telerik:RadFluidContentControl.LargeContent>
                <Grid Margin="8">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <local:AutoUnlocks Margin="0,0,22,0" MinWidth="150"/>
                    <GridSplitter/>
                    <ScrollViewer Grid.Column="1" Margin="0" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
                        <local:AutoUnlockInfo Margin="15" DataContext="{Binding SelectedAutoUnlock, Mode=TwoWay}"/>
                    </ScrollViewer>
                </Grid>
            </telerik:RadFluidContentControl.LargeContent>
        </telerik:RadFluidContentControl>
    </telerik:RadTileViewItem>
    <telerik:RadTileViewItem x:Name="PersonnelViewItem" Header="Personnel" Background="{x:Null}">
        <telerik:RadFluidContentControl ContentChangeMode="Manual">
            <telerik:RadFluidContentControl.ContentTemplate>
                <DataTemplate>
                    <local:TiledBGControl>
                        <ContentControl />
                    </local:TiledBGControl>
                </DataTemplate>
            </telerik:RadFluidContentControl.ContentTemplate>
            <telerik:RadFluidContentControl.SmallContent>
                <local:Personnel/>
            </telerik:RadFluidContentControl.SmallContent>
            <telerik:RadFluidContentControl.Content>
                <local:Personnel/>
            </telerik:RadFluidContentControl.Content>
            <telerik:RadFluidContentControl.LargeContent>
                <Grid Margin="8">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <local:Personnel Margin="0,0,22,0" MinWidth="150"/>
                    <GridSplitter/>
                    <ScrollViewer Grid.Column="1" Margin="0" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
                        <local:PersonnelInfo Margin="15"/>
                    </ScrollViewer>
                </Grid>
            </telerik:RadFluidContentControl.LargeContent>
        </telerik:RadFluidContentControl>
    </telerik:RadTileViewItem>
    <telerik:RadTileViewItem x:Name="HolidaysViewItem" Header="Holidays" Background="{x:Null}" HeaderTemplate="{DynamicResource HolidayHeaderTemplate}">
        <telerik:RadFluidContentControl ContentChangeMode="Manual">
            <telerik:RadFluidContentControl.ContentTemplate>
                <DataTemplate>
                    <local:TiledBGControl>
                        <ContentControl />
                    </local:TiledBGControl>
                </DataTemplate>
            </telerik:RadFluidContentControl.ContentTemplate>
            <telerik:RadFluidContentControl.SmallContent>
                <local:Holidays/>
            </telerik:RadFluidContentControl.SmallContent>
            <telerik:RadFluidContentControl.Content>
                <local:Holidays/>
            </telerik:RadFluidContentControl.Content>
            <telerik:RadFluidContentControl.LargeContent>
                <Grid Margin="8">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <local:Holidays Margin="0,0,22,0" MinWidth="150"/>
                    <GridSplitter/>
                    <ScrollViewer Grid.Column="1" Margin="0" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
                        <local:HolidayInfo Margin="15" DataContext="{Binding SelectedHoliday, Mode=TwoWay}"/>
                    </ScrollViewer>
                </Grid>
            </telerik:RadFluidContentControl.LargeContent>
        </telerik:RadFluidContentControl>
    </telerik:RadTileViewItem>
</telerik:RadTileView>

private void radTileView_TileStateChanged(object sender, Telerik.Windows.RadRoutedEventArgs e)
{
    RadTileViewItem item = e.Source as RadTileViewItem;
    if (item != null)
    {
        RadFluidContentControl fluidControl = item.Content as RadFluidContentControl;
        if (fluidControl != null)
        {
            switch (item.TileState)
            {
                case TileViewItemState.Maximized:
                    fluidControl.State = FluidContentControlState.Large;
                    break;
                case TileViewItemState.Minimized:
                    fluidControl.State = FluidContentControlState.Small;
                    break;
                case TileViewItemState.Restored:
                    fluidControl.State = FluidContentControlState.Normal;
                    break;
            }
        }
    }
}


0
Zarko
Telerik team
answered on 17 Mar 2011, 04:37 PM
Hello Jeremy Brown,

 Unfortunately I'm still not able to reproduce the NullReferenceException, but I have a suggestion - there's been major changes in the RadTileView and one of them is that the items are now measured in a very different way, so could you please try to set the MinimizedColumnWidth and MinimizedRowHeight properties (to something like 300) and if this doesn't help set the ColumnWidth and RowHeight properties too. I've also attached the test project I used.

All the best,
Zarko
the Telerik team
Tags
TileView
Asked by
Jeremy Brown
Top achievements
Rank 1
Answers by
Zarko
Telerik team
Jeremy Brown
Top achievements
Rank 1
Share this question
or