in

C1 Community

ComponentOne Community is a free source for developers and help authors to collaborate and communicate.

Listbox(combobox) items are not shown

Last post 02-15-2008 8:21 AM by C1_BernardoC. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 02-13-2008 6:20 PM

    Listbox(combobox) items are not shown

    Hello,

    2 Developers team.

    Thank you guys, your Silverlight 2.0 controlkit is the best I tryied.

    But some problems exist, anyway.

    I try to use listbox in the following way:

    Page.xaml
    <Canvas x:Name="parentCanvas"
            xmlns="http://schemas.microsoft.com/client/2007"
            xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
            Loaded="Page_Loaded"
            x:Class="ControlExplorer.Page;assembly=ClientBin/ControlExplorer.dll"
            Width="640"
            Height="480"
            Background="White"
            >
      <Rectangle x:Name="recControl" Width="190" Height="205"
             Fill="#FFEEEEEE" Stroke="#FF5A70FF" Canvas.Left="59"
             Canvas.Top="54" RadiusY="6.5" RadiusX="6.5" StrokeThickness="3" />
    </Canvas>

    Page.xaml.cs
    public partial class Page : Canvas
        {
            public void Page_Loaded(object o, EventArgs e)
            {
                // Required to initialize variables
                InitializeComponent();


                ListBox list = new ListBox();
                list.ReplacePlaceHolder(this.recControl, true);

                for (int i = 0; i < 15; i++)
                {
                    list.Items.Add(string.Format("{0}{0}{0}", i));
                }
            }

        }

    The listbox is rendered on the page, but its items are epmty, without any text.

    Please find  how it looks like in the attached image

  • 02-14-2008 8:08 PM In reply to

    Re: Listbox(combobox) items are not shown

    Thanks for the kind words. We are working like crazy to make the controls even better.

    I tried the code you sent and everything worked fine. I am using a later version of the controls that we haven't released yet, so the good news is if this was a bug it has been fixed. We are planning to release this new build in the Mix timeframe (early March/2008).

    To make this work with the bits you have now, I suggest adding label controls to the list. That should at least give you a better idea of what's going on (you can then change the fonts etc to see if that makes a difference).

     

  • 02-15-2008 6:17 AM In reply to

    Re: Listbox(combobox) items are not shown

    Thank you for your answer.

    It seems I figured out, what's going on. The problem is in the Label control and regional settings. I'm using Windows Server 2003 SE R1 (English). And when my "standats and formats" are set to Ukrainian, not to English, lables are not shown. On the other hand, when I set it to English, everything works fine. I think it works when current culture alphabet is Latin. In my case it's Cyrillic. It would be great if you fix this bug in your next release
  • 02-15-2008 8:21 AM In reply to

    Re: Listbox(combobox) items are not shown

    Thanks for posting this additional information.

    This is a known limitation of the Silverlight 1.1 alpha build. It does not support non-English locales.

    Microsoft will certainly fix this in the next version, which will probably be available sometime in March (MIX timeframe).

Page 1 of 1 (4 items)
Contact ComponentOne: 1.800.858.2739 ©1987-2008 ComponentOne LLC All Rights Reserved.