in

Zoombox not working in June CTP

Last post 07-26-2007 9:40 PM by kurt.brockett. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 07-05-2007 12:15 PM

    Zoombox not working in June CTP

    Hi,

     I have a usercontrol which contained a zoombox which worked fine with the May CTP.  The same XAML does not work in the June CTP. Have a look at the XAML below.  Neither the zoombox or the image inside of it displays.  When I remove the zoombox, the image does display fine however.

    <UserControl
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:blendables="http://schemas.identitymine.com/blendables"
        x:Class="MyApp.DesignSurfaceControl"
        Loaded="Control_Loaded"
      Width="180" Height="154"
      >
        <StackPanel>
          <blendables:Zoombox x:Name="designZoombox" Background="#FF5E5D5D">
              <Image Source="E:\Photos\2006_01_03\IMG_0013.JPG" Width="100" Height="100" />
          </blendables:Zoombox>
        </StackPanel>
    </UserControl>

    Regards

    Jerrie Pelser 

    Filed under:
  • 07-05-2007 12:41 PM In reply to

    Re: Zoombox not working in June CTP

    Just as a followup, I did a few tests.  I originally had the Zoombox in a grid and not a StackPanel.  I reverted back to that and it still did not work:

     <Grid>
    <blendables:Zoombox>
    <Image Source="E:\Photos\2006_01_03\IMG_0013.JPG" Width="100" Height="100" />
    </blendables:Zoombox>
    </Grid>
     

    The Zoombox with slide sample which you posted before does however work, so I copied the template into my usercontrol and changed the definition as follows: 

    <Grid>
    <blendables:Zoombox Template="{StaticResource ZoomBoxWithSlider}">
    <Image Source="E:\Photos\2006_01_03\IMG_0013.JPG" Width="100" Height="100" />
    </blendables:Zoombox>
    </Grid>

    This does seem to work and I can see the zoombox with the image inside of it.

     
    Any ideas?

    Jerrie
     

  • 07-05-2007 1:20 PM In reply to

    Re: Zoombox not working in June CTP

    Hi Jerrie,

    Off hand, I'm not sure what might cause the behavior you're describing.  Can you provide a simple sample that demonstrates the problem?  Please send it to jonathan.russ@identitymine.com.

    I'm guessing it's not a problem with the default template, but rather a problem looking up and applying the default Zoombox style (which contains the template).  When you set the template explicitly, no lookup is necessary. 

    I'm happy to take a closer look if you can provide a simple repro.

    Cheers,
    -Jonathan

    Filed under:
  • 07-15-2007 11:16 PM In reply to

    • ftsang
    • Top 50 Contributor
    • Joined on 07-16-2007
    • Posts 4

    Re: Zoombox not working in June CTP

    I'm having the exact same problem after upgrading to the June CTP.

    Also another observation: In the recent Zoombox with Slider example, I found that if I remove the Template binding from the XAML on line 555,

    from:
        <blendables:Zoombox Height="300" Margin="20" Background="Transparent" 
    MinScale="0.5" MaxScale="100" Template="{StaticResource ZoomBoxWithSlider}" >
    to:
        <blendables:Zoombox Height="300" Margin="20" Background="Transparent" 
    MinScale="0.5" MaxScale="100">

    the application will only show a brown background with no content nor view finder.

    Filed under:
  • 07-16-2007 5:06 PM In reply to

    Re: Zoombox not working in June CTP

    This appears to be a bug in the June CTP.  For some reason, resource resolution is failing when the Zoombox control is within a UserControl.  As such, no style is applied to the Zoombox (and consequently, it has no template).  This is why the control does not appear.

    I'm not exactly sure what regression caused this problem in the June CTP, but the good news is that I cannot reproduce the failure using our latest bits.  We will be sure to test this specific scenario prior to releasing the next build, just to be extra certain.

    In the meantime, if you wish to use a Zoombox within a UserControl in the June CTP, the only solution would be to specify your own control template.  At a minimum, it must include a ContentPresenter, as follows:

            <ControlTemplate TargetType="{x:Type blendables:Zoombox}">
              <Border Name="BackgroundGrid" Background="{TemplateBinding Background}">
                <ContentPresenter />
              </Border>
            </ControlTemplate>

    Sorry for the inconvenience!

    Best regards,
    -Jonathan

    Filed under:
  • 07-26-2007 9:40 PM In reply to

    Re: Zoombox not working in June CTP

    Hey everyone...good news

    This should now be fixed with the new JulyCTP available here:  http://www.blendables.com/files/folders/ctp_download/entry20.aspx

    Please let us know if you have any further issues.

    Filed under: ,
Page 1 of 1 (6 items)
Copyright © 2007 IdentityMine, Inc.  | Careers  | Policies  | License  | News & Press