I'm trying to bind a set of RadRadioButtons to object properties: Here is the binding:
rbOwnOrRentOwn.DataBindings.Add("IsChecked", prevAddress, nameof(prevAddress.OwnOrRentOwn), false, DataSourceUpdateMode.OnPropertyChanged);
rbOwnOrRentRent.DataBindings.Add("IsChecked", prevAddress, nameof(prevAddress.OwnOrRentRent), false, DataSourceUpdateMode.OnPropertyChanged);
and here are the properties:
public bool OwnOrRentOwn
{
get => _ownOrRentOwn;
set
{
_ownOrRentOwn = value;
OnPropertyChanged(nameof(OwnOrRentOwn));
}
}
public bool OwnOrRentRent
{
get => _ownOrRentRent;
set
{
_ownOrRentRent = value;
OnPropertyChanged(nameof(OwnOrRentRent));
}
}
When I bind like this the object properties are not set when the buttons are selected/deselected.
The docs say that CheckState is one way to go but these enums are defined in System.Windows.Forms. This would mean I need to introduce the System.Windows.Forms into my business layer. Is this what I need to do or is there a better way.
This should be just a simple data binding.
Thanks
Carl
Hi,
I have RadGridView with image column? It is possible to filter rows by image?
Hello,
I need to change the colors of an item on my menu to bring attention to it. That part works great. Where I am having trouble is resetting it back to defaults. I am trying to use the resetvalue function to do this? Am I doing this correctly?
With mnuForms
.Image = My.Resources.rejectedForms16x16
.BorderPrimitive.Visibility = ElementVisibility.Visible
.FillPrimitive.GradientStyle = GradientStyles.Solid
.FillPrimitive.BackColor = Color.Red
.ForeColor = Color.White
.ResetValue(FillPrimitive.GradientStyleProperty, ValueResetFlags.Local)
.ResetValue(FillPrimitive.BackColorProperty, ValueResetFlags.Local)
.ResetValue(LightVisualElement.ForeColorProperty, ValueResetFlags.Local)
.ResetValue(BorderPrimitive.VisibilityProperty, ValueResetFlags.Local)
End With
Hi,
I'm using a ListView in detail view mode and was trying to format all date values so that they are displayed in short date format.
It looks like the correct way to do this is within the CellFormatting event, so it would be something like this:
Function CellFormatting(sender As Object, e As ListViewCellFormattingEventArgs)
If isDate Then
e.CellElement.Text = String.Format(strFormat, DirectCast(e.CellElement, DetailListViewDataCellElement).Row(e.CellElement.Data))
The thing is, I'm not sure how to determine the data type or column type that corresponds to this e.CellElement. How can I tell if the current cell contains a date, or a int, or a string, or whatever?
Thanks!
Hi,
Is there a way to choose BackgroundColor of cells in RadSpreadsheet from UI that are not part of the given list of colors???
or maybe a way to edit the background color # from UI ???
thanks,
Efrat
I'm using the example for the radfontdropdownlist control to attempt to set the font for the radsyntaxeditor. So far, I haven't had any luck changing it.
Here is an example:
I attempted to set editor.SyntaxEditorElement.Font = font as well, but while that doesn't blow up, it doesn't seem to change anything either.
Here's the full code for this event:
Private Sub fontDropdown_SelectedFontChanged(sender As Object, e As EventArgs) Handles fontDropdown.SelectedFontChanged
Dim editor As RadSyntaxEditor = GetActiveEditor()
If IsNothing(editor) Then Exit Sub
Dim ff As FontFamily = New FontFamily(fontDropdown.SelectedFont)
If ff.IsStyleAvailable(FontStyle.Regular) Then
Dim font As Font = New Font(ff.Name, 10, FontStyle.Regular)
editor.SyntaxEditorElement.EditorFontFamily = font.FontFamily
Else
For Each style As FontStyle In [Enum].GetValues(GetType(FontStyle))
If ff.IsStyleAvailable(style) Then
Dim font As Font = New Font(ff.Name, 10, style)
editor.Font = font
Exit For
End If
Next
End If
End Sub
I'm trying to save the current zoom level that a user has set for a document. I can get the value of the zoom level, but what I can't figure out how to do, is set the zoomcombobox to that value.
As an example, the default combo box has a list of values. If a user sets it to say 150%, I can save that value. I can use the zoomto method to set it and the document will scale to 150%. However, this doesn't change the zoomcombobox value, it stays at whatever it was (default of 100%).
The next problem is, the user can CTRL-Mousewheel to change the zoom level. This will add values to the zoomcombobox that were not previously there (meaning, the values will be different than those available in the zoomcombobox). Not really a problem on the surface, the document scales correctly, the zoomcombobox has the correct values.
But, if I reload the document and want to reset the zoom level to the users zoom preference, the odds are, the scale is not in the default set of values for the zoomcombobox.
I hope this makes some sense. =)
Hi,
I know this has been answered for other suites, but I can't find a suitable solution for WinForms.
In a hierarchical GridView, the expand arrow is shown for every entry, whether there is a child entry or not.
I want the icon only for entries with children, which is what users expect.
Thank you
Hi,
I have a MultiColumnComboBox with the activated ScrollOnMouseWheel function which make the mouse wheel scroll through the entries when the dropdown is closed, that is what I want.
But by scrolling this way every second item is skipped, and therefore half of the entires cannot be reached.
Is there a way to change that behaviour?
Thanks
Julian
FluentPalette.Palette.FontSizeS = 10;
FluentPalette.Palette.FontSize = 12;
FluentPalette.Palette.FontSizeL = 13;
FluentPalette.Palette.FontSizeXL = 14;
FluentPalette.Palette.FontFamily = new FontFamily("Segoe UI");