Search code examples
silverlight-3.0dataform

Combobox in a Silverlight 3.0 dataform


With the new release of Silverlight 3 and the move of the DataForm to the SilverLight Toolkit - does anyone know how to programatically add items to a combobox in a DataForm? There doesn't seem to be any of accessing it via the code file/

Thanks ~Steve


Solution

  • Yes, you can manage it by

    dataForm.ContentLoaded += (sender, args) =>
    {
        TextBox myTextBox = (TextBox)dataForm.FindNameInContent("myTextBox");
        // do something with the TextBox...
    };
    

    Look in here for details: http://silverlight.net/forums/t/108278.aspx