Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
225
XamCarouselListBox isn't showing images at runtime
posted

I posted this to the forum yesterday but it said something about a moderator and it hasn't shown up.

I'm trying to get code that I start off with in 2005 and the August and September previews of Expression Blend 2, and progressed on to 2008 and the December Preview, to work in 2005 and Expression Blend 1. I'm doing so that other programmers still using those can work with it.

In the transition, XamCarouselListBox has stopped working at run time. It shows the two embedded image controls and their bitmaps just fine at design time, but when I run the program they don't show up at all. Even the navigator control doesn't recognize the existance of the image controls. Nothing shows up even though two image controls have always shown up using this code since I first wrote it. The xaml and code is identical to that with which I first started it working back in October and November.

Below is the MainWindow.xaml.cs
****
using System;
using System.IO;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Navigation;

namespace OurNameSpace
{
   public partial class Window1
   {
      public Window1()
      {
         this.InitializeComponent();

         // Insert code required on object creation below this point.

         // Navigate to Start Page
         frame.Navigate(new GuestPage());
      }
   }
}

*****
Below is Page0.xaml
*****
<Page
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  xmlns:d="http://schemas.microsoft.com/expression/blend/2006"
  xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d"
  xmlns:igWindows="http://infragistics.com/Windows"
  x:Class="OurNameSpace.Page0"
  x:Name="StartPage"
  WindowTitle="Page"
  FlowDirection="LeftToRight"
  Width="Auto" Height="Auto"
  WindowWidth="640" WindowHeight="480">

  <Grid x:Name="LayoutRoot">
     <igWindows:XamCarouselListBox Margin="0,0,0,0" x:Name="xamCLBStart"         SelectionChanged="xamCLBStart_SelectionChanged" d:LayoutOverrides="Width, Height">
        <igWindows:XamCarouselListBox.ViewSettings>
           <igWindows:CarouselViewSettings IsListContinuous="True" ItemPathPadding="0,0,0,0"               ItemSize="170,170" ItemsPerPage="6" IsNavigatorVisible="False"               AutoScaleItemContentsToFit="True"/>
        </igWindows:XamCarouselListBox.ViewSettings>
        <Image x:Name="imgEvents" Source="Event.bmp"/>
        <Image x:Name="imgGuestMessages" Source="GuestMessages.bmp"/>
     </igWindows:XamCarouselListBox>
  </Grid>
</Page>
*****

Below is Page0.xaml.cs
******
using System;
using System.IO;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Navigation;

namespace OurNameSpace

{
  public partial class Page0
  {
    public Page0()
    {
       this.InitializeComponent();

       // Insert code required on object creation below this point.
       this.xamCLBStart.SelectionChanged += new SelectionChangedEventHandler(xamCLBStart_SelectionChanged);
    }

    private void xamCLBStart_SelectionChanged(object sender, SelectionChangedEventArgs e)
    {
       if (e.AddedItems.Contains(imgEvents))
       {
          EventsPage page = new EventsPage();
          NavigationService.Navigate(page);
       }
       else
         if (e.AddedItems.Contains(imgGuestMessages))
         {
            GuestPage page = new GuestPage();
            NavigationService.Navigate(page);
         }
    }
  }
}
******

Parents Reply Children