// <snippet5>
            public override bool ApplyChanges()
            {
                TextDisplayWebPart part =
                    (TextDisplayWebPart)WebPartToEdit;

                // Update the custom WebPart control with the font style.
                part.FontStyle = PartContentFontStyle.SelectedValue;

                return(true);
            }
            // </snippet5>

            // <snippet6>
            public override void SyncChanges()
            {
                TextDisplayWebPart part =
                    (TextDisplayWebPart)WebPartToEdit;
                String currentStyle = part.FontStyle;

                // Select the current font style in the drop-down control.
                foreach (ListItem item in PartContentFontStyle.Items)
                {
                    if (item.Value == currentStyle)
                    {
                        item.Selected = true;
                        break;
                    }
                }
            }