As a good tradition we are happy to announce the availability of Q1 2011 Beta of RadControls for WPF. Along with a bunch of new features and improvements we are glad to present you several new controls.
RadRichTextBox
In response to numerous client requests we included the RichTextBox control in our WPF suite. Just like its counterpart for Silverlight the new RadRichTextBox for WPF offers broad editing and formatting capabilities with unmatched performance and true Word-like experience.
RadDataForm
RadDataForm control provides UI for displaying and editing properties of an object in a form layout. It includes collection navigation capabilities, editing and respects key DataAnnotation attributes.
RadExpressionEditor
The new RadExpressionEditor provides end users the ability to write and edit complex formula expressions as a free form text. At the same time the new control gives the developers access to the structured data (in the form of a LINQ expression) about the entered expression. The primary use case for this component is integration within RadGridView and its LINQ based data engine, which allows unlimited runtime data shaping customizations.
RadMaskedInput
RadMaskedInput controls are designed for masking (controlling correct input) and formatting (displaying) culture specific values like numbers, currency, dates and text. The controls support data validation and provide great control over the input behavior, navigation, masked text (when in edit mode), display text (when not in edit mode).
You can download the installation files under your accounts. The files are marked with Q1 2011 Beta.
Online demos are available at:
RadControls for WPF
Full details can be found at:
RadControls for WPF
We will greatly appreciate your feedback in our Beta forums:
private
void
radGridView1_EditorRequired(
object
sender, EditorRequiredEventArgs e)
{
var varModel = radGridView1.CurrentRow.Tag
as
VariableModel;
if
(varModel.Variable !=
null
)
{
var variableType = varModel.Variable.VariableType;
if
(varModel.Variable.VariableSelectionValueCollection.Count > 0)
{
var selValCol = varModel.Variable.VariableSelectionValueCollection;
if
(selValCol !=
null
&& selValCol.Count > 0)
// if to be shown as a dropdown // todo: vsv fix
{
var editor =
new
RadComboBoxEditor();
var elem = editor.EditorElement
as
RadComboBoxEditorElement;
elem.DropDownWidth = radGridView1.Columns[STR_ValueCol].Width + radGridView1.Columns[STR_UnitsCol].Width;
elem.DropDownStyle = RadDropDownStyle.DropDownList;
elem.MaxDropDownItems = 10;
elem.DataSource = selValCol.Select(vs => vs.Description).ToList<
string
>();
editor.DropDownSizingMode = SizingMode.UpDownAndRightBottom;
//editor.ValueChanged += new EventHandler(editor_ValueChanged);
e.Editor = editor;
}
}
else
if
(variableType == VariableTypeEnum.Integer)
{
var editor =
new
GridSpinEditor();
var elem = editor.EditorElement
as
GridSpinEditorElement;
elem.MaxValue =
int
.MaxValue;
elem.MinValue =
int
.MinValue;
if
(varModel.Variable.Val !=
null
)
editor.Value = varModel.Variable.Val.ToInt32();
e.Editor = editor;
}
else
if
(variableType == VariableTypeEnum.Double)
// todo : capture keys to exclude text
{
e.EditorType =
typeof
(RadTextBoxEditor);
var editor =
new
RadTextBoxEditor();
var elem = editor.EditorElement
as
RadTextBoxEditorElement;
//elem.TextChanging += new TextChangingEventHandler(Editor_TextChanging);
//elem.TextChanged += new EventHandler(elem_TextChanged);
if
(varModel.Variable.Val !=
null
)
editor.Value = varModel.Variable.Val.ToDouble();
e.Editor = editor;
}
else
if
(variableType == VariableTypeEnum.Boolean)
{
var editor =
new
RadComboBoxEditor();
var elem = editor.EditorElement
as
RadComboBoxEditorElement;
elem.Items.AddRange(
new
[] {
new
RadComboBoxItem(
"True"
),
new
RadComboBoxItem(
"False"
) });
editor.Value = elem.Items.Where(ri => ri.Text.ToLower() == varModel.Variable.Val.Val.ToLower()).FirstOrDefault();
e.Editor = editor;
}
else
if
(variableType == VariableTypeEnum.String)
{
e.EditorType =
typeof
(RadTextBoxEditor);
var editor =
new
RadTextBoxEditor();
var elem = editor.EditorElement
as
RadTextBoxEditorElement;
//elem.TextChanged += new EventHandler(elem_TextChanged);
if
(varModel.Variable.Val !=
null
)
editor.Value = varModel.Variable.Val.ToString();
e.Editor = editor;
}
}
}
void gvMain_CellValueChanged(object sender, GridViewCellEventArgs e)
{
GridDataCellElement ce = (GridDataCellElement)sender;
ce.BackColor = Color.LightPink;
ce.BackColor2 = Color.White;
ce.NumberOfColors = 2;
ce.DrawFill = true;
ce.GradientStyle = Telerik.WinControls.GradientStyles.Linear;
_dataDirty = true;
btnSave.Visible = true;
}
this
.radDock1.DocumentManager.ActiveDocument = radDock1.DockWindows[1];
Dim mCellPos As Integer = rgvItemsAndProps.CurrentCell.ColumnIndex
rgvItemsAndProps.BeginEdit()
For Each gr As GridViewRowInfo In rgvItemsAndProps.Rows
Dim y As String = gr.Cells(2).Value
If gr.IsVisible = True Then
gr.Cells(mCellPos).Value = _ItemPropGridClipboard
End If
Next
rgvItemsAndProps.EndEdit()
End If