Beispiel #1
0
            public virtual void CreateControl()
            {
                if (CreatedControl == null)
                {
                    try
                    {
                        // disable layout optimization
                        KryptonToolkitSettings.DisableLayout = true;
                        CreatedControl = CreateControlImpl();
                    }
                    catch (Exception)
                    {
                        //TODO: this is not fatal, we can disable item and show message.
                        throw;
                    }
                    finally
                    {
                        KryptonToolkitSettings.DisableLayout = false;
                    }

                    Owner.ContentPanel.Controls.Add(CreatedControl);

                    CreatedItemsCount++;

                    unsafe
                    {
                        unchecked
                        {
                            CreatedControlsCount += CreatedControl.GetTotalControlsCount();
                        }
                    }
                }

                foreach (var item in Children)
                {
                    item.CreateControl();
                }
            }