I need to make the selection of the RadSplitButton when RadDropDownButtonElement is selected. For make this, I'm changing Style Parameter of the different buttons and when another button is Selected I have to restore Original Values.
For make this, I've made one event:
public void SelectedChanged(object sender,EventArgs e){
RadSplitButtonElement SendingSplitButton = sender as RadSplitButtonElement;
RadSplitButtonElement[] ButtonArray = { orbit, rotate, horizontalMove, verticalMove, zoom };
for (int i = 0; i < 5; i++)
{
ButtonArray[i].ActionButton.ButtonFillElement.BackColor = System.Drawing.Color.transparent; <- Setting the original Values
ButtonArray[i].ActionButton.ButtonFillElement.BackColor2 = System.Drawing.Color.transparent;
ButtonArray[i].ActionButton.ButtonFillElement.BackColor3 = System.Drawing.Color.transparent;
ButtonArray[i].ActionButton.ButtonFillElement.BackColor4 = System.Drawing.Color.transparent;
}
/*Setting Selected Values...*/
SendingSplitButton.ActionButton.ButtonFillElement.BackColor = System.Drawing.Color.FromArgb(255,255,115,0);
SendingSplitButton.ActionButton.ButtonFillElement.BackColor2 = System.Drawing.Color.FromArgb(255,255, 115, 0);
SendingSplitButton.ActionButton.ButtonFillElement.BackColor3 = System.Drawing.Color.FromArgb(255,255, 115, 0);
SendingSplitButton.ActionButton.ButtonFillElement.BackColor4 = System.Drawing.Color.FromArgb(255,255, 115, 0);
SendingSplitButton.ActionButton.ButtonFillElement.GradientPercentage = 0.62f;
SendingSplitButton.ActionButton.ButtonFillElement.GradientPercentage = 0.71f;
}
I have already tried changing the State of the Objects in this mode:
SendingSplitButton.OnMouseOver = true or with SendingSplitButton.OnMouseDown= true but it doesn't work. I don't understand very well if it is possible or not managing only a single state of the object through the code and how the Style Managing - by code - and Xml is merged.
Thank you very Much,