Hi Guys
I'm trying to get the strip buttons to hide in my PageView and at the same time add in a RadButtonElement into the stripview button panel. The strip buttons do not want to hide and indeed won't hide when asked even when I don't add my RadButtonElement. I've tried the usual code from forum posts to no avail. I must be doing something wrong so any help would be great.
I use the following code. Note that I commented out another attempt to hide the buttons so you could see what I tried. The outcome of the code is in the attached screenshot.
I'm trying to get the strip buttons to hide in my PageView and at the same time add in a RadButtonElement into the stripview button panel. The strip buttons do not want to hide and indeed won't hide when asked even when I don't add my RadButtonElement. I've tried the usual code from forum posts to no avail. I must be doing something wrong so any help would be great.
I use the following code. Note that I commented out another attempt to hide the buttons so you could see what I tried. The outcome of the code is in the attached screenshot.
private RadButtonElement btnAddTradingRule = new RadButtonElement(); btnAddTradingRule.Image = Resources.Plus24; btnAddTradingRule.ImageAlignment = ContentAlignment.MiddleCenter; btnAddTradingRule.Click += BtnAddTradingRuleClick; btnAddTradingRule.MinSize = new Size(28, 28); rpvModelRule.RootElement.Children[0].Children[0].Children[1].Children.Insert(0, btnAddTradingRule); //foreach (var button in rpvModelRule.RootElement.Children[0].Children[0].Children[1].Children.Where(a => a.GetType() == typeof(RadPageViewStripButtonElement))) //{ // button.Visibility = ElementVisibility.Hidden; //} var radPageViewStripElement = rpvModelRule.ViewElement as RadPageViewStripElement; if (radPageViewStripElement != null) { radPageViewStripElement.ShowItemCloseButton = false; radPageViewStripElement.StripButtons = StripViewButtons.None; }