1
Vote

Zoombox.Scale throws NullReferenceException

description

Setting Zoombox.Scale through XAML throws a NullReferenceException, whether thru a binding or literal value, and will crash the Visual Studio 2010 designer.

comments

cwatford wrote Sep 27, 2012 at 2:46 PM

1.7.0 release, can't even scroll to the XAML in question without Visual Studio crashing (no exception given).

cwatford wrote Sep 27, 2012 at 2:48 PM

Bare bones XAML:
<tk:Zoombox Scale="2"
                    ViewStackIndex="0"
                    ViewStackMode="Auto"
                    ZoomOn="View">
                        <tk:Zoombox.ViewStack>
                            <tk:ZoomboxView>Fit</tk:ZoomboxView>
                        </tk:Zoombox.ViewStack>
                        <local:SomeUserControl />
</tk:Zoombox>

cwatford wrote Sep 27, 2012 at 3:03 PM

Rebuilding my own copy of fixes some of the crashes, however, adding a Binding to Zoombox.Scale causes VS to crash as well.

BoucherS wrote Dec 17, 2012 at 1:16 PM

Can not reproduce in v1.9. I get no crash in VS and no crash in VS 2010 Designer.
Here's the code I used in XAML :

<Grid>
    <Grid.RowDefinitions>
        <RowDefinition Height="20" />
        <RowDefinition Height="*" />
    </Grid.RowDefinitions>        
    <xctk:DoubleUpDown x:Name="_doubleUpDown" Grid.Row="0" Value="2" Increment="0.5"/>
    <xctk:Zoombox Scale="{Binding Value, ElementName=_doubleUpDown, Mode=TwoWay}"
                  Grid.Row="1"
                  ViewStackIndex="0"
                  ViewStackMode="Auto"
                  ZoomOn="View">
                 <xctk:Zoombox.ViewStack>
                    <xctk:ZoomboxView>Fit</xctk:ZoomboxView>
                  </xctk:Zoombox.ViewStack>
              <Image Source="Default.jpg" />
    </xctk:Zoombox>         
</Grid>

hillin wrote May 12, 2013 at 1:40 PM

I can reproduce with version 1.9, with VS2010.

emartin wrote May 13, 2013 at 2:04 PM

Can anyone attach a zipped sample that reproduce the crash ?