Hi,
when I add a ribbon to a form, it automatically contains a titlebar with minimize/maximize/close buttons.
However, I would like for the form to continue using the default form one, rather than the one in the ribbon control (as I have no need for the quick menu in my app).
How do I go about hiding the titlebar of the ribbon control?
Regards,
Thomas
public class CheckBoxHeaderCell : GridHeaderCellElement |
{ |
RadCheckBoxElement checkbox; |
public CheckBoxHeaderCell(GridViewColumn column, GridRowElement row) |
: base(column, row) |
{ |
} |
protected override void DisposeManagedResources() |
{ |
checkbox.ToggleStateChanged -= new StateChangedEventHandler(checkbox_ToggleStateChanged); |
base.DisposeManagedResources(); |
} |
protected override void CreateChildElements() |
{ |
base.CreateChildElements(); |
checkbox = new RadCheckBoxElement(); |
checkbox.ToggleStateChanged += new StateChangedEventHandler(checkbox_ToggleStateChanged); |
this.Children.Add(checkbox); |
ApplyThemeToElement(checkbox, "ControlDefault"); |
} |
protected override SizeF ArrangeOverride(SizeF finalSize) |
{ |
base.ArrangeOverride(finalSize); |
if (checkbox != null) |
{ |
RectangleF rect = GetClientRectangle(finalSize); |
checkbox.Arrange(new RectangleF(rect.Right - 20, (rect.Height - 20) / 2, 20, 20)); |
} |
return finalSize; |
} |
private void checkbox_ToggleStateChanged(object sender, StateChangedEventArgs args) |
{ |
this.GridControl.BeginEdit(); |
for (int i = 0; i < this.GridControl.Rows.Count; i++) |
{ |
this.GridControl.Rows[i].IsSelected = true; |
this.GridControl.Rows[i].IsCurrent = true; |
this.GridControl.Rows[i].Cells["Mostrar"].Value = this.checkbox.IsChecked; |
} |
this.GridControl.EndEdit(); |
} |
private void ApplyThemeToElement(RadItem item, string themeName) |
{ |
DefaultStyleBuilder builder = ThemeResolutionService.GetStyleSheetBuilder((RadControl)item.ElementTree.Control, |
item.GetThemeEffectiveType().FullName, string.Empty, themeName) as DefaultStyleBuilder; |
if (builder != null) |
{ |
item.Style = new XmlStyleSheet(builder.Style).GetStyleSheet(); |
} |
} |
} |
private void radGridView1_CreateCell(object sender, GridViewCreateCellEventArgs e) |
{ |
if (e.Row is GridTableHeaderRowElement && e.Column.HeaderText == "Mostrar") |
{ |
e.CellElement = new SMPDataAnalyzer.TelerikHeaderGrid.CheckBoxHeaderCell(e.Column, e.Row); |
} |
} |
private void radGridView1_ValueChanged(object sender, EventArgs e) |
{ |
try |
{ |
if (this.radGridView1.ActiveEditor is RadCheckBoxEditor) |
{ |
if (radGridView1.CurrentRow.Tag != null) |
{ |
if ((bool)(this.radGridView1.ActiveEditor.Value) && !tendencias.ContainsKey(Convert.ToInt32(radGridView1.CurrentRow.Tag))) |
{ |
if (radGridView1.SelectedRows.Count > 0) |
{ |
medidastendencia = Controller.CargarValoresMedidas |
(long.Parse(radGridView1.CurrentRow.Cells["PuntoId"].Value.ToString()), |
fechaIni, fechaFin, |
long.Parse(radGridView1.SelectedRows[0].Cells["TipoEspectro"].Value.ToString()), |
long.Parse(radGridView1.SelectedRows[0].Cells["Nbanda"].Value.ToString())); |
if (medidastendencia.Count > 0) |
{ |
ScatterPlot scatterPlot = new ScatterPlot(); |
scatterPlot.XAxis = xAxis2; |
scatterPlot.YAxis = yAxis2; |
scatterPlot.Tag = Convert.ToInt32(radGridView1.CurrentRow.Tag); |
scatterGraphTendencias.Plots.Add(scatterPlot); |
int i = 0; |
double[] fechas = new double[medidastendencia.Count]; |
double[] values = new double[medidastendencia.Count]; |
foreach (MedidaTendencia mt in medidastendencia) |
{ |
fechas[i] = (Double)(DataConverter.Convert(mt.FechaMedida, typeof(Double))); |
values[i] = mt.Valor; |
i++; |
} |
scatterPlot.PlotXY(fechas, values); |
xyCursor2.Plot = scatterPlot; |
xyCursor2.SnapMode = CursorSnapMode.NearestPoint; |
xyCursor2.MoveNext(); |
xyCursor2.MovePrevious(); |
xyCursor2.Visible = true; |
if (!isTendenciaVisible) |
{ |
isTendenciaVisible = true; |
activeTend(); |
} |
tendencias.Add(Convert.ToInt32(radGridView1.CurrentRow.Tag), values); |
} |
else |
{ |
MessageBox.Show(Properties.Resources.ERROR_MEDIDAS_TEND); |
} |
} |
} |
else |
{ |
//Se ha puesto a false |
if (tendencias.ContainsKey(Convert.ToInt32(radGridView1.CurrentRow.Tag))) |
{ |
int i = 0; |
foreach (ScatterPlot plot in scatterGraphTendencias.Plots) |
{ |
if (plot.Tag.ToString() == radGridView1.CurrentRow.Tag.ToString()) |
{ |
if (i > 1) |
{ |
xyCursor2.Plot = scatterGraphTendencias.Plots[i - 1]; |
xyCursor2.MoveNext(); |
xyCursor2.MovePrevious(); |
} |
else |
{ |
if (scatterGraphTendencias.Plots.Count > 2) |
{ |
xyCursor2.Plot = scatterGraphTendencias.Plots[i + 1]; |
xyCursor2.MoveNext(); |
xyCursor2.MovePrevious(); |
} |
else |
{ |
xyCursor2.Plot = scatterPlot2; |
xyCursor2.Visible = false; |
desactiveTend(); |
} |
} |
scatterGraphTendencias.Plots.Remove(plot); |
plot.Dispose(); |
break; |
} |
i++; |
} |
tendencias.Remove(Convert.ToInt32(radGridView1.CurrentRow.Tag)); |
} |
} |
} |
} |
} |
catch (Exception ex) |
{ |
string message = ex.Message; |
} |
} |
Dim
RE As RadElement = DirectCast(Me.rgbPharmacyInformation.RootElement.Children(0).Children(1).
Children(2).Children(1), RadElement)
The zeroth child of the root element is the RadGroupBoxElement.
The First child of the RadGroupBoxElement is the GroupBoxHeader element.
The second child of the GroupBoxHesder elelemnt is the ImageAndTextLayoutPanel element.
The first child of the ImageAndTextLayoutPanel element is text.
Looking at the property inspector in VS2010, I see properties for this element and the property I would like to change is the Fioreground color. But what do I cast the "text" element as (In the above code, the "text" can be successfully cast to a RadElement)? How can I get to this property?
Anybody's assistance would be appreciated! Thank you for your time!
Hello there,
I'll try to apply french localization to my project for the richtexteditor telerik control.
I followed this link : http://docs.telerik.com/devtools/winforms/richtexteditor/localization
The RichTextBoxLocalizationProvider isn't full. I looked in the .xml file, and I tried to add some translations (successfully)
There is a global french localization for telerik winforms ? or a richtexteditor french localization ?
Thanks,
Hi, I try the trial version of component GanttView, but when in my test project assign the dataset to datasource of GantView, VB.Net return a Windows with this message: "THE APPLICATION IS IN STANBY MODE".
This message is because I use the trial version?
I try to assign the dataset by code and by the binding to database wizard but the result is the same.
Thank you for any response
I have a small project that uses non-rad controls, that can't be changed to rad controls, and I'd like to use Telerik Themes on those controls. At this point I can't theme anything because of the sheer difference between controls. If I can do it without having to override OnPaint and trying to match Telerik themes, I would be elated.
Using C#, non-WPF (otherwise this would be trivial).