예제 #1
0
 protected override void CreateChildItems(RadElement parent)
 {
     base.CreateChildItems(parent);
     this.alertElement = new RadDesktopAlertElement();
     this.alertElement.CaptionElement.TextAndButtonsElement.CloseButton.Click            += this.OnAlertCloseButton_Click;
     this.alertElement.CaptionElement.TextAndButtonsElement.PinButton.ToggleStateChanged += this.PinButton_ToggleStateChanged;
     this.alertElement.ThemeRole = "DesktopAlertElement";
     parent.Children.Add(this.alertElement);
 }
        protected override SizeF MeasureOverride(SizeF availableSize)
        {
            RadDesktopAlertElement ancestor = this.FindAncestor <RadDesktopAlertElement>();

            if (ancestor != null && ancestor.AutoSizeHeight)
            {
                return(base.MeasureOverride(new SizeF(availableSize.Width, (float)int.MaxValue)));
            }
            return(base.MeasureOverride(availableSize));
        }