Telerik Forums
UI for WinForms Forum
2 answers
14 views

Hi there,

I have a RadRibbonBar which contains a RadSplitButton element and I'm using Windows11Compact Theme.

I have set splitBtn.ArrowPosition = Bottom and ImageAlignment and TextAligment = TopCenter.
I want the image and text to be centered on the button but they are both aligned right. I notice this only happens with the Windows11 themes, and only to the RadSplitButton. The DropdownButton image/text is correctly centered, however I need to use the split button as there is an event triggered when the button portion of the control is clicked.
I have tried searching for other alignment properties in the UI Elements and setting them all to TopCenter but that still does not solve the problem.

Is this the expected behaviour/appearance? And is there a way I can have the image and text centered on the control?

I have attached a screenshot of the issue I am experiencing.

Thank you,
Carmen

Carmen
Top achievements
Rank 1
Iron
 answered on 15 Apr 2024
1 answer
23 views
We are currently working with Telerik Winforms 2021.1.223.40
and We'd like to seek advice on.

In our Winforms application, we call the Click event of RadRepeatButton.
When occurs the click event of this button, we show Telerik messagebox after certain data checks.

When showing Telerik messagebox, we make layout of RadMessageBox through a method named "SetDesing()".
To this end we call a method name ""RadMessageBox.Show".

The problem occurs after calling "RadMessageBox.Show()". Even though we wrote the code that return after this call, the return does not occur. Instead, It repeatedly triggers the Click event of the RadRepeatButton. (It almost like a recursive function.)

Below are the detailed codes and the call stacks.
Nadya | Tech Support Engineer
Telerik team
 answered on 05 Feb 2024
1 answer
54 views

I have a simple form, in which the first two controls are radio buttons. I dont' want either radio button checked, but no matter what I do, the first radio button is always checked when I run the form.   I want the user to have to pick one of the radio buttons, and if they don't we have code that warns a one of the radio buttons must be picked.   Witht hat said, I am kind of stuck, as I played with setting them both to IsChecked = false and CheckState = CheckState.UnChecked, but the first RadioButton, at runtime, gets checked anyway.   

 

Also, I don't want the radio button to auto check when the user uses the ARROW keys to switch between them. I want the user to have to either click the SPACE BAR or click with the mouse, is this possible.

 

TIA

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 08 Nov 2023
1 answer
36 views

I have a Form with 4 group boxes each containing 2 radio buttons - Yes and No - obviously each set mutually exclusive. The IsChecked properties of each are bound to boolean values. All 8 properties are set to false. However, when the form displays, the first Yes button is checked. Even when I unbind them and explicitly set them all to false, the first option is set t true.

s there any way for all buttons to be set to false?

Thanks

Carl

Nadya | Tech Support Engineer
Telerik team
 answered on 25 Oct 2023
2 answers
50 views

I did not find the element, primitive or whatever may be responsible for the color of the hook when a RadCheckBox is checked. Adjusting ButtonElement.CheckMarkPrimitive.CheckElement.ForeColor only applies to the indeterminate square but not to the checked hook.

Am I even able to adjust it's color and would it be dependend of ButtonElement.CheckMarkPrimitive.CheckElement.CheckPrimitiveStyle?

 

 

Dinko | Tech Support Engineer
Telerik team
 answered on 01 Sep 2023
3 answers
62 views

Hello,

I wonder if it is possible to combine the RoundRectShape with EnableHighlight and EnableBorderHighlight while also have the highlighted parts considering the rounded corners in order to not paint further as those.

 

Now, if I combine those, I have 3 issues (see picture):

1.  the complete "rectangle" button area is highlighted, means: the rounded corners are ignored

2. the highlighted border is also a rectangled border on the corners and not round.

3. when moving the mouse away (near the corners), the "lost focus" event (or something similar) seem not to fire correctly - thereby the highlighted area is still shown

 

Can this be resolved and if so: how?

 

Thanks

Dinko | Tech Support Engineer
Telerik team
 answered on 10 Aug 2023
1 answer
68 views

Hi,

I'm trying to retain the background color of a button on the click event to indicate it's the last button that was selected. Clicking another button should reset the first button then highlight the second button. All four backcolor assignments work fine, but on the reset side only the first backcolor property seems to work.


        Dim theme As Theme = ThemeRepository.FindTheme(Me.myButton.ThemeName)
        Dim repository As StyleRepository = theme.FindRepository("ButtonMouseDownFill")
        Dim setting As PropertySetting
        Dim bColor As Color, bColor2 As Color, bColor3 As Color, bColor4 As Color

        setting = repository.FindSetting("BackColor") : bColor = CType(setting.EndValue, Color)
        setting = repository.FindSetting("BackColor2") : bColor2 = CType(setting.EndValue, Color)
        setting = repository.FindSetting("BackColor3") : bColor3 = CType(setting.EndValue, Color)
        setting = repository.FindSetting("BackColor4") : bColor4 = CType(setting.EndValue, Color)

        Select Case buttonName
            Case Me.btnFirst.Name
                Me.btnSecond.ButtonElement.ButtonFillElement.ResetValue(LightVisualElement.BackColorProperty, ValueResetFlags.Local)
                Me.btnSecond.ButtonElement.ButtonFillElement.ResetValue(LightVisualElement.BackColor2Property, ValueResetFlags.Local)    '<-- doesn't work
                Me.btnSecond.ButtonElement.ButtonFillElement.ResetValue(LightVisualElement.BackColor3Property, ValueResetFlags.Local)    '<-- doesn't work
                Me.btnSecond.ButtonElement.ButtonFillElement.ResetValue(LightVisualElement.BackColor4Property, ValueResetFlags.Local)    '<-- doesn't work

                Me.btnFirst.ButtonElement.ButtonFillElement.BackColor = bColor
                Me.btnFirst.ButtonElement.ButtonFillElement.BackColor2 = bColor2
                Me.btnFirst.ButtonElement.ButtonFillElement.BackColor3 = bColor3
                Me.btnFirst.ButtonElement.ButtonFillElement.BackColor4 = bColor4

            Case Me.btnSecond.Name
                Me.btnFirst.ButtonElement.ButtonFillElement.ResetValue(LightVisualElement.BackColorProperty, ValueResetFlags.Local)
                Me.btnFirst.ButtonElement.ButtonFillElement.ResetValue(LightVisualElement.BackColor2Property, ValueResetFlags.Local)    '<-- doesn't work
                Me.btnFirst.ButtonElement.ButtonFillElement.ResetValue(LightVisualElement.BackColor3Property, ValueResetFlags.Local)    '<-- doesn't work
                Me.btnFirst.ButtonElement.ButtonFillElement.ResetValue(LightVisualElement.BackColor4Property, ValueResetFlags.Local)    '<-- doesn't work

                Me.btnSecond.ButtonElement.ButtonFillElement.BackColor = bColor
                Me.btnSecond.ButtonElement.ButtonFillElement.BackColor2 = bColor2
                Me.btnSecond.ButtonElement.ButtonFillElement.BackColor3 = bColor3
                Me.btnSecond.ButtonElement.ButtonFillElement.BackColor4 = bColor4


        End Select

Dinko | Tech Support Engineer
Telerik team
 answered on 03 Aug 2023
1 answer
52 views

Hello,

i desing button with angle 45 degree. but button showing square

 

i dont need sent to back rad button1,

 


i dont want see gray area. how can i do it?

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 12 Apr 2023
1 answer
96 views

Hi,

sorry for a very naïve question :

When using a GridViewCheckBoxColumn with subscription to both ValueChanged events and HeaderCellToggleStateChanged, if I uncheck the header checkbox, the ValueChanged event is fired for each existing (checkbox) row in the gridview.

This is not occuring when the header checkbox is checked (in which case only the HeaderCellToggleStateChanged event occurs).

How can I prevent this behavior (while still allowing two successive events if for example I uncheck the header and just after check a row checkbox).

I probably missed some doc somewhere about this ...

Thanks

Patrick

Dinko | Tech Support Engineer
Telerik team
 answered on 27 Mar 2023
1 answer
136 views

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

 

Dinko | Tech Support Engineer
Telerik team
 answered on 27 Mar 2023
Narrow your results
Selected tags
Tags
GridView
General Discussions
Scheduler and Reminder
Treeview
Dock
RibbonBar
Themes and Visual Style Builder
ChartView
Calendar, DateTimePicker, TimePicker and Clock
DropDownList
ComboBox and ListBox (obsolete as of Q2 2010)
ListView
Chart (obsolete as of Q1 2013)
Form
PageView
MultiColumn ComboBox
TextBox
RichTextEditor
Menu
PropertyGrid
RichTextBox (obsolete as of Q3 2014 SP1)
Panelbar (obsolete as of Q2 2010)
Tabstrip (obsolete as of Q2 2010)
PivotGrid and PivotFieldList
MaskedEditBox
CommandBar
PdfViewer and PdfViewerNavigator
ListControl
Carousel
Diagram, DiagramRibbonBar, DiagramToolBox
Panorama
GanttView
New Product Suggestions
Toolstrip (obsolete as of Q3 2010)
AutoCompleteBox
Label
VirtualGrid
ContextMenu
Spreadsheet
Panel
Visual Studio Extensions
TitleBar
Documentation
SplitContainer
Map
DesktopAlert
ProgressBar
Rotator
TrackBar
MessageBox
CheckedDropDownList
SpinEditor
StatusStrip
CheckedListBox
Wizard
ShapedForm
SyntaxEditor
TextBoxControl
LayoutControl
CollapsiblePanel
Conversational UI, Chat
DateTimePicker
CAB Enabling Kit
TabbedForm
DataEntry
GroupBox
ScrollablePanel
WaitingBar
ImageEditor
ScrollBar
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
ColorDialog
FileDialogs
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
BindingNavigator
PopupEditor
RibbonForm
Styling
TaskBoard
Barcode
Callout
ColorBox
PictureBox
VirtualKeyboard
FilterView
Accessibility
DataLayout
NavigationView
ToastNotificationManager
CalculatorDropDown
Localization
TimePicker
ValidationProvider
FontDropDownList
Licensing
BreadCrumb
ButtonTextBox
LocalizationProvider
Dictionary
Overlay
Security
Separator
SparkLine
TreeMap
StepProgressBar
SplashScreen
ToolbarForm
NotifyIcon
Rating
TimeSpanPicker
BarcodeView
Calculator
OfficeNavigationBar
Flyout
TaskbarButton
HeatMap
SlideView
PipsPager
+? more
Top users last month
Dominik
Top achievements
Rank 1
Giuliano
Top achievements
Rank 1
Dominic
Top achievements
Rank 1
Glendys
Top achievements
Rank 1
NoobMaster
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Dominik
Top achievements
Rank 1
Giuliano
Top achievements
Rank 1
Dominic
Top achievements
Rank 1
Glendys
Top achievements
Rank 1
NoobMaster
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?