protected override void CreateChildElements() { base.CreateChildElements(); this.searchTextBox = this.CreateSearchTextBox(); this.Children.Add((RadElement)this.searchTextBox); this.waitingBar = this.CreateWaitingBarElement(); this.Children.Add((RadElement)this.waitingBar); this.findPreviousButton = this.CreateFindPreviousButton(); this.Children.Add((RadElement)this.findPreviousButton); this.findNextButton = this.CreateFindNextButton(); this.Children.Add((RadElement)this.findNextButton); this.matchCaseButton = this.CreateMatchCaseButton(); this.chooseColumnsMenuItem = this.CreateChooseColumnsMenuItem(); this.matchCaseMenuItem = this.CreateMatchCaseMenuItem(); this.searchFromCurrentPositionMenuItem = this.CreateSearchFromCurrentPositionMenuItem(); this.optionsButton = this.CreateOptionsButton(); this.Children.Add((RadElement)this.optionsButton); this.buttonsStack = new StackLayoutPanel(); this.buttonsStack.Margin = new Padding(0, 1, 0, 2); this.Children.Add((RadElement)this.buttonsStack); this.closeButton = this.CreateCloseButton(); this.closeButton.Class = "SearchRowCloseButton"; this.closeButton.Click += new EventHandler(this.CloseButton_Click); this.buttonsStack.Children.Add((RadElement)this.closeButton); }
protected virtual void UpdateBorderAndFillVisibility(bool wasPrevWaitingStyleOld) { RadWaitingBarElement ancestor = this.FindAncestor <RadWaitingBarElement>(); if (this.IsOldWaitingStyle) { if (wasPrevWaitingStyleOld) { return; } int num1 = (int)this.ResetValue(LightVisualElement.DrawFillProperty, ValueResetFlags.Local); int num2 = (int)this.ResetValue(LightVisualElement.DrawBorderProperty, ValueResetFlags.Local); if (ancestor == null) { return; } int num3 = (int)ancestor.ResetValue(LightVisualElement.DrawFillProperty, ValueResetFlags.Local); int num4 = (int)ancestor.ResetValue(LightVisualElement.DrawBorderProperty, ValueResetFlags.Local); } else { if (!wasPrevWaitingStyleOld) { return; } this.DrawFill = false; this.DrawBorder = false; if (ancestor == null) { return; } ancestor.DrawFill = false; ancestor.DrawBorder = false; } }
protected override SizeF MeasureOverride(SizeF availableSize) { RadWaitingBarElement ancestor = this.FindAncestor <RadWaitingBarElement>(); SizeF sizeF = base.MeasureOverride(availableSize); if (ancestor != null) { sizeF.Height = !this.StretchVertically || float.IsInfinity(availableSize.Height) ? (float)ancestor.WaitingIndicatorSize.Height : availableSize.Height; sizeF.Width = !this.StretchHorizontally || float.IsInfinity(availableSize.Width) ? (float)ancestor.WaitingIndicatorSize.Width : availableSize.Width; } return(sizeF); }
protected override void CreateChildElements() { base.CreateChildElements(); this.BackColor = Color.FromArgb(128, (int)byte.MaxValue, (int)byte.MaxValue, (int)byte.MaxValue); this.DrawFill = true; this.GradientStyle = GradientStyles.Solid; this.StretchHorizontally = this.StretchVertically = true; this.waitingBarElement = new RadWaitingBarElement(); this.waitingBarElement.StretchHorizontally = this.waitingBarElement.StretchVertically = false; this.waitingBarElement.MinSize = new Size(150, 20); this.waitingBarElement.MaxSize = new Size(150, 20); this.waitingBarElement.Alignment = ContentAlignment.MiddleCenter; this.Children.Add((RadElement)this.waitingBarElement); }
protected virtual RadWaitingBarElement CreateWaitingBarElement() { RadWaitingBarElement waitingBarElement = new RadWaitingBarElement(); waitingBarElement.MaxSize = new Size(0, this.WaitingBarHeight); waitingBarElement.Margin = new Padding(2, -1, 2, 0); waitingBarElement.ContentElement.DrawBorder = false; waitingBarElement.ContentElement.BorderWidth = 0.0f; waitingBarElement.ContentElement.BorderBoxStyle = BorderBoxStyle.SingleBorder; waitingBarElement.BorderWidth = 0.0f; waitingBarElement.BorderBoxStyle = BorderBoxStyle.SingleBorder; waitingBarElement.Visibility = ElementVisibility.Hidden; return(waitingBarElement); }
protected override SizeF MeasureOverride(SizeF availableSize) { RadWaitingBarElement waitingBarElement = FindAncestor <RadWaitingBarElement>(); SizeF desiredSize = base.MeasureOverride(availableSize); if (waitingBarElement != null) { if (StretchVertically && !float.IsInfinity(availableSize.Height)) { desiredSize.Height = availableSize.Height; } else { if (this.Image != null && GetValueSource(RadWaitingBarElement.WaitingIndicatorSizeProperty) != Telerik.WinControls.ValueSource.Local) { desiredSize.Height = Image.Height; } else { desiredSize.Height = waitingBarElement.WaitingIndicatorSize.Height; } } if (StretchHorizontally && !float.IsInfinity(availableSize.Width)) { desiredSize.Width = availableSize.Width; } else { if (this.Image != null && GetValueSource(RadWaitingBarElement.WaitingIndicatorSizeProperty) != Telerik.WinControls.ValueSource.Local) { desiredSize.Height = Image.Height; } else { desiredSize.Width = waitingBarElement.WaitingIndicatorSize.Width; } } } return(desiredSize); }
protected override SizeF MeasureOverride(SizeF availableSize) { RadWaitingBarElement ancestor = this.FindAncestor <RadWaitingBarElement>(); SizeF sizeF = base.MeasureOverride(availableSize); if (ancestor != null) { sizeF.Height = !this.StretchVertically || float.IsInfinity(availableSize.Height) ? (this.Image == null || this.GetValueSource(RadWaitingBarElement.WaitingIndicatorSizeProperty) == ValueSource.Local ? (float)ancestor.WaitingIndicatorSize.Height : (float)this.Image.Height) : availableSize.Height; if (this.StretchHorizontally && !float.IsInfinity(availableSize.Width)) { sizeF.Width = availableSize.Width; } else if (this.Image != null && this.GetValueSource(RadWaitingBarElement.WaitingIndicatorSizeProperty) != ValueSource.Local) { sizeF.Height = (float)this.Image.Height; } else { sizeF.Width = (float)ancestor.WaitingIndicatorSize.Width; } } return(sizeF); }
protected override void CreateChildItems(RadElement parent) { this.waitingBarElement = this.CreateWaitingBarElement(); this.RootElement.Children.Add((RadElement)this.waitingBarElement); this.WireEvents(); }