Telerik Forums
UI for WinForms Forum
1 answer
245 views

Hi For some reason the theme fluent dark is not being applied to a show dialog function. I have included the designer file and the main form code below for your to check but all other forms are working fine which is weird.

Main Form Code.

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Telerik.WinControls;
using FuelActivityTrackerDapperDal;
using FuelActivityTrackerDapperDal.Models;
using FuelActivityTrackerDesktop.Forms;
using System.Linq;
 
namespace FuelActivityTrackerDesktop.Forms
{
    
    public partial class Login : Telerik.WinControls.UI.RadForm
    {
        ActivityTrackerDapperDal db = new ActivityTrackerDapperDal();
        public IEnumerable<Users> _users { get; set; }
        public Login()
        {
            InitializeComponent();
            
        }
 
        private void Login_Load(object sender, EventArgs e)
        
            _users = db.GetALLUsers();
 
            ThemeResolutionService.ApplyThemeToControlTree(this, "FluentDark");
 
        }
 
        private void btnLogin_Click(object sender, EventArgs e)
        {
            if(txtUsername.Text == "")
            {
 
                MessageBox.Show("Please enter your login details", "Fuel");
                
 
            }
 
 
 
            Users _user = _users.Where(w => w.UserName.ToLower() == txtUsername.Text.Trim().ToLower() && w.Password.ToLower() == txtPassword.Text.Trim().ToLower()).FirstOrDefault();
            LoggedIn.UserName = _user.UserName;
            LoggedIn.UserId = _user.id;
            LoggedIn.StaffId = _user.StaffId;
            if (_user.isActive == true)
            {
                frmMain _frmmain = new frmMain();
                this.Hide();
                _frmmain.ShowDialog();
 
            }
            else
                MessageBox.Show("Your account has been made inactive , Please check with Administrator", "Fuel");
 
            DialogResult = DialogResult.OK;
         
        }
 
        private void txtPassword_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
                btnLogin_Click(sender, e);
        }
    }
}

 

 

Designer file of the form.

namespace FuelActivityTrackerDesktop.Forms
{
    partial class Login
    {
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;
 
        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }
 
        #region Windows Form Designer generated code
 
        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Login));
            this.imagePanel = new System.Windows.Forms.Panel();
            this.logoPictureBox = new System.Windows.Forms.PictureBox();
            this.radPanel1 = new Telerik.WinControls.UI.RadPanel();
            this.radLabel3 = new Telerik.WinControls.UI.RadLabel();
            this.radLabel2 = new Telerik.WinControls.UI.RadLabel();
            this.radLabel1 = new Telerik.WinControls.UI.RadLabel();
            this.txtPassword = new Telerik.WinControls.UI.RadTextBox();
            this.txtUsername = new Telerik.WinControls.UI.RadTextBox();
            this.btnCancel = new Telerik.WinControls.UI.RadButton();
            this.btnLogin = new Telerik.WinControls.UI.RadButton();
            this.fluentDarkTheme1 = new Telerik.WinControls.Themes.FluentDarkTheme();
            this.fluentTheme1 = new Telerik.WinControls.Themes.FluentTheme();
            this.imagePanel.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.logoPictureBox)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.radPanel1)).BeginInit();
            this.radPanel1.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.radLabel3)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.radLabel2)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.radLabel1)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.txtPassword)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.txtUsername)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.btnCancel)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.btnLogin)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this)).BeginInit();
            this.SuspendLayout();
            //
            // imagePanel
            //
            this.imagePanel.Controls.Add(this.logoPictureBox);
            this.imagePanel.Dock = System.Windows.Forms.DockStyle.Left;
            this.imagePanel.Location = new System.Drawing.Point(0, 0);
            this.imagePanel.Name = "imagePanel";
            this.imagePanel.Size = new System.Drawing.Size(129, 148);
            this.imagePanel.TabIndex = 9;
            //
            // logoPictureBox
            //
            this.logoPictureBox.Cursor = System.Windows.Forms.Cursors.Hand;
            this.logoPictureBox.Dock = System.Windows.Forms.DockStyle.Fill;
            this.logoPictureBox.Image = ((System.Drawing.Image)(resources.GetObject("logoPictureBox.Image")));
            this.logoPictureBox.Location = new System.Drawing.Point(0, 0);
            this.logoPictureBox.Name = "logoPictureBox";
            this.logoPictureBox.Size = new System.Drawing.Size(129, 148);
            this.logoPictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
            this.logoPictureBox.TabIndex = 0;
            this.logoPictureBox.TabStop = false;
            //
            // radPanel1
            //
            this.radPanel1.Controls.Add(this.radLabel3);
            this.radPanel1.Controls.Add(this.radLabel2);
            this.radPanel1.Controls.Add(this.radLabel1);
            this.radPanel1.Controls.Add(this.txtPassword);
            this.radPanel1.Controls.Add(this.txtUsername);
            this.radPanel1.Location = new System.Drawing.Point(152, 12);
            this.radPanel1.Name = "radPanel1";
            this.radPanel1.Size = new System.Drawing.Size(369, 117);
            this.radPanel1.TabIndex = 10;
            this.radPanel1.Text = "radPanel1";
            this.radPanel1.ThemeName = "FluentDark";
            //
            // radLabel3
            //
            this.radLabel3.AutoSize = false;
            this.radLabel3.Location = new System.Drawing.Point(3, 74);
            this.radLabel3.Name = "radLabel3";
            this.radLabel3.Size = new System.Drawing.Size(123, 24);
            this.radLabel3.TabIndex = 18;
            this.radLabel3.Text = "Password";
            this.radLabel3.ThemeName = "FluentDark";
            //
            // radLabel2
            //
            this.radLabel2.AutoSize = false;
            this.radLabel2.Location = new System.Drawing.Point(3, 48);
            this.radLabel2.Name = "radLabel2";
            this.radLabel2.Size = new System.Drawing.Size(123, 24);
            this.radLabel2.TabIndex = 17;
            this.radLabel2.Text = "UserName";
            this.radLabel2.ThemeName = "FluentDark";
            //
            // radLabel1
            //
            this.radLabel1.Location = new System.Drawing.Point(3, 12);
            this.radLabel1.Name = "radLabel1";
            this.radLabel1.Size = new System.Drawing.Size(156, 18);
            this.radLabel1.TabIndex = 16;
            this.radLabel1.Text = "Please enter your login details";
            this.radLabel1.ThemeName = "FluentDark";
            //
            // txtPassword
            //
            this.txtPassword.Location = new System.Drawing.Point(132, 76);
            this.txtPassword.Name = "txtPassword";
            this.txtPassword.Size = new System.Drawing.Size(192, 24);
            this.txtPassword.TabIndex = 15;
            this.txtPassword.ThemeName = "FluentDark";
            this.txtPassword.KeyDown += new System.Windows.Forms.KeyEventHandler(this.txtPassword_KeyDown);
            //
            // txtUsername
            //
            this.txtUsername.Location = new System.Drawing.Point(132, 48);
            this.txtUsername.Name = "txtUsername";
            this.txtUsername.Size = new System.Drawing.Size(192, 24);
            this.txtUsername.TabIndex = 14;
            this.txtUsername.ThemeName = "FluentDark";
            //
            // btnCancel
            //
            this.btnCancel.Location = new System.Drawing.Point(527, 42);
            this.btnCancel.Name = "btnCancel";
            this.btnCancel.Size = new System.Drawing.Size(110, 24);
            this.btnCancel.TabIndex = 12;
            this.btnCancel.Text = "Cancel";
            this.btnCancel.ThemeName = "FluentDark";
            //
            // btnLogin
            //
            this.btnLogin.Location = new System.Drawing.Point(527, 12);
            this.btnLogin.Name = "btnLogin";
            this.btnLogin.Size = new System.Drawing.Size(110, 24);
            this.btnLogin.TabIndex = 11;
            this.btnLogin.Text = "Login";
            this.btnLogin.ThemeName = "FluentDark";
            this.btnLogin.Click += new System.EventHandler(this.btnLogin_Click);
            //
            // Login
            //
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(660, 148);
            this.Controls.Add(this.imagePanel);
            this.Controls.Add(this.radPanel1);
            this.Controls.Add(this.btnCancel);
            this.Controls.Add(this.btnLogin);
            this.MaximizeBox = false;
            this.MinimizeBox = false;
            this.Name = "Login";
            //
            //
            //
            this.RootElement.ApplyShapeToControl = true;
            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
            this.Text = "Login";
            this.ThemeName = "Fluent";
            this.Load += new System.EventHandler(this.Login_Load);
            this.imagePanel.ResumeLayout(false);
            ((System.ComponentModel.ISupportInitialize)(this.logoPictureBox)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.radPanel1)).EndInit();
            this.radPanel1.ResumeLayout(false);
            this.radPanel1.PerformLayout();
            ((System.ComponentModel.ISupportInitialize)(this.radLabel3)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.radLabel2)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.radLabel1)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.txtPassword)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.txtUsername)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.btnCancel)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.btnLogin)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this)).EndInit();
            this.ResumeLayout(false);
 
        }
 
        #endregion
 
        private System.Windows.Forms.Panel imagePanel;
        private System.Windows.Forms.PictureBox logoPictureBox;
        private Telerik.WinControls.UI.RadPanel radPanel1;
        private Telerik.WinControls.UI.RadLabel radLabel3;
        private Telerik.WinControls.UI.RadLabel radLabel2;
        private Telerik.WinControls.UI.RadLabel radLabel1;
        private Telerik.WinControls.UI.RadTextBox txtPassword;
        private Telerik.WinControls.UI.RadTextBox txtUsername;
        private Telerik.WinControls.UI.RadButton btnCancel;
        private Telerik.WinControls.UI.RadButton btnLogin;
        private Telerik.WinControls.Themes.FluentDarkTheme fluentDarkTheme1;
        private Telerik.WinControls.Themes.FluentTheme fluentTheme1;
    }
}

 

 

 

 

 

 

 

Dimitar
Telerik team
 answered on 19 Mar 2019
1 answer
549 views

Hi, 

Is there any option to get the pdf document directly from a scanner device? 

Thanks in advance.

Dimitar
Telerik team
 answered on 19 Mar 2019
8 answers
344 views

Hi

I have a grid bound to an empty dataset. When I load the form, it shows an empty row in the grid instead of showing the "Click Here to Add a New Item". As soon as I've added a row, the "Click Here to Add a New Item" row appears. How can I get it to show "Click Here to Add a New Item" at the start instead of showing an empty row?

sebastien
Top achievements
Rank 1
 answered on 18 Mar 2019
4 answers
414 views

Hello Telerik Team,

I need to change Font of Form dynamically.

I'm facing a problem with RadForm.

Unlike the Microsoft's Form, Rad Form did not automatically resize the form and child control (I attached sample screen shot).

I can't understand why. Pls Explain.

 

 

Dimitar
Telerik team
 answered on 18 Mar 2019
0 answers
102 views

 Hello everyone,

      When I use the RadGridView control, I want to reserve three decimal digits for column 4 of the table, but I can't find the decimplaces attribute using

RadGridView.

For example: GridView_GVDetails. columns ("Quantity"). decimplaces = 3 It is prompted that decimplaces are not a member of GridViewDataColumn.

hong
Top achievements
Rank 1
 asked on 18 Mar 2019
0 answers
168 views

Dear All,

I have a problem.

Due to customer requirements, I set the SelectionMode attribute of radgridvbiew to CellSelect.

But I find that I can't select the whole row, because the row's header can't be selected

But I can't change the SelectionMode to FullRowSelect.

What should I do?

Who can help me?

Best wishes

Ricardo
Top achievements
Rank 1
 asked on 18 Mar 2019
5 answers
167 views

Hi guys,

quick and simple: after localization to german, from "Cancel" -> "Abbrechen" the cancel button is cut off, due to the longer text.

See the attached image. How can I fix it? 

Note: Making popup wider did not help. How do I access the cancel button to adjust it?

 

thx and best regards,

Darko

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 15 Mar 2019
2 answers
194 views

Hi,

i tried to change auto generated editor to RadMaskedEditBox like here, but it doesn't work in DataLayout, while changing same way to Combo, Textbox, Checkbox works ok. For RadMaskedEditBox binding is not created. Any workaround for that?

 

Thanks

Alex

 

Alex Dybenko
Top achievements
Rank 2
 answered on 15 Mar 2019
3 answers
189 views

Version 2019.1.219

I've been receiving the above exception on my grids when they're initially filled with their first page of data and on first call to BestFitColumns.

When tracing into decompiled source, the error is thrown on the function in StretchVirtualGridColumnLayout.cs

/// <summary>Starts the column resize.</summary>
    /// <param name="column">The column.</param>
    public override void StartColumnResize(int column)
    {
      if (!this.stretchableColumns.Contains(column))
        return;

 

stretchableColumns are null at this moment which is what's throwing the exception.

Investigating further by placing some break points, the above function is being called before the function "public override void CalculateColumnWidths(SizeF availableSize)" which actually generates the stretchableColumns list.

Im sorry, but I can't include a sample project at this time as the code is too complex.

The grid.OnCellValueNeeded event drives obtaining the data.

I'm not sure where I should call the BestFitColumns method. I am receiving the exception in the OnCellNeeded and OnCellFormatting events on the first call.

Can you advise please?

 

Dimitar
Telerik team
 answered on 14 Mar 2019
2 answers
127 views

Hi all,

I've got a question about the scheduler: Is it possible to change the position of the ruler and the day/group header? I need to show the day header (with grouping) on the vertical axis and the ruler on the horizontal axis. Is that possible?

 

Best regards

 

Markus

Dess | Tech Support Engineer, Principal
Telerik team
 answered on 14 Mar 2019
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
Buttons, RadioButton, CheckBox, etc
ListView
ComboBox and ListBox (obsolete as of Q2 2010)
Form
Chart (obsolete as of Q1 2013)
PageView
MultiColumn ComboBox
TextBox
RichTextEditor
PropertyGrid
Menu
RichTextBox (obsolete as of Q3 2014 SP1)
Panelbar (obsolete as of Q2 2010)
PivotGrid and PivotFieldList
Tabstrip (obsolete as of Q2 2010)
MaskedEditBox
CommandBar
PdfViewer and PdfViewerNavigator
ListControl
Carousel
GanttView
Diagram, DiagramRibbonBar, DiagramToolBox
Panorama
New Product Suggestions
VirtualGrid
Toolstrip (obsolete as of Q3 2010)
AutoCompleteBox
Label
Spreadsheet
ContextMenu
Panel
Visual Studio Extensions
TitleBar
SplitContainer
Documentation
Map
DesktopAlert
CheckedDropDownList
ProgressBar
MessageBox
TrackBar
Rotator
SpinEditor
CheckedListBox
StatusStrip
CollapsiblePanel
LayoutControl
ShapedForm
SyntaxEditor
Wizard
TextBoxControl
Conversational UI, Chat
DateTimePicker
TabbedForm
CAB Enabling Kit
WaitingBar
GroupBox
DataEntry
ScrollablePanel
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
FileDialogs
ColorDialog
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
NavigationView
BindingNavigator
RibbonForm
Styling
Barcode
PopupEditor
TaskBoard
Callout
ColorBox
PictureBox
FilterView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
BreadCrumb
ButtonTextBox
FontDropDownList
BarcodeView
Overlay
Security
LocalizationProvider
Dictionary
TreeMap
StepProgressBar
SplashScreen
Flyout
Separator
SparkLine
ToolbarForm
NotifyIcon
DateOnlyPicker
AI Coding Assistant
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
SpeechToTextButton
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?