Exemplo n.º 1
0
            // <snippet5>
            public override bool ApplyChanges()
            {
                TextDisplayWebPart part =
                    (TextDisplayWebPart)WebPartToEdit;

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

                return(true);
            }
Exemplo n.º 2
0
            // </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;
                    }
                }
            }