====== Web Resources ======
**RadControls for WinForms**
http://docs.telerik.com/devtools/winforms/introduction
__Support**\\
**__Main page: http://www.telerik.com/support/winforms\\
Submit Ticket - Product list: http://www.telerik.com/account/support-tickets/available-support-list\\
Submit Ticket – WinForms: http://www.telerik.com/account/support-tickets/contact-support-team.aspx?odid=3559243&pid=523\\
http://www.telerik.com/account/support-tickets/new-support-ticket.aspx
Forums – http:%%//%%www.telerik.com/community/forums/winforms.aspx\\
Knowledge Base – http:%%//%%www.telerik.com/support/kb/winforms.aspx\\
Code Libraries – http://www.telerik.com/community/code-library/winforms.aspx
===== Telerik Training & Demo Videos =====
http://www.telerik.com/videos/winforms
====== .NET (dotNET) Version for our Projects/Products ======
As of Dec 2015 all our projects will move to .NET version 4.5.2.
Per [[http://blogs.msdn.com/b/dotnet/archive/2015/12/09/support-ending-for-the-net-framework-4-4-5-and-4-5-1.aspx|this article]]: //“As previously announced, starting January 12, 2016 Microsoft will no longer provide security updates, technical support or hotfixes for .NET 4, 4.5, and 4.5.1 frameworks. All other framework versions, including 3.5, 4.5.2, 4.6 and 4.6.1, will be supported for the duration of their established lifecycle.”//
====== Maintaining Telerik ======
===== Identify Installed Version(s) =====
{{tdn:image1.png?421x288|C:\Users\rgray\AppData\Local\Temp\SNAGHTML19abb10d.PNG}}
===== Update Telerik Installation =====
As of 07/28/2021 we are using version: 2020.1.113.40
You can download ‘Older Versions’ of specific packages from http://www.telerik.com/account/your-products/download-list.aspx
Since we will all be on the same version, all projects will use Telerik from the GAC (“UI for WinForms, v. XXX (Dev) [GAC]”)
Here is a video on the process:
[[../../../..//192.168.93.1/KB_MiM/Telerik/20151013)%20Telerik%20Q2%20update%20install%20each%20October.mp4|\\192.168.93.1\KB_MiM\Telerik\20151013) Telerik Q2 update install each October.mp4]]
After the new Telerik version install we will need to Upgrade the Common Library (1st) then all our Solutions to use this newest version.
Here is a video on the Telerik Solution ‘Upgrade Wizard’:
[[../../../..//192.168.93.1/KB_MiM/Telerik/20151013)%20Run%20Telerik%20Solution%20'Upgrade%20Wizard'%20after%20installing%20Q2%20update%20in%20October.mp4|\\192.168.93.1\KB_MiM\Telerik\20151013) Run Telerik Solution 'Upgrade Wizard' after installing Q2 update in October.mp4]]
====== Create Telerik Solution for Legality projects ======
I'm only building UIs so my work will be here: LS.ProductName\ProjectName.Presentation.
===== Create a Telerik Solution using the Telerik Wizard =====
[[http://docs.telerik.com/devtools/winforms/installation-deployment-and-distribution/visual-studio-extensions/create-project?utm_source=vs|http:%%//%%docs.telerik.com/devtools/winforms/installation-deployment-and-distribution/visual-studio-extensions/create-project]]
==== VS 2022 ====
{{tdn:image2.png?483x328}}
==== Core vs. Traditional .NET (v4.x) ====
{{tdn:image3.png?563x382}}
**UPDATE:** Going back to .NET Framwork projects. There is a bug in VS 2022 that breaks the toolbox for Core controls.
{{tdn:image4.png?610x423}}
{{tdn:image5.png?612x496}}
==== Older VS Versions ====
- Click: "Telerik | RadControls for WinForms | Create New Telerik Project"
- **New Project** dialog
* Choose .NET Framework version from dropdown. (Currently 4.5.2)
* "Templates | Telerik | Windows"
* Choose "C# RadControls Windows Forms Application"
* Enter a Project name like “LS.TelerikControls.Presentation”
* Enter a Solution name like “LS.TelerikControls”
* Enter a root path (“C:\DevGIT”) but don’t specify the solution folder. That will be created when you…
* Check the box to “Create directory for solution”
* {{tdn:image6.png?624x402}}
- **Project Configuration Wizard** dialog
* Next select the Project and use the Telerik ‘Configuration Wizard’ ("Telerik | UI for WinForms | Configure Project") to pick the ‘Components’ and ‘Themes’ required by your application.\\ \\ You can return to this dialog later by: "Telerik | UI for WinForms | Configure Project".\\ \\ ### SOMEWHERE WE NEED TO SET THiS. I’m not sure where in the new Telerik version: Choose “UI for WinForms, v. XXX (Dev) [GAC]”. This is our new plan starting with v2015.2.728.40
* **Configure Project**
* Choose “UI for WinForms, v. XXX (Dev) [GAC]”. This is our new plan starting with v2015.2.728.40\\ \\ {{tdn:image7.png?559x453}}
* **Choose Components**
* Telerik.WinControls
* Telerik.WinControls.GridView (unless it won't be used)
* Telerik.WinControls.RadDock (unless it won't be used)
* Telerik.WinControls.UI
* //Telerik.Common appears to be included by default//
* **Themes tab**
* {{tdn:image8.png?576x467}}
* **We use these themes**
* Telerik.WinControls.Themes.Desert
* Telerik.WinControls.Themes.Office2010Black
* Telerik.WinControls.Themes.Office2010Blue
* Telerik.WinControls.Themes.Office2010Silver
* Telerik.WinControls.Themes.Office2013Dark
* Telerik.WinControls.Themes.Office2013Light
* Telerik.WinControls.Themes.TelerikMetro
* Telerik.WinControls.Themes.TelerikMetroBlue
* Telerik.WinControls.Themes.Windows7
* Telerik.WinControls.Themes.Windows8
4. Click
//Note: you must add using Telerik.WinControls.UI; to the top of rfrmMain.cs
//pop systray menu on mouse click
private void niMain_MouseDown(object sender, MouseEventArgs e)
{
//click left mouse button on SysTray icon to pop the menu
if (e.Button != MouseButtons.Left)
return;
if (rcmMain.DropDown.Visible)
rcmMain.DropDown.ClosePopup(RadPopupCloseReason.CloseCalled);
else
rcmMain.Show(MousePosition);
}
// Hide rfrmMain by default for a SysTray app
WindowState = FormWindowState.Minimized; //minimize rfrmMain
ShowInTaskbar = false; // ...and don't show it on the TaskBar
7. Open the rfrmMain in design view, select each of the rcmMain menu items you create from the Properties tool window dropdown. Switch from Properties to Events and add a ‘Click’ event handler.
8.
public frmMain()
{
InitializeComponent();
//Visible = false; %%//%% hide the form by default - THIS METHOD DOESN'T WORK. Do this instead:
WindowState = FormWindowState.Minimized; %%//%% minimize frmMain
ShowInTaskbar = false; %%//%% ...and don't show it on the TaskBar
**Pop the systray menu on mouse click (bind the RadContextmenu to the NotifyIcon)**
//pop systray menu on mouse click
void niMain_MouseDown(object sender, MouseEventArgs e)
{
if (e.Button == System.Windows.Forms.MouseButtons.Left) %%//%% click left mouse button on SysTray
icon to pop the menu
rcmMain.Show(MousePosition); %%//%% bind the RadContextmenu to the NotifyIcon
}
**Show/Hide frmMain on Minimize**
private void radMenuItem4_Click(object sender, EventArgs e) // Show frmMain
{
Visible = true;
this.WindowState = FormWindowState.Normal;
ShowInTaskbar = true; // ...and show it on the TaskBar
}
private void frmMain_Resize(object sender, EventArgs e) // Hide frmMain
{
if (WindowState == FormWindowState.Minimized)
Visible = false;
}
private void rmiCheckForUpdates_Click(object sender, EventArgs e)
{
string exeFilePath = System.Reflection.Assembly.GetExecutingAssembly().Location;
string workPath = System.IO.Path.GetDirectoryName(exeFilePath);
if(File.Exists(workPath + "\\updater.exe"))
{
Process.Start(workPath + "\\updater.exe");
}
else
{
RadMessageBox.Show("Application Update Unavailable",
SystemSettings.AssemblyData.Title, MessageBoxButtons.OK, RadMessageIcon.Exclamation);
}
}
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; // Control the type of form border
* None
* FixedSingle
* FixedDialog
* Sizable
* FixedToolWindow
* SizableToolWindow
===== TitleBar =====
this.ControlBox = false; // hide the form control buttons
this.Text = String.Empty; // hide (collapse) the form titlebar
this.Text = " "; // show the form titlebar but display no text
===== Position =====
**Center a form on screen**
this.StartPosition = CenterScreen; // Center the form on screen when it is opened
* Manual
* CenterScreen
* WindowsDefaultLocation
* WindowsDefaultBounds
* CenterParent
CenterToScreen(); // move the form to center screen while it is already open
===== Size =====
For a fixed size window, you still use FormBorderStyle.SizableToolWindow. If you want to really enforce the size, you could also set MinimumSize equal to MaximumSize on the form.
**Force a form to a specific size**
int CollapsedWidth = 505; // default size when collapsed (History is NOT visible)
int CollapsedHeight = 258;
public rfrmMain()
{
InitializeComponent();
Width = CollapsedWidth; // set the default collapsed form size
Height = CollapsedHeight;
…
**Resize a form to display a hidden area based on a Toggle button (from ‘LS.GIT_TM_TimeTracker’)**
private void rtbtnHistory_ToggleStateChanged(object sender, StateChangedEventArgs args)
{
if(rtbtnHistory.IsChecked)
{
// Show History
Width = HistoryWidth; %%//%% Show history
Height = HistoryHeight;
FormBorderStyle = FormBorderStyle.SizableToolWindow; %%//%% allow resize
CenterToScreen();
}
else
{
//Hide History
HistoryWidth = Width; %%//%% preserve current size
HistoryHeight = Height;
Width = CollapsedWidth; %%//%% set to default collapsed form size
Height = CollapsedHeight;
FormBorderStyle = FormBorderStyle.FixedToolWindow; %%//%% disable resize
CenterToScreen();
}
}
public rfrmRadAboutBox()
{
InitializeComponent();
// Initialize the AboutBox to display the product information from the assembly information.
// Change assembly information settings for your application through either of these options::
// - Project | Properties | Application |
private void rfrmRadAboutBox_Load(object sender, EventArgs e)
{
Text = $"About {SystemSettings.AssemblyData.Title}"; // AboutBox form.text title from Assembly text ("About %title%")
}
=== Example About Box Description for our custom applications ===
/* Example description for a custom application
radTextBoxDescription.Text = "This custom application was developed by Legality Software" + Environment.NewLine + Environment.NewLine +
"for the exclusive use of " + Environment.NewLine + Environment.NewLine +
"Healthcare Legal Solutions, LLC" + Environment.NewLine + Environment.NewLine + Environment.NewLine + Environment.NewLine +
"Use by any other entity is prohibited without permission from Legality Software."; %%//%% Hard coded description text
*/
{{tdn:image27.png?250}}
**The RadAboutBox pulls its info from the Assembly information (from the Project Properties).**
Per the comment you can edit the AboutBox content by\\
* Changing the Assembly information either directly in the IDE \\
* By editing the \Properties\AssemblyInfo.cs file.\\
* Or you could override the Assembly info above and hard code whatever you want.\\
**Display the RadAboutBox form like any other:**
private void rmiAbout_Click(object sender, EventArgs e)
{
using (rfrmRadAboutBox rfrmRadAboutBox = new rfrmRadAboutBox()) // create an instance of the form
{
rfrmRadAboutBox.ShowDialog(this); // then show/opens it
}
}
{{tdn:image28.png?348x262}}
Note the text from the Assembly Info dialog above
**Change the AboutBox Picture**
{{tdn:image29.png?720x323|A screenshot of a computer Description automatically generated}}
In the design view, click the picture box element and view properties. Select to change the image and select project resources. Import image like below.
{{tdn:image30.png?720x452|A screenshot of a computer Description automatically generated}}
===== RadShapedForm – rfrmshp =====
http://docs.telerik.com/devtools/winforms/forms-and-dialogs/shapedform/shapedform
The ShapedForm control allows you to design and display a Windows form with any conceivable shape. You can couple this control with the RadTitleBar control to easily add forms with a completely custom look and feel.
{{tdn:image31.png?189x186|A screenshot of a computer Description automatically generated}}
====== Control Notes & Naming Conventions ======
===== Common Control Properties =====
Dock - Property on various controls to fill a space (container)
* 'Dock' \Layout
Anchor - Anchor to any or all 4 sides of container to auto-resize with container. Works well within a TableLayoutPanel control.
* 'Anchor' \Layout
===== Windows Controls (Non-Telerik) =====
==== LinkLabel – llbl ====
**NOTE: Instead of LinkLabel see the
[Category("Legality Software")]
public bool ViewsExpandCollapseAllVisible
{
get { return tlpQueryListTree.ColumnStyles[2].Width == rbtnTreeExpandAll.Width + rbtnTreeCollapseAll.Width + 14; } // return true if col currently as wide as buttons + 14px buffer
set { if (value)
tlpQueryListTree.ColumnStyles[2].Width = rbtnTreeExpandAll.Width + rbtnTreeCollapseAll.Width + 14; // Show the column (set size to width of buttons + 14px buffer)
else
tlpQueryListTree.ColumnStyles[2].Width = 0; %%//%% Hide the column (set width = 0)
}
}
Also see [[#_Setup_Properties_Configurable|Setup Properties Configurable in the VS IDE]] for more show/hide column/row options as uc Properties via the IDE
RadMessageBox.Show("Message text", "Title/Caption Text", MessageBoxButtons.AbortRetryIgnore, "Details Text");
{{tdn:image35.png?265x132|forms-and-dialogs-messagebox-parameters 001}}
=== Examples ===
using Telerik.WinControls; // required by RadMessageBox
using System.Windows.Forms; // required by RadMessageBox button names
private void radButton1_Click(object sender, EventArgs e)
{
RadMessageBox.SetThemeName("Desert");
DialogResult ds = RadMessageBox.Show(this, "Are you sure?", "Title", MessageBoxButtons.YesNo,
RadMessageIcon.Question);
this.Text = ds.ToString();
}
RadMessageBox.Show("I’ll wait till you click …", "Hold on for a bit", MessageBoxButtons.OK, RadMessageIcon.None); // Just hold on a bit
RadMessageBox.Show("Here’s how to stretch a "
+ "long string across "
+ "multiple lines.", "Help", MessageBoxButtons.OK, RadMessageIcon.None);
if (RadMessageBox.Show("Exit TM Field Utility?", "TM Field Utility", MessageBoxButtons.YesNo, RadMessageIcon.Question) == DialogResult.No)
e.Cancel = true;
// You must set both SizeMode and AbsoluteSize properties
window4.TabStrip.SizeInfo.SizeMode = SplitPanelSizeMode.Absolute;
window4.TabStrip.SizeInfo.AbsoluteSize = new Size(150, 0); // absolutely 150 pixels wide
window2.TabStrip.SizeInfo.SizeMode = SplitPanelSizeMode.Relative;
window2.TabStrip.SizeInfo.RelativeRatio = new SizeF(0, 0.33f); // relatively 1/3 of the other window
=== RadDock Properties (parent container) ===
You will probably have to select the Dock control from the VS ‘Document Outlline’
this.radDock1.DocumentTabsAlignment = TabStripAlignment.Left; // Show the documentWindow tab strip on the left edge
this.radDock1.DocumentTabsTextOrientation //
this.radDock1.DocumentTabsVisible = False; // Hide the tabs for all documents
this.radDock1.DragDropAllowedStates = All // Docked, TabbedDocument, Hidden, AutoHide, Floating
*
this.radDock1.MainDocumentContainerVisible = false;
* Orientation – Horiz/Vertical
*
documentTabStrip1.TabStripVisible = False; // Hide the DocumentTabStrip (to hide the doc window tabs and global close button)
=== DocumentWindow – rddw (great grandchild control) ===
Individual Document Windows, like source files in VS You can put a RadSplitContainer in a documentWindow, but not right in the RadDock
* DefaultFloatingSize –
* radDock.DocumentButtons =
documentWindow1.CloseAction = Telerik.WinControls.UI.Docking.DockWindowCloseAction.Hide; // CloseAction = Hide, else Window is destroyed on close request
documentWindow1.DockState == DockState.Hidden // Hide documentWindow
documentWindow1.DockState == DockState.TabbedDocument // Show documentWindow
documentWindow1.DockState = documentWindow1.DockState == DockState.Hidden ? DockState.TabbedDocument : DockState.Hidden; // Toggle Show/Hide
DockWindow[] hiddenWindows = this.radDock1.DockWindows.GetWindows(DockState.Hidden); // Get a collection of all Hidden documentWindows
**Here’s another way:**
//Hide document window tab on main form
documentWindow3.TabStripItem.Visibility = ElementVisibility.Collapsed;
ToolTabStrip – rdtwts (child container)
Header strip above a ToolWindow with optional caption text and control buttons Click on the right end (on the ‘X’) to select the tool window tab strip
this.toolTabStrip1.Text = ‘This is irrelevant!’; // The Text on the ToolStrip is controlled by the ToolWindow.Text property
this.toolTabStrip1.CaptionVisible = false; // Hide the caption of a single ToolTabStrip
this.radDock1.ShowToolCloseButton = false; // Hide the ToolWindow close button
this.AllowedDockState = AllowedDockState.AutoHide | AllowedDockState.Docked; // Force stay docked and not allow the user to move it
this.DockState = Telerik.WinControls.UI.Docking.DockState.AutoHide; // Collapse/AutoHide the ToolWindow (not visible in the IDE)
//Options: AutoHide, Docked, Floating, Hidden, TabbedDocument
=== ToolWindow – rdtw (grandchild control) ===
Window dockable to any of the 4 sides by default, like VS Properties window\\ See this article on [[http://www.telerik.com/help/winforms/dock-object-model-allowed-dock-states.html|AllowedDockStates]] to control floating, etc. And this: [[http://www.telerik.com/forums/909245-disable-the-floating-feature]]\\ \\ Click in the tool window body (below the ToolTabStrip)
* ToolCaptionButtons - None, Close, AutoHide (the stickpin), SystemMenu, All – buttons on right of ToolWindow
* this.ToolCaptionButtons = ToolStripCaptionButtons.AutoHide; // Shows only the stickpin. Options:
// None – no buttons
// Close – if you close you can’t get it back
// Autohide – only show the stickpin
// SystemMenu – drop down with multiple options
// All
* this.radDock1.ToolTabsAlignment = TabStripAlignment.Right; // Show the ToolWindow tab strip on the left edge
this.radDock1.ToolTabsVisible = false; // Hide the ToolWindow tab area on the RadDock
ContextMenuStrip –shortcut menu to display on right click
**toolWindow.Caption** – Text header that appears on ToolTabStrip above the ToolWindow.
**toolWindow.text** – Text in the expand button visible when the ToolWindow is unpinned. //(.Caption is the text in the ToolTabStrip above the ToolWindow.)
RadPageViewPage.ViewMode // Types (ViewMode) of page displays. Options are:
* [[http://www.telerik.com/help/winforms/pageview-stripview-getting-started.html|Strip]] – regular tabs across one of the 4 edges
* {{tdn:image38.png?286x231|A screenshot of a computer Description automatically generated}}
* [[http://www.telerik.com/help/winforms/pageview-stackview-overview.html|Stack]] – An accordion style stack with the selected page name (header) on top, the buttons on 1 of 4 sides and the content displayed next to, on-top of the items’ stack, or next to the selected item (where the buttons move as selected).
* {{tdn:image39.png?286x231|A screenshot of a computer Description automatically generated}}
* RadPageViewPage.ViewElement.[[http://www.telerik.com/help/winforms/pageview-stackview-customizing-the-stack-position.html|StackPosition]] – specify which side buttons are on
* RadPageViewPage.ViewElement.[[http://www.telerik.com/help/winforms/pageview-stackviewview-customizing-the-selection-mode.html|ItemSelectionMode]] - content displayed on-top of the item button stack, or next to the selected item (where the buttons move as selected)
* Standard – content above button/item stack. Buttons don’t move.
* ContentWithSelected – content between buttons which move move as selected (probably best)
* ContentAfterSelected – content and buttons move here as well but it’s hard to tell which button
* RadPageViewPage.ViewElement.ItemSizeMode – maybe look at this one too
* [[http://www.telerik.com/help/winforms/pageview-outlookview-overview.html|Outlook]] – Buttons stay stacked on the bottom and the pages appear like the left pane of Outlook
* {{tdn:image40.png?291x235|A screenshot of a computer Description automatically generated}}
* [[http://www.telerik.com/help/winforms/pageview-explorerbarview-overview.html|ExplorerBar]] – display multiple visible pages at once in a scrolling mechanis. Offers 3 types of content sizing (FixedLength, AutoSizeToBestFit, EqualLength) & 2 stack positions (Top, Left). In this case the Headings move up and down with the data. They even move vertically outside the visible area possibly leaving the user unsure of context.
* {{tdn:image41.png?290x234|A screenshot of a computer Description automatically generated}}
* [[http://www.telerik.com/help/winforms/pageview-backstageview-getting-started.html|BackStage]] – options on left with a cute graphic indicator and selected page on right
* {{tdn:image42.png?290x234|A screenshot of a computer Description automatically generated}}
* Add as a child to an existing container: 1st select the container then double click the RadPageView control to add
* Text - choose the parent 'RadPageView' or child 'RadPageViewPage#' from the Property panel dropdown to change properties for each page button
* The ‘Pages’ collection (in the Property Grid) defines the individual pages at design time
Quick Tasks Button
* 'Add Page' to add pages
* 'Strip Buttons' = "None" to hide
// Stick this right after “InitializeComponent();” on the form or UC.
// Hide all RadPageView 'Page' tabs
foreach (Telerik.WinControls.UI.RadPageViewPage item in radPageView.Pages) {
item.Item.Visibility = Telerik.WinControls.ElementVisibility.Collapsed;
}
**Hide any RadPageView Page/tab with 'Name' = "Hidden" or where 'Text' contains "Hidden"**
// Hide any RadPageView Page with 'Name' = "Hidden" or where 'Text' contains "Hidden" (just the tab, not content)
foreach (Telerik.WinControls.UI.RadPageViewPage item in radPageView.Pages ) {
if (item.Text.ToLower().Contains("hidden") == true || item.Name.ToLower().Contains("hidden") == true)
item.Item.Visibility = Telerik.WinControls.ElementVisibility.Collapsed; // Must use lower case text
}
**Hide a specific RadPageView Page/tab by name**
foreach (Telerik.WinControls.UI.RadPageViewPage item in radPageView.Pages) // Hide a RadPageView Page with a specific 'Name'
if (item.Name.Contains("rpvpContactSupport") == true)
item.Item.Visibility = Telerik.WinControls.ElementVisibility.Collapsed;
**Or multiple pages…**
foreach (RadPageViewPage item in rpvListViewSettings.Pages) // Hide a RadPageView Page(s) with specific 'Name'(s)
if (item.Name.Contains("rpvpListSavedViews") || item.Name.Contains("rpvpListToolbar"))
item.Item.Visibility = Telerik.WinControls.ElementVisibility.Collapsed;
**Hide a specific RadPageView Page/tab with specific tab text**
foreach (Telerik.WinControls.UI.RadPageViewPage item in radPageView.Pages) // Hide a specific RadPageView Page/tab with specified tab text
if (item.Text.Equals("Contact Support") == true)
item.Item.Visibility = Telerik.WinControls.ElementVisibility.Collapsed;
=== Page Selection ===
rpvListViewSettings.SelectedPage = rpvListViewSettings.DefaultPage; // select the currently configured default page
**Select the 1st Page on the RadPageView by default**
// Include the following right after “InitializeComponent();” on the form or UC.
radPageView.SelectedPage = radPageView.Pages[0]; %%//%% Select the 1st Page on the RadPageView by default
// This isn't necessary if you use the radRibbonBar1_CommandTabSelected method to link RadRibbonTabs to specified RadPages (by Tag)
// If you use that method the page will be selected automatically when the 'Select the 1st tab on the RadRibbonBar by default' code executes
**Select the 1st Visible (not hidden) Page on the RadPageView by default**
bool PageSelected = false; %%//%% default to no page selected
foreach (Telerik.WinControls.UI.RadPageViewPage item in radPageView.Pages)
{
if (item.Item.Visibility == Telerik.WinControls.ElementVisibility.Visible)
{
radPageView.SelectedPage = item; %%//%% Select the 1st visible Page on the RadPageView by default
PageSelected = true; %%//%% there is an active page so don’t hide the RadPageView
break;
}
}
radPageView.Visible = PageSelected; %%//%% hide the RadPageView container if no page is visisble
// Include the following right after “InitializeComponent();” on the form or UC.
// Select the specified Page (by ‘text’ name) on the RadPageView by default
SetSpecifiedPageViewByText(rpvLogViewer,"All"); // Select the 1st Page ('.Text' = "All") on the RadPageView by default
// Then follow with this
// Select RadPageView Page by specific name ('.Text' value)
private void SetSpecifiedPageViewByText(RadPageView rpv, string SearchValue)
{
foreach (Telerik.WinControls.UI.RadPageViewPage item in rpv.Pages) %%//%% Hide a specific RadPageView Page/tab with specified tab text
if (item.Text.Equals(SearchValue, StringComparison.CurrentCultureIgnoreCase) == true)
rpv.SelectedPage = item;
}
// Lock the Splitter the user can not resize the panels (add to the Load event of form)
this.radSplitContainer.Splitters[0].Fixed = true;
// Hide & Disable the Splitter (add to the Load event of form) // NOTE: This hides the splitter buttons but does not hide or diable the splitter itself.
// See: http://www.telerik.com/forums/disable-splitter
this.radSplitContainer.Splitters[0].Visibility = Telerik.WinControls.ElementVisibility.Collapsed;
Change Splitter Collapse direction\\ [[http://www.telerik.com/forums/change-splitpanel-collapse-direction]]
// Set the Splitter Width dynamically
radSplitContainer.SplitterWidth = 20;
SplitPanel AutoSize\\ [[http://www.telerik.com/forums/splitpanel-autosize]]
Capture the click event on any splitter in a RadSplitcontainer, or the click event on a specific splitter in a RadSplitcontainer\\ [[http://www.telerik.com/forums/splitter-click-event]]\\
Save and Restore SplitPanel Layout\\ [[http://www.telerik.com/forums/radsplitcontainer]]
==== * RadGroupBox – rgb ====
[[http://www.telerik.com/help/winforms/panels-and-labels-groupbox-overview.html]]\\ [[http://www.telerik.com/community/forums/winforms/panels-and-labels.aspx]]\\
RadGroupBox control is a group box control with advanced styling options. The primarily usage of this control is to hold a single radio buttons group.
{{tdn:image44.png?277x174|A screenshot of a group box Description automatically generated}}
Change the border: [[http://www.telerik.com/forums/how-to-change-the-border-color-of-radgroupbox-and-contentpanel-of-tabitem]]
==== * RadPanel – rpnl ====
[[http://www.telerik.com/help/winforms/panels-and-labels-panel-overview.html]]\\ [[http://www.telerik.com/community/forums/winforms/panels-and-labels.aspx]]
{{tdn:image45.png?246x106|A blue rectangular sign with black text Description automatically generated}}
This screenshot demonstrates the use of a border, border width, background with a linear gradient, and Html-like formatted text. Refer to [[#_HTML-like_Text_Formatting|HTML-like Text Formatting]] for further details.
* Group collections of controls allowing you to place them anywhere you wish
* Container to force mutual exclusivity on RadRadioButton groups
* Hide the border options:
* Click SmartTag and set “Edit UI Elements | BorderPrimative | ShouldPaint” to ‘False’, or use this code:\\this.rpnlPanel.PanelElement.PanelBorder.ShouldPaint = false;
* Or to hide some/selected borders using this code:\\ // Hide some/selected RadPanel borders
this.rpnlPanel.PanelElement.PanelBorder.BoxStyle = BorderBoxStyle.FourBorders; // enable border segments
this.rpnlPanel.PanelElement.PanelBorder.TopWidth = 0; // hide the top border
this.rpnlPanel.PanelElement.PanelBorder.BottomWidth = 0;
this.rpnlPanel.PanelElement.PanelBorder.LeftWidth = 0;
this.rpnlPanel.PanelElement.PanelBorder.RightWidth = 0;From: [[http://www.telerik.com/forums/can-radpanel-only-have-bottom-border-or-top-etc]]
==== RadCollapsiblePanel – rcpnl ====
[[http://www.telerik.com/help/winforms/panels-and-labels-collapsible-panel-overview.html]]\\
An expandable panel which can host controls in its content area. The content area can be collapsed, allowing space savings in a WinForms application. RadCollapsiblePanel also gives you control over its ExpandDirection for even greater flexibility. {{tdn:image46.gif?361x217|A group of people with name tags Description automatically generated}}
* ExpandDirection - expand direction.
* EnableAnimation - use animation to expand or collapse the control.
* ContentSizingMode -
* IsExpanded - Get/Set whether the control is expanded.
* ShowHeaderLine Gets or sets a value indicating whether to show a line primitive in the header.
* HorizontalHeaderAlignment -
* VerticalHeaderAlignment -
* HeaderText –
* AnimationInterval -
* AnimationFrames -
* AnimationEasingType -
* AnimationType -
==== RadScrollablePanel – rspnl ====
[[http://www.telerik.com/help/winforms/panels-and-labels-radscrollablepanel-overview.html]]\\
This control is basically just a RadPanel with 2 themable scrollbars to provide more space for child controls.
The scrollbars only appear when a control is outside the viewable area.\\
The controls resize when the scroller appears so the scrollbar doesn’t obscure part of the controls.\\
It automatically creates a parent radScrollablePanel.PanelContainer for the ScrollablePanel.\\
To test the scroller just add some control then set its location outside the viewable area. The scrollbar(s) will appear in the IDE preview.
{{tdn:image47.png?319x400|A screenshot of a computer screen Description automatically generated}}
==== * RadSeparator – rs ====
[[http://docs.telerik.com/devtools/winforms/panels-and-labels/separator]]\\
RadSeparator is a control that gives you the ability to divide your forms into logical parts.\\
{{tdn:image48.png?297x123|A screenshot of a computer Description automatically generated}}
* Orientation - gets or sets the control orientation to Vertical or Horizontal
* ShadowOffset - gets or sets the offset of the both lines, both horizontal and vertical
* ShowShadow - enables/disables the second line
* SeparatorElement - the element that holds the lines. Gives you the ability to access and customize them
====== Telerik – Data Controls ======
==== RadChartView – rcv ====
http://www.telerik.com/help/winforms/chartview-overview.html\\
http:%%//%%www.telerik.com/support/code-library/winforms/chart\\
VIDEO: http://www.telerik.com/videos/winforms/getting-started-with-radchartview-for-winforms\\
VIDEO: http://www.telerik.com/videos/winforms/what-is-new-in-q3-2012-radcontrols-for-winforms (19:12 - 24:12)
RadChartView is a versatile charting component that offers drawing capabilities, user interaction and real-time updates. Its intuitive object model and public API allow complex charts to be easily setup either in design-time or through code. The control is completely data aware and may work in bound or unbound mode, depending on the requirements. Chart types (or series) are organized in hierarchies, depending on the coordinate system, used to plot data points – for example we have CartesianArea (using Cartesian coordinate system) and PolarArea (using polar or radial coordinate system) and PieArea.
{{tdn:image49.png?268x188|A graph of a graph with different colored bars Description automatically generated with medium confidence}}
//NOTE: There is also a RadChart control, which is being phased out. Don’t use it. [[http://www.telerik.com/help/winforms/chartview-radchartview-vs.-radchart.html|Here’s a comparison]].//
Data point Tooltips - http://www.telerik.com/help/winforms/chartview-features-tooltip.html
Chart Title - http://www.telerik.com/help/winforms/chartview-features-title.html
Trackball (threshold indicator line ) – http://www.telerik.com/help/winforms/chartview-features-trackball.html
Smart labels - http://www.telerik.com/help/winforms/chartview-features-smart-labels.html
Drill down - http://www.telerik.com/help/winforms/chartview-features-drill-down.html
Changing colors/palettes - http://www.telerik.com/help/winforms/chartview-customization-palettes.html
// Apply a predefined palette of colors
this.radChartView1.Area.View.Palette = KnownPalette.Metro;
// Apply a specific palette entry to a specific line. Default is to rotate through the palette colors.
lineSeria.Palette = KnownPalette.Flower.GlobalEntries[0];
lineSeria.Palette = new PaletteEntry(Color.Yellow, Color.Red);
// Define your own palette by inheriting from ChartPalette and creating a collection of palette entries
public class CustomPalette : ChartPalette
{
public CustomPalette()
{
this.GlobalEntries.Add(Color.Yellow, Color.Red);
this.GlobalEntries.Add(Color.Yellow, Color.Blue);
}
}
// Then set the custom palette:
this.radChartView1.Area.View.Palette = new CustomPalette();
Custom rendering - http://www.telerik.com/help/winforms/chartview-customization-custom-rendering.html
Chart Animation - http://www.telerik.com/forums/animated-chart\\
“RadChartView contains a mechanism that allows an animation and the animation is built-in the theme. You can create your own animations by either using our [[http://www.telerik.com/help/winforms/tpf-animations.html|TPF Animations]] or you can use [[http://blogs.telerik.com/winformsteam/posts/12-06-21/put-some-css-magic-to-your-radcontrols-for-winforms.aspx|CSS like definition.]] You can see examples of these approaches in our Demo application that is installed with the controls. You can see a TPF animation in the example// RadChartView>>Chart Types>>Line & Area// and a CSS animation in the example //RadChartView>>Chart Types>>Bar.”//
==== * RadGridView – rgv ====
[[http://www.telerik.com/help/winforms/gridview-overview.html]]\\ [[http://www.telerik.com/community/forums/winforms/gridview.aspx]]\\ http:%%//%%[[http://www.telerik.com/support/code-library/winforms/gridview|www.telerik.com/support/code-library/winforms/gridview]]\\ Video (Webinar): [[http://www.telerik.com/videos/winforms/radgridview-for-winforms-webinar]]\\ Video: [[http://www.telerik.com/videos/winforms/radgridview-for-winforms-hierarchy-overview|RadGridView for WinForms Hierarchy Overview]]\\ Video: [[http://www.telerik.com/videos/winforms/binding-radgridview-for-winforms-to-a-self-referencing-hierarchy|Binding RadGridView for WinForms to a Self Referencing Hierarchy]]
{{tdn:image50.png?506x393|A screenshot of a computer Description automatically generated}}
=== RadGridView Config by XML ===
radGridView1.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;
* ‘AutoSizeRows’ – expand rows (if a column has ‘Multiline’ = ‘True’??)
* ‘EnableHotTracking’ – set to False or the grey beveled gradient will be lost (leaving only the background color) as you mouse over grid data
* ‘EnableAlternatingRowColor’ – set True to get a greenline report style
* ‘HideSelection’ – set True for selected item to remain highlighted when the control loses focus
Text in a Hyperlink column has this font color: #113E89 (RGB 17, 62, 137)
=== Grid Column Resizing (Marcel) ===
rgvLog.MasterTemplate.Columns["Message"].AutoSizeMode = BestFitColumnMode.DisplayedDataCells; // resizing is based on the values *visible on the screen* and works the same even with manual resizing (double-click on the column edge)
rgvLog.MasterTemplate.Columns["Message"].AutoSizeMode = BestFitColumnMode.AllCells; // resizing is based on the values in all rows, even those that are not currently visible
=== Change the Backcolor of a Specific Column (Telerik Support) ===
Use the ViewCellFormatting event (the color depends on your current form backcolor)
void radGridView1_ViewCellFormatting(object sender, CellFormattingEventArgs e)
{
e.CellElement.DrawFill = true;
if (e.Column.Name == "SeparatorColumn")
{
e.CellElement.DrawFill = true;
e.CellElement.BackColor = Color.FromArgb(191, 219, 255);%%//%%Color.FromKnownColor(KnownColor.Control);
e.CellElement.DrawBorder = false;
e.CellElement.GradientStyle = GradientStyles.Solid;
}
else
{
e.CellElement.ResetValue(LightVisualElement.DrawFillProperty, ValueResetFlags.Local);
e.CellElement.ResetValue(LightVisualElement.DrawBorderProperty, ValueResetFlags.Local);
e.CellElement.ResetValue(LightVisualElement.GradientStyleProperty, ValueResetFlags.Local);
e.CellElement.ResetValue(LightVisualElement.BackColorProperty, ValueResetFlags.Local);
}
}
private void radGridView1_CellEditorInitialized(object sender, GridViewCellEventArgs e)
{
GridBrowseEditor browseEditor = e.ActiveEditor as GridBrowseEditor;
if (browseEditor!=null)
{
GridBrowseEditorElement element = browseEditor.EditorElement as GridBrowseEditorElement;
element.ReadOnly = false;
}
}
=== Jump to Last Row ===
Scroll to the bottom by passing the rows count to ScrollToRow as an integer parameter:
private void radButton1_Click(object sender, EventArgs e)
{
radGridView1.TableElement.ScrollToRow(radGridView1.Rows.Count-1);
}
=== # Group Summaries ===
From the Demo app:
{{tdn:image52.png?720x399|A screenshot of a computer Description automatically generated}}
==== # RadDataFilter ====
http://docs.telerik.com/devtools/winforms/datafilter/overview
Building complex filter expressions is a breeze with RadDataFilter. The control allows specifying expressions based on the fields.properties available in the data source. The intuitive UI of the control is designed to facilitate the end-user while empowering the developer to create related expressions with a few clicks.
{{tdn:image53.png?503x200|A screenshot of a computer Description automatically generated}}
==== RadCardView – rcv ====
http://docs.telerik.com/devtools/winforms/cardview/overview\\
http://www.telerik.com/forums/winforms/listview
RadCardView is a powerful control providing means for displaying and editing text data organized in a card layout. It incorporates a RadLayoutControl allowing modifications of the layout in the Visual Studio designer as well as at run-time.
{{tdn:image54.png?455x237|A person in a black shirt Description automatically generated}}
==== # RadDataEntry ====
http://docs.telerik.com/devtools/winforms/dataentry/dataentry
RadDataEntry provides an easy way to display and edit arbitrary business objects in a form layout. The built-in editors are generated by default, so that a fully operational **CRUD support may be achieved with a single line of code** - just binding to the business object or to a collection of objects. In order to further enhance RadDataEntry, it can be used in combination with RadBindingNavigator or any other collection navigation control.
{{tdn:image55.png?278x224|A screenshot of a computer Description automatically generated}}
=== Hide the border ===
(DataEntry).PanelElement.Border.Visibility = ElementVisibility.Collapsed;
=== DataValidation ===
Includes the ability to validate data per field.
Example from the Demo app:
{{tdn:image56.png?720x391|A screenshot of a computer Description automatically generated}}
==== # RadDataLayout ====
https://docs.telerik.com/devtools/winforms/controls/datalayout/overview
The RadDataLayout control provides means for displaying data in a highly customizable layout by automatically creating the items and editors and further allowing easy creating of complex layouts at design-time as well as at run-time.
{{tdn:image57.png?400x264|A computer screen shot of a table Description automatically generated}}
==== RadVirtualGrid – rvg ====
http://docs.telerik.com/devtools/winforms/virtualgrid/overview
RadVirtualGrid is a grid component developed on top of Telerik Presentation Framework which provides a convenient way to implement your own data management operations and optimizes the performance when interacting with large amounts of data.
{{tdn:image58.gif?488x388|A screenshot of a menu Description automatically generated}}
**Key features**
* Easily customizable appearance and theming mechanism
* Outstanding performance
* Editing mechanism
* Hierarchical data presentation
* Sorting
* Filtering
* Paging
* Selection and navigation
* Flexible API
==== RadRangeSelector – rrs ====
http://docs.telerik.com/devtools/winforms/rangeselector/overview
RadRangeSelector provides an elegant solution for end-users to select range (in percentages) and these percentages could be mapped to any kind of visually represented data. Developers can easily set the associated object that will be used as background of RadRangeSelector. The associated object should confront with specific interfaces thanks to which it will be able to communicate with RadRangeSelector. Currently, RadRangeSelector works out of the box together with RadChartView.
{{tdn:image59.png?406x88|A white background with green border Description automatically generated}}
==== RadPivotGrid – rpg ====
http://www.telerik.com/help/winforms/pivotgrid-overview.html
http://www.telerik.com/community/forums/winforms/pivotgrid.aspx\\
VIDEO: http://www.telerik.com/videos/devcraft/getting-started-with-radpivotgrid-for-winforms\\
VIDEO: [[http://www.telerik.com/videos/winforms/visualizing-kpis-with-radpivotgrid-for-winforms|Visualizing KPIs (Key Performance Indicator) With RadPivotGrid for WinForms]]\\
VIDEO: [[http://www.telerik.com/videos/winforms/what-is-new-in-q3-2012-radcontrols-for-winforms|What is new in R3 2012 Telerik UI for for WinForms]] ()
RadPivotGrid for WinForms is a control which provides functionality similar to the functionality of PivotTables in MS Excel. It takes large chunks of data and summarizes it in a human readable way by the help of aggregates and field descriptors. The end-user can easily get an aggregated view of the data that would best suit their needs by dragging and dropping the items of the field descriptors and the aggregates. RadPivotGrid can also sort the data and show subtotals and grand totals at the end or at the beginning of the summarized data. It supports the UI virtualization available in RadGridView, so it can easily handle large data sets bringing to you top performance and low memory footprint even in such scenarios.
{{tdn:image60.png?556x311|A screenshot of a computer Description automatically generated}}
Here is a list of the supported features:
* Grouping data by row and column descriptors
* Aggregating data by aggregate descriptors
* Sorting group values
* Report filters
* Drag and drop of descriptors and aggregates
* Field chooser dialog
* Row/Column SubTotals and GrandTotals positions
* Row/Column Headers layouts – Tabular and Compact
* EmptyValueString, ErrorValueString, FormatString
* Design Time support for data binding
* UI virtualization
* Column/row resizing
* Tooltips
* Context menus
* Best Fit
* Copy data to clipboard
* Cell selection
* Formatting cells
==== RadPivotFieldList – rpfl ====
https://docs.telerik.com/devtools/winforms/controls/pivotgrid/overview.html - Overview & Example Apps http://www.telerik.com/help/winforms/pivotgrid-radpivotfieldlist.html
http://www.telerik.com/community/forums/winforms/pivotgrid.aspx
Similar to the functionality of PivotTables in MS Excel.
{{tdn:image60.png?448x250|pivotgrid-overview 001}}
^RadPivotFieldList ^Value Options Dialog ^Label Options Dialog ^
|{{tdn:image61.png?138x299|pivotgrid-radpivotfieldlist 001}}|{{tdn:image62.png?168x224|pivotgrid-radpivotfieldlist 002}}|{{tdn:image63.png?147x248|pivotgrid-radpivotfieldlist 003}}|
==== * RadDropDownList – rddl ====
http://www.telerik.com/help/winforms/dropdown-and-listcontrol-dropdownlist-overview.html\\
http://www.telerik.com/community/forums/winforms/dropdownlist-and-listcontrol.aspx\\
Video: http://www.telerik.com/videos/winforms/getting-started-with-raddropdownlist
**This is like a basic combobox**
{{tdn:image64.png?165x151|A screenshot of a computer Description automatically generated}}
**NOTE: If you need a dropdown with checkboxes use the CheckedDropDownList**
Quick Tasks Button
* 'Edit Items' - to add/manage items
* DropDownListElement items:
* 'SelectedItems' -1 = nothing unselected, 0 = 1st list element, etc. NOTE: This may revert to -1 if you edit the list elements.'DropDownStyle' - 'DropDownList' list items are read only. 'DropDown' you are allowed to edit list items.
* DropDownSizingMode = RightBottom – add a size handle to the bottom right of the list for manual resize
* DropDownWidth – force the width, in pixels. Does not automatically resize, but may be combined with DropDownSizingMode
* AutoSizeItems - ?? ### test this one
* DropDownMinSize – you can set the width (leaving Height=0) to a value to make the item list wider than the main control.
* SortStyle – Ascending, Descending and None
* RadDropDownStyle – ‘DropDown’ allows editing of the textbox; ‘DropDownList’ read only drop down textbox
* AutoScroll – T/F – Scrollbars automatically appear when the list is longer than the control is tall.
* AutoCompleteMode – Suggest, Append, **SuggestAppend** (most often the best option)
* DefaultItemsCountInDropdown – default = 6
* How do I enable MultiItem select?
==== * CheckedDropDownList – rcddl ====
https://docs.telerik.com/devtools/winforms/controls/dropdown-listcontrol-and-checkeddropdownlist/checkeddropdownlist/checkeddropdownlist
{{tdn:image65.png?218x103|dropdown-and-listcontrol-checkedropdownlist-overview 001}}
==== * RadListControl – rlc ====
http://www.telerik.com/help/winforms/dropdown-and-listcontrol-listcontrol-overview.html
http://www.telerik.com/community/forums/winforms/dropdownlist-and-listcontrol.aspx
RadListControl is the an alternative to the Microsoft ListBox control. This is a basic list of selectable items.
**This is the simple list you are probably looking for.** The RadListView offers more advanced features
{{tdn:image66.png?154x154|A screenshot of a computer Description automatically generated}}
**NOTE: If you need a listbox with checkboxes use the [[#radcheckedlistbox-rclb|RadCheckedListBox]]**
(including columns).
//NOTE: This control is shown under ‘Dropdown & List’ in the Telerik ‘Demo Application – UI for Winforms’ and the online help.//
Supports drag and drop for reordering, or dragging between 2 different RadListControls. See the Telerik sample application.
* SelectionMode – offers 3 options:
* One – only one row at a time
* MultiSimple – click to select/deselect multiple rows
* MultiExtended -
private void Form1_Load(object sender, EventArgs e)
{
this.customersTableAdapter.Fill(this.nwindDataSet.Customers);
this.radMultiColumnComboBox1.AutoFilter = true;
this.radMultiColumnComboBox1.DisplayMember = "City";
FilterDescriptor filter = new FilterDescriptor();
filter.PropertyName = this.radMultiColumnComboBox1.DisplayMember;
filter.Operator = FilterOperator.StartsWith;
this.radMultiColumnComboBox1.EditorControl.MasterTemplate.FilterDescriptors.Add(filter);
this.radMultiColumnComboBox1.DataSource = this.customersBindingSource;
this.radMultiColumnComboBox1.DisplayMember = "ContactName";
this.radMultiColumnComboBox1.ValueMember = "CustomerID";
}
radTreeView1.AllowDefaultContextMenu = true; // Enable the default context menu
These 3 menu items are diabled by default. Enable them individually in the IDE or via code:
radTreeView1.AllowAdd = true; // Enable the ‘New’ context menu item
radTreeView1.AllowEdit = true; // Enable the ‘Edit’ context menu item
radTreeView1.AllowRemove = true; // Enable the ‘Delete’ context menu item
==== RadBindingNavigator – rbn ====
http://docs.telerik.com/devtools/winforms/bindingnavigator/bindingnavigator\\
http://www.telerik.com/forums/winforms/bindingnavigator
RadBindingNavigator’s main purpose is to provide a basic UI for navigation through a collection of business objects. RadBindingNavigator can be paired with a [[https://msdn.microsoft.com/en-us/library/system.windows.forms.bindingsource(v=vs.110).aspx|BindingSource component]].
{{tdn:image77.png?302x30}}
==== RadMap – rmap ====
http://docs.telerik.com/devtools/winforms/map/overview\\
http://www.telerik.com/forums/winforms/map
RadMap can visualize tile data from the Bing Maps and the OpenStreetMaps REST services as well as from the local file system.
{{tdn:image78.png?385x310|A map of europe with blue and white lines Description automatically generated}}
==== RadCarousel – rcar ====
http://docs.telerik.com/devtools/winforms/carousel/carousel\\
http://www.telerik.com/forums/winforms/carousel\\
VIDEO: http://tv.telerik.com/watch/winforms/radcarousel/overview-radcarousel-winforms
RadCarousel is a navigation control that animates a series of elements either by the user clicking a particular element or by clicking the forward and back arrows. Based on top of the Telerik Presentation Framework (TPF), RadCarousel supports data binding, smooth animations and transitions, automatic generation of image reflections and dynamic addition and removal of items.
{{tdn:image79.png?461x220|A close-up of a cover Description automatically generated}}
====== Telerik – Gauges ======
==== RadBulletGraph - rgaugebullet ====
http://docs.telerik.com/devtools/winforms/gauges/bulletgraph/bulletgraph
The RadBulletGraph control is a variation of linear gauge. It combines a number of indicators into one control making it light-weight, customizable, and straightforward to setup and use. The control is a great tool for dashboards as it is the optimal way to present a lot of information in relatively small size.
{{tdn:image80.png?313x58|A black and grey rectangular object with numbers Description automatically generated with medium confidence}}
==== RadLinearGauge ====
http://docs.telerik.com/devtools/winforms/gauges/lineargauge/lineargauge
RadLinearGauge displays simple value within a specific range. The range is displayed in a rectangle, this rectangle can contain scale with or without ticks, labels and a scale bar. This control can be very useful when you need to build business dashboards or you just need graphical indicators.
{{tdn:image81.gif?415x162|A group of colorful rectangular objects Description automatically generated with medium confidence}}
==== RadRadialGauge ====
http://docs.telerik.com/devtools/winforms/gauges/radialgauge/radialgauge
The RadRadialGauge control is designed to display a simple value within a definite range. This range is represented in a circular format similar to car speed gauge. The circular container contains a scale in it which controls the overall layout of ticks, tick labels, needles and ranges and renders an optional scale bar.
{{tdn:image82.gif?441x121|A close-up of a speedometer Description automatically generated}}
**Telerik & Dev Notes**
====== Telerik – Editors ======
==== * RadAutoCompleteBox – racb ====
http://docs.telerik.com/devtools/winforms/editors/autocompletebox/autocompletebox\\
http://www.telerik.com/community/forums/winforms/editors.aspx\\
Video: http://www.telerik.com/videos/winforms/getting-started-with-radautocompletebox-for-winforms
RadAutoCompleteBox allows the end-user to easily fill-in text thanks to auto-complete functionality and tokens of text. This behavior is similar to the "To" field of Outlook and Facebook where you are filling-in the recipients to which you are going to send a message.
{{tdn:image83.png?335x158|A screenshot of a computer Description automatically generated}}
==== * RadBrowseEditor – rbe ====
[[https://docs.telerik.com/devtools/winforms/controls/editors/browseeditor/overview]]\\ [[http://www.telerik.com/community/forums/winforms/editors.aspx]]
Browse to specify a file or folder on disk.
this.rdtpStartDate.Value = DateTime.Today; // Set Start date to today
this.radDateTimePicker1.Value = DateTime.Today.AddDays(1); // Set the date to tomorrow
this.radDateTimePicker1.Value = DateTime.Today.AddDays(-1); // Set the date to yesterday
* By default a single arrow click moves one month and a double arrow click moves three months (called Fast Navigation).rrdtpNameOfControl.DateTimePickerElement.Calendar.FastNavigationStep = 12; // override fast navigation to 12 months so double arrow click jumps 1 year
* 'MinDate'/'MaxDate' - first and last dates that can be selected in the picker. Attempts to select outside these bounds are ignored.this.radDateTimePicker1.MinDate = DateTime.Today.AddDays(-DateTime.Today.Day); // set the MinDate to be the first day of the current month.
* 'NullText’ - text displayed when the NullableValue property is set to null and RadDateTimePicker is not in focus. By default, NullText is an empty string.this.radDateTimePicker1.NullText = "No date selected";
* 'Format' - The DateTimePickerFormat enumeration values are Long, Short, Time and Custom. Set Format to Custom to enable the CustomFormat property.
* 'CustomFormat' - format string determines the display of the date in the picker edit. See the Internationalization and Date Formats topic for more information.
* 'Culture determines the language that the drop down calendar and edit will display in. See the Internationalization and Date Formats topic for more information.
* 'CalendarSize' - gets/sets the size of the RadCalendar in the RadDateTimePicker drop-down.
* 'NullableValue' - same as the Value property, but the NullableValue property is of type Nullable DateTime. It can be null – in this case if RadDateTimePicker is not selected it will show its NullText. In case RadDateTimePicker is selected, it will show the last entered date – this allows the end-user to enter and edit the date.this.radDateTimePicker1.NullableValue = null;
==== * RadMaskedEditBox – rmeb ====
[[http://www.telerik.com/help/winforms/editors-maskededitbox-overview.html]]\\ [[http://www.telerik.com/community/forums/winforms/editors.aspx]]
RadMaskedEditBox is a themeable text box that formats and constrains text to a predefined pattern or a pattern you define. RadMaskedEditBox also handles globalization for date and time edits. Date and Time masks allow the user to navigate using the up and down arrow keys.
{{tdn:image91.png?416x262|A screenshot of a computer Description automatically generated}}
The MaskType property defines what type of mask would be used in the masked box:
* **None**
* **[[http://www.telerik.com/help/winforms/editors-maskededitbox-date-and-time-masks.html|DateTime]] -** set the **MaskType** property to **DateTime** and the **Mask** property to "d". //See [[http://www.telerik.com/help/winforms/editors-maskededitbox-date-and-time-masks.html|Date and Time Masks]] for more information on how this mask is constructed.//
* **[[http://www.telerik.com/help/winforms/editors-maskededitbox-numeric-masks.html|Numeric]] -** [[http://www.telerik.com/help/winforms/editors-maskededitbox-numeric-masks.html|The numeric mask]] is used when you need to display these ([[https://msdn.microsoft.com/en-us/library/dwhawy9k.aspx|defined on MS site]]):
* Percent values.
* Decimal values.
* Currency (culture-aware).
* Fixed point values.
* **[[http://www.telerik.com/help/winforms/editors-maskededitbox-standart-masks.html|Standard]] -** set the **MaskType** property to **Standard** and the **Mask** property to "(###) ###-###". //See// [[http://www.telerik.com/help/winforms/editors-maskededitbox-standart-masks.html|Standard Masks]] //for more information on how this mask is constructed.//
* **Regex** - You can define [[http://msdn.microsoft.com/en-us/library/2k3te2cs(v=vs.80).aspx|Regex expressions]] as masks. For example mask **[A-z]** will check for at least one symbol in this range (A-z) in MaskEditBox’s Text.
* **IP** - allow user to input only **3** digits in **0-255** range in **four** groups
* **Email** - validate user input for the valid mail. If this email is not valid will notify user with validation icon:
* ‘TextMaskFormat ‘ - you may want to get a RadMaskedEditBox.Value that differs from what the end-user sees in the editor, or, in other words, from what the Text property provides. In such cases the you will find the TextMaskFormat property useful. It allows you to get variations of of the Text property value taking into account whether you want to get the prompt characters, and the literals used in the mask. The type of the TextMaskFormat property is the MaskFormat enum which provides the following values:
* ‘IncludePromptAndLiterals’ (default value) - The Value property returns Return the text input by the user as well as any literal characters defined in the mask and any instances of the prompt character.
* ‘ExcludePromptAndLiterals’ - The Value property returns only the text input by the user.
* ‘IncludePrompt’ - The Value property returns the text input by the user as well as any instances of the prompt character.
* ‘IncludeLiterals’ - The Value property returns the text input by the user as well as any literal characters defined in the mask.
==== * RadPropertyGrid – rpg ====
http://www.telerik.com/help/winforms/propertygrid-overview.html\\
http://www.telerik.com/community/forums/winforms/property-grid.aspx\\
Video: http://www.telerik.com/videos/winforms/getting-started-with-telerik-radpropertygrid
Search/Filter PropertyGrid rows: http://docs.telerik.com/devtools/winforms/propertygrid/features/filtering.html
Use the Tasks button to access these properties:
* Enable Filtering
* Enable Grouping
* Enable Sorting
* Show Helprich
* Show SearchBox
Attach a RadPropertyGrid to an object and get a Visual Stuidio style property editor for the object.\\
radPropertyGrid1.SelectedObject = new PropertyGridElement(); %%//%% point to itself showing the PropertyGrid’s own properties\\
using Telerik.WinControls.UI; %%//%% required for ‘PropertyGridElement’
rpgControlProperties.SelectedObject = commandBarButton1; %%//%% Show the properties of a RadCommandBar button
* ‘SelectedObject’ - points to the object whose properties should be displayed
* ‘HelpVisible’ - show/hide the help section at the bottom which displays the Description attribute of the selected property
* ‘HelpBarHeight’ – in pixels of the help section at the bottom
* ‘ToolBarVisible’ shows the toolbar where you would add RadButtonElements for sort by category vs. alphabetical for example
* ‘’Category’ attribute of the SelectedObject property allows you to create groups in the PropertyGrid (for sort by category vs. alphabetical)
* ‘PropertySort’ sets default sorting to one of the enumerated values:
* ‘Alphabetical’ – sorts the properties according to the SortOrder setting (Ascending or Descending)
* ‘Categorized’ – groups the properties according to their Category attribute
* ‘CategorizedAlphabetical’ – groups the properties according to their Category attiribute and sorts them Alphabetically, according to the SortOrder setting (Ascending or Descending)
* ‘None’ – removes sorting and grouping
* ‘SortOrder’ - Ascending, Descending and None
* ‘ItemHeight’ - sets the visible items height.
* ‘ItemSpacing’ - sets the spacing between the items.
* ‘ItemIndent’ - sets the indent space in the beginning of the items.
The elements of the SelectedObject
Here’s some articles on using the RadPropertyGrid:
* [[http://www.telerik.com/help/winforms/propertygrid-editors-using-custom-editor.html|Using Custom Editors]] (Replace a spin editor with a track bar editor)
=== Force a RadPropertyGrid to update ===
radPropertyGrid.PropertyGridElement.PropertyTableElement.Update(PropertyGridTableElement.UpdateActions.Reset);
=== ToolTips on Value Column ===
Use the RadPropertyGrid.ToolTipTextNeeded event to specify the ToolTipText for the value column and set the ToolTip.AutoPopDelay.
private void radPropertyGrid1_ToolTipTextNeeded(object sender, Telerik.WinControls.ToolTipTextNeededEventArgs e)
{
PropertyGridItemElement itemElement = sender as PropertyGridItemElement;
if (itemElement!=null)
{
e.ToolTipText = itemElement.ValueElement.Text;
e.ToolTip.AutoPopDelay = 1000;
}
}
==== RadRichTextBox – (deprecated) ====
http://www.telerik.com/help/winforms/richtextbox-overview.html\\
http://www.telerik.com/community/forums/winforms/richtextbox.aspx\\
Video: http://www.telerik.com/videos/winforms/getting-started-with-telerik-radrichtextbox
Use the [[#radrichtexteditor---rrte|RadRichTextEditor]] instead.
==== RadRichTextEditor - rrte ====
http://docs.telerik.com/devtools/winforms/richtexteditor/overview
RadRichTextEditor is a control that is able to display and edit rich-text content including formatted text arranged in pages, paragraphs, spans (runs), tables, etc.
{{tdn:image92.png?525x404|A screenshot of a computer Description automatically generated}}
RadRichTextEditor allows you to edit text and apply rich formatting options, like:
* Bold, Italic
* Underline, Strike Through, Superscript and Subscript
* Usage of all available system fonts
* Text color and background
* Bullet and numbered lists
* Paragraph alignment and indentation
* Show/Hide formatting symbols
* Clear Formatting
* Inserting pictures/symbols/hyperlinks
* Table support – including nested tables, merging cells, setting different RowSpan and ColumnSpan, tables with auto width and more.
* ContextMenu - a standard one is provided out of the box, but it can be easily customized or substituted for a user-defined one.
* SelectionMiniToolbar - very similar to the one in MS Word, but can also be replaced with another.
* SpellChecker - extensible spell checking for different languages, using built-in or custom dictionaries.
* Printing - RadRichTextEditor supports printing out of the box.
* Multi-level Undo/Redo Support - Telerik RadRichTextEditor provides desktop-like usability and control thanks to its multilevel Undo/Redo feature. It allows past actions to be reviewed and reversed, just like in Microsoft Word.
* Three types of layout – Paged, Flow (as text in an HTML page viewed in a browser) and FlowNoWrap.
* Multi-region selection - the built-in multi-region support enables you to perform various operations for more than one selection simultaneously.
* Rich-text clipboard - allows rich text copy/paste from Word, OpenOffice etc.
* Import/export - with Telerik RadRichTextEditor control you can load XAML, HTML, RTF, DocX (rich-text) or TXT (plain text) into the control, you can format and edit it and then export it back to any of the above formats or PDF.
* Headers and Footers - RadRichTextEditor supports headers and footers in its document.
* Track changes - adding and removing of text, images, hyperlinks, tables, etc. and formatting changes of these elements can be tracked by different users.
* Bookmarks - provide easy retrieval of previously marked parts of the document.
* Comments - offer the ability to add text to the document which is not inserted directly in the page.
* Document protection - allows editing restrictions in the document for a set of users and groups.
* Mail merge - makes populating a template document with data easy.
* Custom annotations - enables you to extend the document model in order to serve specific needs.
* Footnotes and Endnotes - usually used to show the source of a material or add an explanation.
* Bibliographic references - can be used for referencing a source in the form of text or pointing the source of a citation.
* Cross-references - references to a Heading, Caption or Bookmark can now change along with their source.
* Captions for tables and figures - images, tables, etc. can now be easily labeled.
* Document variables - a mechanism used for storing information in the document.
* Code blocks - provide the ability to add source code fragments in a document.
* IME support - RadRichTextEditor supports IME out the box.
=== Properties ===
* .IsReadOnly = True to block editing
* .SelectionEnabled = True to allow text selection
* .IsSelectionMiniToolbarEnabled = False blocks this font toolbar popup on selected text
* https://gyazo.com/5a11a797c43a8fe7f91f432de282efb7
* This ContextMenu is still available: https://gyazo.com/d2f9184194167f7a833f7cbf507fc757
==== RadSpellChecker – rsc ====
http://www.telerik.com/help/winforms/spellchecker-overview.html
RadSpellChecker enables developers to add multilingual spell checking capabilities to their Win Forms applications. The component is completely customizable and can be attached to any text-editing RadControl.
{{tdn:image93.png?420x315|A screenshot of a computer Description automatically generated}}
==== * RadSpinEditor – rse ====
http://www.telerik.com/help/winforms/editors-spineditor-overview.html\\
http://www.telerik.com/community/forums/winforms/editors.aspx
RadSpinEditor is a themable alternative to the standard Windows Numeric Up Down control.
{{tdn:image94.png?110x32|A white rectangle with black arrows Description automatically generated}}
==== * RadTextBox – rtxt ====
http://www.telerik.com/help/winforms/editors-textbox-overview.html\\
http://www.telerik.com/community/forums/winforms/editors.aspx
[[http://docs.telerik.com/devtools/winforms/editors/textboxcontrol/radtextboxcontrol-vs-radtextbox|**RadTextBoxControl vs RadTextBox**]] - **RadTextBox is a wrapper around the standard .NET TextBox control**, while RadTextBoxControl is built entirely on top of Telerik Presentation Framework.
Textbox that observes Telerik Theme settings
{{tdn:image95.png?278x159|A screenshot of a computer Description automatically generated}}
*
// Toggle the ‘Image’ on button click.
// First add the 2 images as Project Resources (under Project Properties)
// Next create a property flag in the class to show the state
namespace LS.Common.Log.Presentation
{
public partial class ucLogViewer : UserControl
{
public bool LogPaused { get; set; } %%//%% Play/Pause button state flag property
public ucLogViewer()
{
InitializeComponent();
// Code continues…
// Now create a click event handler to swap the image and update the property flag
private void rcbbtnPlayPauseLog_Click(object sender, EventArgs e) {
if (LogPaused == true) {
rcbbtnPlayPauseLog.Image = LS.Common.Log.Presentation.Properties.Resources.Play_24x24;
LogPaused = false;
}
else {
rcbbtnPlayPauseLog.Image = LS.Common.Log.Presentation.Properties.Resources.Pause_24x24;
LogPaused = true;
}
}
// NOTE: You could have used a bool variable (rather than a property) and called some method(s) from the click event.
radButton3.ButtonElement.ShowBorder = false;
radButton3.BackColor = System.Drawing.Color.Transparent;
radButton3.DisplayStyle = Telerik.WinControls.DisplayStyle.Image;
Toggle between 2 image (icon) values
if (rbtnPlayPauseToggle.Text == "play") // use the .Text property as a flag
{
rbtnPlayPauseToggle.Image = Properties.Resources.MediaPause_40; // .MediaPause_40 is ‘MediaPause_40.png’ imported to the app repository
rbtnPlayPauseToggle.Text = "pause";
}
else
{
rbtnPlayPauseToggle.Image = Properties.Resources.MediaPlay_40; // toggle to ‘MediaPlay_40.png’ image
rbtnPlayPauseToggle.Text = "play";
}
rbtnPlayPauseToggle.Refresh();
rmiLastSync.Enabled = false; // disable highlight on mousehover and click event
rmiLastSync.UseDefaultDisabledPaint = false; // control is disabled but don't show as grey text
==== RadContextMenuManager – rcmm ====
[[http://www.telerik.com/help/winforms/menus-context-menu-assign-radcontextmenu-to-telerik-and-non-telerik-controls.html|__http:%%//%%www.telerik.com/help/winforms/menus-context-menu-assign-radcontextmenu-to-telerik-and-non-telerik-controls.html__]]
You can assign RadContextMenu to Telerik and non-Telerik controls. This can be achieved by making use of RadContextMenuManager component. This component will add a RadContextMenu property to all controls on the form. Then, you should simply set a RadContextMenu instance to the RadContextMenu property.
==== * RadCommandBar – rcb ====
[[http://www.telerik.com/help/winforms/commandbar-overview.html]]
http:%%//%%docs.telerik.com/devtools/winforms/commandbar/design-time
[[http://www.telerik.com/community/forums/winforms/commandbar.aspx]]
Video: [[http://www.telerik.com/videos/winforms/working-with-radcommandbar-for-winforms|Working with RadCommandBar]]\\ [[http://docs.telerik.com/devtools/winforms/commandbar/save-and-load-layout|Save and Load Layout to XML file]]
RadCommandBar is a fully themeable tool strip that provides unprecedented flexibility. More than just a collection of buttons, RadCommandBar hosts any RadControl, including combo boxes, text boxes, split buttons, drop-down buttons, toggle buttons and more. CommandBar can be moved, rearranged and resized at run time for easy end-user customization.
{{tdn:image110.png?566x65|A screenshot of a computer Description automatically generated}}
Basically a Toolbar. Can add buttons, dropdowns, etc.
[[http://docs.telerik.com/devtools/winforms/commandbar/structure|The structure]] works like this:
* RadCommandBar
* CommandBarRowElement - rcbre (1 or more rows)
* CommandBarStripElement –rcbse (1 or more strips within a row)
* ‘DisplayName’ is visible to users at runtime in the Overflow button dialog
* ‘StretchHorizontally’ to make a Strip fill the available width on the Row.
* RadCommandBarGripButton
* Items (various)
* CommandBarButton - rcbbtn
* CommandBarDropDownButton - rcbddbtn
* CommandBarDropDownList - rcbddl
* CommandBarHostItem – can host other controls like date selector or checkbox
* CommandBarSeparator
* CommandBarLabel - rcblbl
* CommandBarTextBox - rcbtxt
* CommandBarToggleButton
* CommandBarSplitButton
* RadCommandBarOverflowButton
**//Select a CommandBarRowElement then click the Task button to ‘Edit Strips’. You can reorder the Strips within a row from this dialog. Choose a Strip to edit, then use the ‘Items’ property to add/edit items. Or can select a Strip directly from the Row and click the Tasks buton to edit only the Items for that Strip. Set the Strip ‘DisplayName’ so it’s visible from the Overflow button dialog at runtime. Set ‘StretchHorizontally’ to make a Strip fill the available width on the Row.//**
RadCommandBar allows the user to show/hide, reorder items and rearrange strip elements on different rows at runtime. ### We need to build a common lib class that saves/restores those customizations. The Save/Load layout functionality gives your applications the opportunity to preserve user settings concerning position, visibility and orientation.
[[http://www.telerik.com/help/winforms/commandbar-save-and-load-layout.html]]
Roll up empty space left behind from visible/collapsed ToolStrips\\ [[https://www.telerik.com/forums/problem-in-stripelement-visible-collapsed]]
[[https://www.telerik.com/forums/order-of-strips-to-display]]
[[#_Add_Resources_to|Add Resources to a Solution (Icons, Graphics, Files, etc.)]]
[[\\192.168.93.1\KB_MiM\Telerik\20160204)%20Add%20Icon%20Graphics%20to%20a%20VS%20Solution%20(Project%20Resource%20File).mp4|Here’s my updated video on how to add Icon Graphics to a Solution]]\\ {{tdn:image111.png?395x267|A screenshot of a computer Description automatically generated}}
The default icons are all small (16x16) but if you use a bigger icon (32x32 or 64x64) the RadCommandBar will expand as required. You can also force it in code. For example show 32x32 image in CommandBarButton like this:\\ 1. Use image with size 32x32.\\ 2. Set the MinSize if you want to have space between image and borders of the button.
this.commandBarButton3.Image = global::CommandBarButtonDefaultSize.Properties.Resources.Button_Next_icon32x32;\\
this.commandBarButton3.MinSize = new System.Drawing.Size(40, 40);
You can add the items by clicking the down arrow on the RCB, but it’s easier to add and organize if you open the RCB ‘Collection Editor’. You can select multiple items to set common properties.
**Set the width to match the container**
???
**Show an icon and text on a control (button, combo, etc) including set button size for text wrap**
//NOTE: You can
radCommandBar1.Rows[0].Strips[0].Orientation = Orientation.Vertical;
* ‘VisibleInStrip’ Item property to hide a control from the Strip.
* [[http://docs.telerik.com/devtools/winforms/commandbar/item-types|Item Types]] (arranged in ItemsLayout)
* **CommandBarButton** – rcbbtn
* ‘DrawText’ = True to display the text of the button. Use the ‘TextImageRelation’ property to control the layout of image and text: Overlay, **ImageAboveText**, TextAboveImage, **ImageBeforeText**, TextBeforeImage.
* **CommandBarDropDownButton** – rcbddbtn (Drop down items are rcbddbtni )
* ‘Text’ – the text on the button
* ‘Items’ – rcbddbtni (the buttons that appear in the dropdown)[[https://www.telerik.com/forums/remove-left-side-extra-space-from-dropdownbuttons]]\\ Here’s how to have the main button display text, then have that text change based on the selected button (rcbddbtni - ‘Items’) from the dropdown.
* Set the DropDownButton ‘Text‘ to the default value you want to display.
* Add all the DropDownButton ‘Items’ and set their ‘Text’ properties to the text you want to display if they are selected. Make note of each time control name.
* You have to add a Click Event to each DropDownButton Item (not the parent DropDownButton itself). Use the VS Property Grid dropdown to find each Item (that’s why we remembered them before). Then add a Click event. Here’s a couple of examples of click events that change the Text property on the CommandBarDropDownButton parent control.
*
// 'Show entire event' Entire vs. Entry Only drop down button
private void rcbddbtniEntireEvent_Click(object sender, EventArgs e)
{
rcbddbtnShowEntryVEvent.Text = rcbddbtniEntireEvent.Text;
}
private void rcbddbtniEntryOnly_Click(object sender, EventArgs e) {
rcbddbtnShowEntryVEvent.Text = rcbddbtniEntryOnly.Text;
}
* **CommandBarDropDownList** – rcbddl (Drop down items are rcbddli )
* **CommandBarHostItem** – rcbhi (Item that can host any RadElement. Use the HostedElement property to get/set the element that you are hosting. [[http://www.telerik.com/community/forums/winforms/commandbar/add-a-datetimepicker-to-a-commandbar.aspx|For example a RadDateTimePicker]] and here’s how to [[http://www.telerik.com/community/forums/winforms/commandbar/read-value-from-datetimepicker-in-commandbar.aspx|‘Read Value from DateTimePicker in CommandBar’]])
Note: You must use a **CommandBarLabel** with a **CommandBarHostItem**. The built in ‘Text’ value won’t display.
// RadDateTimePicker and RadTimePicker 'CommandBarHostItem's on a RadCommandBar
// Stick this right after “InitializeComponent();” on the form or UC.
SetupHostedItems(); // setup the RadDateTimePicker and RadTimePicker 'CommandBarHostItem's on the RadCommandBar
//Follow up (what’s a better way to say these follow after the function that include the Inititalize()?) with these:
private void SetupHostedItems() // setup the 'CommandBarHostItem's on the RadCommandBar
{
rcbhiStartDate.HostedItem = GenerateDateTimePicker("rdtpStartDate"); // Start Date
rcbhiStartTime.HostedItem = GenerateTimePicker("rtpStartTime"); // Start Time
rcbhiEndDate.HostedItem = GenerateDateTimePicker("rdtpEndDate"); // End Date
rcbhiEndTime.HostedItem = GenerateTimePicker("rtpEndTime"); // End Time
}
private RadDateTimePickerElement GenerateDateTimePicker(string Name) // 'CommandBarHostItem' on the RadCommandBar
{
RadDateTimePickerElement rdtp = new RadDateTimePickerElement();
rdtp.AutoSizeMode = Telerik.WinControls.RadAutoSizeMode.FitToAvailableSize;
rdtp.Name = Name;
rdtp.MinSize = new System.Drawing.Size(100, 20);
rdtp.Format = DateTimePickerFormat.Short;
return rdtp;
}
private RadTimePickerElement GenerateTimePicker(string Name) // 'CommandBarHostItem' on the RadCommandBar
{
RadTimePickerElement rtp = new RadTimePickerElement();
rtp.AutoSizeMode = Telerik.WinControls.RadAutoSizeMode.FitToAvailableSize;
rtp.Name = Name;
rtp.MinSize = new System.Drawing.Size(100, 20);
return rtp;
}
// Create a RadCheckBox ‘rchkOnlyFavoriteColumns’ and link it to the CommandBar HostedItem ‘rcbhiOnlyFavoriteColumns’
RadCheckBoxElement rchkOnlyFavoriteColumns = new RadCheckBoxElement();
rchkOnlyFavoriteColumns.MinSize = new System.Drawing.Size(19, 0); // Set the size here to match the HostedItem from the IDE
rcbhiOnlyFavoriteColumns.HostedItem = rchkOnlyFavoriteColumns;
* **CommandBarSeparator**
* **CommandBarLabel** - rcblbl
* **CommandBarTextBox**
* **CommandBarToggleButton** – rcbrtb[[https://www.telerik.com/forums/commandbartogglebutton-appearance-when-disabled]]
* **CommandBarSplitButton** - rcbsb
**RadCommandBarOverflowButton** - The overflow button automatically displays items that don't have the real estate to display by default. The end user can also customize the toolstrip by adding and removing buttons.
* [[http://www.telerik.com/help/winforms/commandbar-howto-customize-the-overflow-button.html|Customize the contents of the OverflowButton]]
* Hide the Overflow button\\
radCommandBarStripElement1.OverflowButton.Visibility = Telerik.WinControls.ElementVisibility.Collapsed; // Or should you use the ‘Hidden’ property?
* Show the Overflow button only when necessary as you resize the formUse the ItemOverflowed and ItemOutOfOverflow events of CommandBarStripElement to show the overflow button only when needed and hide it if not needed. See: [[http://www.telerik.com/forums/hide-remove-add-or-remove-buttons]]
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
AddCommandBar();
radCommandBar1.Rows[0].Strips[0].ItemOverflowed += Form1_ItemOverflowed;
radCommandBar1.Rows[0].Strips[0].ItemOutOfOverflow += Form1_ItemOutOfOverflow;
}
void Form1_ItemOutOfOverflow(object sender, EventArgs e)
{
if (!radCommandBar1.Rows[0].Strips[0].HasOverflowedItems)
{
radCommandBar1.Rows[0].Strips[0].OverflowButton.Visibility = ElementVisibility.Collapsed;
}
}
void Form1_ItemOverflowed(object sender, EventArgs e)
{
radCommandBar1.Rows[0].Strips[0].OverflowButton.Visibility = ElementVisibility.Visible;
}
// Hide the Documents button on the CommandBar
rcbbtnDocuments.VisibleInStrip = false; // removes it from toolbar
rcbbtnDocuments.VisibleInOverflowMenu = false; // removes it from overflow too (user can't see at all)
// We don’t know how to remove it from the Customize dialog
If you Dock a panel (or TableLayoutPanel) control to the form and it appears behind the RadCommandBar, collapse the panel in the Document Outline, then drag it above the RadCommandBar like this:\\ {{tdn:image112.png?232x124|C:\Users\rgray\AppData\Local\Temp\SNAGHTML4d8bb2c2.PNG}}
==== * RadMenu – rm ====
[[http://www.telerik.com/help/winforms/menus-menu-overview.html]]\\ [[http://www.telerik.com/community/forums/winforms/menus.aspx|http://www.telerik.com/community/forums/winforms/menus.aspx]]
RadMenu enables you to integrate attractive and flexible menus on Forms within your Windows applications.
{{tdn:image113.png?300x115|A screenshot of a computer Description automatically generated}} {{tdn:image114.png?91x116|A screenshot of a computer Description automatically generated}}
{{tdn:image115.png?306x238|A screenshot of a program Description automatically generated}} {{tdn:image116.png?387x225|A screenshot of a computer Description automatically generated}}
{{tdn:image117.png?509x51}}{{tdn:image118.png?163x211|A screenshot of a computer Description automatically generated}}
Other controls, like the top of a RadPanel, can appear behind a RadMenu. I’m not sure how to force them both to the same layer, but you can use the Margin – Top to push the hidden control down. Look for a better solution. **The best thing to do is to add the panel after the RadMenu. //Also look to my instructions on RadCommandBar to deal with controls behind this one. It’s about setting the order in the IDE Document Outline.//**
=== RadMenuItem – rmi ===
> [[http://www.telerik.com/help/winforms/menus-menu-working-with-radmenu-items-radmenuitem.html]]
RadMenuButton – rmb
Menu child items are under the RadMenu.Items (Collection). Then select a child and look to its RadMenu.Items (Collection) for the grandchildren items.
* ‘Visibility’ – hide a menu item
* ‘Enabled’ – set the text to grey and disable user interaction
If you Dock a panel (or TableLayoutPanel) control to the form and it appears behind the RadMenu, collapse the panel in the Document Outline, then drag it above the RadMenu like this:\\ {{tdn:image26.png?247x147|C:\Users\rgray\AppData\Local\Temp\SNAGHTML221ed26e.PNG}}
=== Standard Legality Software Help Menu Setup ===
- Add a radMenu control to rfrmMain and name it ‘radMenu’
- Create these RadMenuItems **(Add to ‘ActiveItems’ under top level menu items, and ‘Items’ for sub level menu items)**
private Telerik.WinControls.UI.RadMenuItem rmiHelp;
private Telerik.WinControls.UI.RadMenuItem rmiHelpOnline;
private Telerik.WinControls.UI.RadMenuItem rmiLegalitySoftwareWebsite;
private Telerik.WinControls.UI.RadMenuItem rmiLicenseRegistration;
private Telerik.WinControls.UI.RadMenuItem rmiAbout;
**Note you might also want to include these items:**
private Telerik.WinControls.UI.RadMenuItem rmiFile;
private Telerik.WinControls.UI.RadMenuItem rmiNew;
private Telerik.WinControls.UI.RadMenuItem rmiOpenSettings;
private Telerik.WinControls.UI.RadMenuItem rmiSaveSettings;
private Telerik.WinControls.UI.RadMenuItem rmiSaveSettingsAs;
// Add a separator then a Recent Items here – See File Renamer example code example
private Telerik.WinControls.UI.RadMenuItem rmiExit;
- Click “TELERIK | RadControls for WinForms | Add RadAboutBox”. Name the form “rfrmRadAboutBox” and click
using System.Diagnostics; // required by ‘Process’ to launch external apps (like the browser)
- Use this code to rfrmMain.cs to handle the Help Menu clicks
// Help Menu =========================================================================
private void rmiHelpOnline_Click(object sender, EventArgs e)
{
//TODO: FutureFeature - Implement online help system (wiki)
Process.Start("http://www.legalitysoftware.com"); // launch the Legality Software site
}
private void rmiLegalitySoftwareWebsite_Click(object sender, EventArgs e)
{
Process.Start("http:%%//%%www.legalitysoftware.com"); // launch the Legality Software site
}
private void rmiLicenseRegistration_Click(object sender, EventArgs e)
{
//TODO: FutureFeature - Implement licensing
}
private void rmiCheckForUpdates_Click(object sender, EventArgs e)
{
//TODO: Larry - Wire up the Update feature
}
private void rmiAbout_Click(object sender, EventArgs e)
{
using (var rfrmAboutBox = new rfrmRadAboutBox()) // create an instance of the form
{
rfrmAboutBox.ShowDialog(this); // then show/opens it
}
}
// Stick this right after “InitializeComponent();” on the form
// Hide the AppButton (Office Start button or 'File' tab) on the RadRibbonBar
radRibbonBar1.RibbonBarElement.ApplicationButtonElement.Visibility = Telerik.WinControls.ElementVisibility.Hidden;
// Hide the QAT (Quick Access Toolbar) on the RadRibbonBar
radRibbonBar1.RibbonBarElement.QuickAccessToolBar.Visibility = Telerik.WinControls.ElementVisibility.Hidden;
//Hide Title Bar - collapse all 3 elements to hide this bar
richTextEditorRibbonBar.RibbonBarElement.QuickAccessToolBar.Visibility = ElementVisibility.Collapsed;
richTextEditorRibbonBar.RibbonBarElement.ApplicationButtonElement.Visibility = ElementVisibility.Collapsed;
richTextEditorRibbonBar.RibbonBarElement.RibbonCaption.Visibility = ElementVisibility.Collapsed;
// Hide any RibbonBar tab with 'Name' = "Hidden" or where 'Text' contains "Hidden" (just the tab, not content)
foreach (Telerik.WinControls.UI.RibbonTab item in radRibbonBar1.CommandTabs) {
if (item.Text.ToLower().Contains("hidden") == true || item.Name.ToLower().Contains("hidden") == true)
item.Visibility = Telerik.WinControls.ElementVisibility.Hidden; // sometimes ‘Collapsed’
}
// Shift Tab Groups to the left when the AppButton (Office Start button or 'File' tab) is collapsed
radRibbonBar1.RibbonBarElement.ApplicationButtonElement.Visibility = Telerik.WinControls.ElementVisibility.Collapsed;
Padding p = radRibbonBar1.RibbonBarElement.TabStripElement.ItemContainer.Padding;
radRibbonBar1.RibbonBarElement.TabStripElement.ItemContainer.Padding = new Padding(0, p.Top, p.Right, p.Bottom);
// Hide the ‘ribbonTab1’ tab on the RadRibbonBar
ribbonTab1.Visibility = Telerik.WinControls.ElementVisibility.Hidden; // sometimes ‘Collapsed’
// Hide the Caret button in the upper right that collapses the RibbonBar
this.radRibbonBar1.RibbonBarElement.ExpandButton.Visibility = Telerik.WinControls.ElementVisibility.Collapsed;
// Select the 1st tab [0] on the RadRibbonBar by default
((Telerik.WinControls.UI.RibbonTab)radRibbonBar1.CommandTabs[0]).IsSelected = true;
//The RibbonGroups 'rrbctArchives' and 'rrbctNotes' should be in the 1st and 2nd positions from the left. Telerik support ticket: 1453535
this.richTextEditorRibbonBar.CommandTabs.Remove(this.rrbctArchives);
this.richTextEditorRibbonBar.CommandTabs.Insert(0, this.rrbctArchives);
richTextEditorRibbonBar.CommandTabs.Remove(this.rrbctNotes);
richTextEditorRibbonBar.CommandTabs.Insert(1, this.rrbctNotes);
**Set default selected CommandTab**
%%//%%Set Default Startup Tab
=== Add RadDateTimePicker to RadRibbonBar ===
This control is not available in the RadRibbonBar Items collection, but you can add it in code.
We wanted 2 date controls followed by a dropdown list of predefined date ranges. Add the dropdown list in the designer, then insert the 2 date controls above it (top down) in code.
{{tdn:image120.png?171x134|A screenshot of a computer Description automatically generated}} {{tdn:image121.png?96x110|A screenshot of a computer Description automatically generated}}
public frmMain()
{
InitializeComponent();
SetupRibbonFilters();// add non-standard controls to RadRibbonBar
}
void SetupRibbonFilters()
{
AddDateTimeControl("rdtpStartDate");
AddDateTimeControl("rdtpEndDate");
}
void AddDateTimeControl(string controlName)
{
RadDateTimePicker dtPicker = new RadDateTimePicker();
dtPicker.Name = controlName;
//dtPicker.ThemeName = "Office2007Blue"; // inherits the form theme if not specified
RadHostItem hostItem = new RadHostItem(dtPicker); // placeholder
hostItem.MinSize = new Size(135, 25);
hostItem.MaxSize = new Size(150, 25);
//rrbbgDateFilter.Items.Add(hostItem); // add new control to the specified RibbonGroup
rrbbgDateFilter.Items.Insert(rrbbgDateFilter.Items.Count - 1, hostItem); // insert new control from top down
}
public frmMain()
{
InitializeComponent();
SetupRibbonFilters(); // add non-standard controls to RadRibbonBar\
}
void SetupRibbonFilters()
{
AddOtherPartyDropDown();
}
void AddOtherPartyDropDown()
{
Dictionary other_parties = new Dictionary(); // create sample data
other_parties.Add(0, "Joe Bob");
other_parties.Add(1, "Jim Bob");
other_parties.Add(2, "Bob Bob");
other_parties.Add(3, "Leroy Bob");
AddCheckedDropDownList("rcddOtherParty", "key", "value", other_parties);\\
}
void AddCheckedDropDownList(string controlName, string dataMember, string valueMember, object dataSource)
{
RadCheckedDropDownList rcddList = new RadCheckedDropDownList();
rcddList.Name = controlName;
rcddList.DataMember = dataMember;
rcddList.ValueMember = valueMember;
rcddList.DataSource = dataSource;
RadHostItem hostItem = new RadHostItem(rcddList); // placeholder
hostItem.MinSize = new Size(150, 25);
hostItem.MaxSize = new Size(150, 25);
rbgOtherParty.Items.Add(hostItem); // add new control to the specified RibbonGroup
}
int i ; // create multiple instances of the
for (i = 0; i <= 2; i++)
{
RadDesktopAlert a = new RadDesktopAlert();
a.CaptionText = i.ToString();
a.Show();
}
RadDesktopAllert does not support auto-size mode. You must set the size of the control so your contents will fit.
Marcel tried this sample code in eTMsync but it didn’t work for him so he ended up writing his own resize code.
http://www.telerik.com/forums/desktop-alert-not-resizing-accordingly-to-the-contenttext-set
It offers some “HTML-like” formatting but does not support " ". [[http://www.telerik.com/help/winforms/tpf-html-like-text-formatting.html|Here is a list]] of supported tags and expressions.
[[http://www.telerik.com/forums/hyperlink-click-9782f6494b85|Here’s a code example]] to make a clickable hyperlink in the Alert Content.
You can add a button (or other element) to any control, including an Alert. Here’s how to add a button:
RadButtonElement element = new RadButtonElement();
element.Text = "Button";
element.MaxSize = new Size(20, 20);
this.radDesktopAlert1.Popup.AlertElement.ContentElement.Children.Add(element);
[[http://www.telerik.com/forums/changing-desktopalert-color|Here’s Color Change examples]] by choosing an alternate themes or using a customized theme from Visual Style Builder.
//You can Preview the Alert in the IDE from the control Smart Tag in the Component Bin.//
* ‘ScreenPosition’ accepts six possible positions from the AlertScreenPosition enumerator: TopLeft, TopCenter, TopRight, BottomLeft, BottomCenter, BottomRight
* ‘FixedSize’ defaults to 0,0 for a default size. Set this to override the size, or do it in code:\\
this.radDesktopAlert1.FixedSize = new Size(200, 200);
* ‘CanMove’ default True, enables the Alert to be dragged with the mouse
* ‘AutoCloseDelay’ how long to stay on screen (defaults to 10 sec)
* ‘AutoClose’ whether will disappear after the period of time defined by the property. Set = false to leave open.
* ‘AlertImage’ specifies an icon that will be shown on the left of the alert panel
* ‘ButtonItems’ collection adds custom buttons to the alert
* ‘Opacity’ starting opacity when it appears (defaults to 0.8 – 80%). Changes to 100% on mouse over.
* ‘PopupAnimation’ = true to enable animations
* ‘PopupAnimationFrames’ number frames in the popup animation. More frames means longer animation.
* ‘PopupAnimationDirection’ (default Down) direction of the animation. Down slides down from the initial location. Can aldo have Up, Left or Right.
* ‘PopupAnimationEasing’ different animation easing effects which are used to start and finish the animation.
* ‘FadeAnimationType‘ (default ‘FadeIn,FadeOut ‘)accepts values from FadeAnimationType enum which also allows for combinations of its values.
* You can also use the FadeAnimationFrames property to define the amount of frames used to animate the opacity of the alert’s popup. By increasing the amount of frames you will increase the duration of the fade animation.
* Caption Buttons
* ‘CloseButton’ closes the alert. Use ShowCloseButton to show/hide the button.
* ‘PinButton’ pin the alert on the screen and prevent it from being closed automatically. ShowPinButton to show/hide the button.
* ‘OptionsButton’ displays a drop-down menu with user-defined content from the OptionItems collection. Use ShowOptionsButton to show/hide the button.
==== RadHScrollBar – rhsb ====
See: [[#radtoggleswitch-rts|RadVScrollBar]]
==== +-* RadLabel – rlbl ====
http://www.telerik.com/help/winforms/panels-and-labels-label-overview.html
http://www.telerik.com/community/forums/winforms/panels-and-labels.aspx
Telerik themeable label with [[http://docs.telerik.com/devtools/winforms/telerik-presentation-framework/html-like-text-formatting|HTML-like formatting]] capability. Also see [[http://tv.telerik.com/watch/winforms/utility/enhanced-html-like-markup-support|this video]].
{{tdn:image126.png?248x61|A black text on a white background Description automatically generated}}
//NOTE: Our design policy it to only change the control name from default if we will programmatically change the text.//
* 'Text' \Behavior
* 'Name' \Design
* 'Location' \Layout
* 'Size' \Layout
*
Legality Software provides packaged software products and custom software solutions for law firms. Our solutions typically enhance the capabilities of, or fix problems with, the tools you use in your firm today. We also help firms automate difficult, time consuming or repetitive tasks. Legality products and solutions are designed to solve your problems so you can achieve your goals.
If you have a specific problem we may already have a solution.
If not we can build one for you.
Visit Legality Software to learn more.
{{tdn:image127.png?478x164|A screenshot of a software Description automatically generated}}
void radVScrollBar1_Scroll(object sender, ScrollEventArgs e)
{
this.radPanel2.Top = -this.radVScrollBar1.Value;
}
Finally, set the Maximum property of the scrollbar to reflect the size of the scrollable height which is the total height of the scrollable content minus the visible height. For the example of this section in particular, that is the height of the second panel minus the height of the first panel.
this.radVScrollBar1.Maximum = this.radPanel2.Size.Height - this.radPanel1.Size.Height;
==== * RadWizard – rw ====
http://www.telerik.com/help/winforms/wizard-overview.html\\
http://www.telerik.com/community/forums/winforms/wizard.aspx\\
Design Time Settings http://www.telerik.com/help/winforms/wizard-design-time.html
Wizard dialog with multiple pages and
private void radWizard1_Next(object sender, WizardCancelEventArgs e)
{
if (this.radWizard1.SelectedPage == this.radWizard1.Pages[1]) %%//%% Check if this is the desired page
{
// Do some validation here
e.Cancel = true; %%//%% If the validation does not pass
this.radWizard1.SelectedPage = this.radWizard1.Pages[0]; %%//%% Could return to 1st page
// Or you could show some message to the user
}
}
* Previous - Fires when the Back command button is clicked. It is cancelable event.
* SelectedPageChanging - Fires before the selected page of RadWizard is changed. It is cancelable event. The arguments of the event provide the selected page of the control and the page to be selected.
* SelectedPageChanged - Fires after the selected page of RadWizard is changed. The arguments of the event provide the previous selected page and the selected page of the control.
* Finish - Fires when the Finish command button is clicked.
* Cancel - Fires when the Cancel command button is clicked.
* Help - Fires when the Help command button is clicked.
[[http://www.telerik.com/forums/branching|Custom Page Branching Sample Project]]
[[http://www.telerik.com/forums/navigation-buttons|Custom CommandArea Controls like Navigation Buttons]]
Create multiple Welcome or Completion pages
* ‘WelcomePage’ - Select one of multiple Welcome pages
* ‘WelcomePage.Name’ – Provide a rwppagenameWelcomePage style name from one of multiple Welcome pages
* ‘CompletionPage’ - Select one of multiple Completionpages
* ‘CompletionPage.Name’ – Provide a rwppagenameCompletionPage style name from one of multiple Completionpages
* Edit one of the alternate pages by selecting it from the Quick Task ‘Edit Pages’ list or ‘Pages’ collection, then click
(radCalendarControlName.DateTimePickerElement.GetCurrentBehavior() as RadDateTimePickerCalendar).Calendar.FastNavigationStep = 12;
==== RadScheduler – rs ====
http://www.telerik.com/help/winforms/scheduler-introduction.html
http://www.telerik.com/community/forums/winforms/scheduler.aspx\\
VIDEO: http://www.telerik.com/videos/winforms/introduction-to-radscheduler-for-winforms-webinar\\
VIDEO: http://tv.telerik.com/watch/winforms/radscheduler/scheduler
RadScheduler is a highly-customizable appointment presentation component that offers rich Outlook®-style functionality. When used with RadReminder and RadDesktopAlert you can add rich scheduling UI to any WinForms application and enjoy a lightweight yet highly customizable component.
{{tdn:image138.png?445x302|A screenshot of a computer Description automatically generated}}
=== RadSchedulerNavigator – rsn ===
http://www.telerik.com/help/winforms/scheduler-scheduler-navigator-overview.html
RadSchedulerNavigator is a stand-alone control used for navigation in RadScheduler control.
{{tdn:image139.png?483x73|A screenshot of a computer Description automatically generated}}
=== SchedulerBinderDataSource – sbds ===
http:%%//%%docs.telerik.com/devtools/winforms/scheduler/design-time/smart-tag
=== RadReminder – rr ===
http://docs.telerik.com/devtools/winforms/scheduler/reminders/radreminder http://www.telerik.com/community/forums/winforms/scheduler.aspx\\
VIDEO: http://tv.telerik.com/watch/winforms/getting-started-with-radschedulerreminder
RadReminder is a component that reminds you of an object that you pass to it. This object should implement IRemindObject and depending on the values that you set in the implementation of the IRemindObject interface, RadReminder throws an event. When the event is fired, you can show an appropriate message to the user using RadDesktopAlert or another alert implementation of your choice.
{{tdn:image140.png?320x241|A screenshot of a computer Description automatically generated}}
=== RadSchedulerReminder – rsr ===
http://www.telerik.com/help/winforms/scheduler-reminders-radschedulerreminder.html
RadSchedulerReminder represents a special reminder object for the appointments that are collected in RadScheduler. This component inherits from RadReminder.
{{tdn:image141.png?406x302|A screenshot of a computer program Description automatically generated}}
==== RadGanttView - rganttv ====
http://docs.telerik.com/devtools/winforms/ganttview/ganttview-\\
http://docs.telerik.com/devtools/winforms/ganttview/timeline/timeline-views
RadGanttView is a data-visualization and editing control for project planning data and different types of task and time scheduling. All tasks are represented as vertical bars aligned along a timeline with the beginning and end time of each task determining its location along the timeline. These elements and the dependencies between them comprise the work breakdown structure of a project.
{{tdn:image142.png?396x259|A screenshot of a computer Description automatically generated}}
RadGanttView offers a number of built-in timeline views which allow you to show the timeline in different scales. It is reasonable to change the timeline
====== Telerik - Document Processing ======
http://docs.telerik.com/devtools/document-processing/introduction\\
Telerik Document Processing is a bundle of UI-independent, cross-platform libraries enabling you to process the most commonly used flow, fixed and spreadsheet document formats. The components allow to create documents, import, modify and export them without external dependencies between the following file formats: CSV, DOCX, HTML, PDF, RTF, TXT, XLSX, ZIP
===== RadPdfProcessing =====
http://docs.telerik.com/devtools/document-processing/libraries/radpdfprocessing/overview
RadPdfProcessing is a processing library that allows to create, import and export PDF documents.
Some of the features you can take advantage of are:
* Import/export to PDF format.
* Support for images and shapes.
* Easy-to-use API for document generation.
===== RadSpreadProcessing =====
http://docs.telerik.com/devtools/document-processing/libraries/radspreadprocessing/overview
RadSpreadProcessing is a document processing library that enables your applications to easily import and export files to and from the most common spreadsheet file formats.
{{tdn:image143.png?344x219}}
Some of the features which you can use are:
* Import/export to different spreadsheet formats. Check the Formats and Conversion section for more information on this topic.
* More than 200 built-in formulas.
* Powerful and easy-to-use API.
* Data Validation
* Filtering
* Grouping
* Sorting
===== RadSpreadStreamProcessing =====
http://docs.telerik.com/devtools/document-processing/libraries/radspreadstreamprocessing/overview
Spread streaming is a document processing paradigm that allows you to create big spreadsheet documents with great performance and minimal memory footprint. The key for the memory efficiency is that the spread streaming library writes the spreadsheet content directly to a stream without creating and preserving the spreadsheet document model in memory. Each time an exporter object is disposed, the set values are written into the stream. This allows you to create large documents with an excellent performance.
Some of the features you can take advantage of are:
* Export to XLSX or CSV files
* Writing directly into a stream
* Append new worksheets to existing ones
* Grouping
* Styling and formatting cells
* Hidden rows and columns
* Freezing panes
**RadSpreadStreamProcessing vs. RadSpreadProcessing**
There are two main differences between the libraries.
* RadSpreadStreamProcessing can be used only to create documents and append data to existing ones. On the other hand you can use the RadSpreadProcessing also for reading and modifying the content of documents.
* RadSpreadStreamProcessing writes directly into a stream, unlike RadSpreadProcessing which creates models for the elements in the document. This is why the memory used with the spread streaming library is significantly lower than when using RadSpreadProcessing.
===== RadWordsProcessing =====
http://docs.telerik.com/devtools/document-processing/libraries/radwordsprocessing/overview
RadWordsProcessing is a processing library that allows to create, load, modify and export documents to a variety of formats.
{{tdn:image144.png?339x315}}
Some of the features are:
* Import/export to several file formats.
* Rich document model support, including tables, images, hyperlinks, headers and footers.
* Comprehensive and easy-to-use API allowing for generation and manipulation of documents.
* Variety of built-in themes and styles.
===== RadZipLibrary =====
http://docs.telerik.com/devtools/document-processing/libraries/radziplibrary/overview
With RadZipLibrary you can compress data like images, docx or pdf files.
{{tdn:image145.png?451x245}}
This is a list with short descriptions of the top-of-the-line features of Telerik's Zip Library control:
* Easy to use API: The Zip Library exposes flexible and easy API to provide you with full control over the compressed data.
* Load or create ZIP files: You can load data from existing ZIP files, create new ones and edit ZIPs that can be used by other applications. You can also create ZIP files in memory or add data to ZIP file from stream.
* Store your data in the Isolated Storage: You can store the compressed data in the Isolated Storage.
* Support for large files: The Zip Library works seamlessly with large files.
* Support for encryption: You can protect your ZIP file with password for more security.
===== RadPdfViewer – rpdfv =====
http://www.telerik.com/help/winforms/pdfviewer-overview.html\\
Video: http://www.telerik.com/videos/winforms/getting-started-with-the-winforms-radpdfviewer
RadPdfViewer is a control that can natively visualize PDF documents straight in your application. It comes with a predefined UI that is intuitive and provides the means for utilizing the features of the control. The control utilizes virtualization and supports load on-demand mode in order to guarantee good performance with larger documents.
{{tdn:image146.png?418x274}}
Here is a list of the supported features:
* Open PDF document from file or stream
* Pan
* Zoom
* Selection
* Annotations
* Copy to clipboard
* Find
* Keyboard navigation
* Navigation toolbar
* Context menu
* Printing
**Unsupported Features** http://www.telerik.com/help/winforms/pdfviewer-unsupported-features.html
* It can’t open encrypted or password protected PDFs
* Annotations - of all annotations, only link is supported
* Structured content - there are several ways to define structured content in a PDF file. RadPdfViewer does not support document outline, article threads and interactive form
* Some other things as well
==== RadPdfViewerNavigator – rpdfvn ====
http://docs.telerik.com/devtools/winforms/pdfviewer/pdfviewernavigator
Adds toolbar to RadPdfViewer that adds support for the typical commands you want to use on a PDF file.
{{tdn:image147.png?720x36}}
This control can be used with RadPdfViewer. It provides predefined UI for the most common operations used with PDF files. The following list contains all features:
* Open File: You can open files with this button.
* Print: Use this button to print the content.
* SaveAs: Use this option to save the current file in a specific location.
* Rotate: Rotate all pages clockwise or counter clockwise using the buttons.
* Navigation: You can navigate trough the document by using the previous/next page buttons or manually typing the page number.
* Pan and Select: You can select text in the document or you can move the page with the mouse.
* Zoom: You can use the buttons to increase/decrease the zoom factor or select it from the drop down.
* FitWith and FithPage: These buttons allows you to fit the page according to the current window size.
* Search: You can search for a particular string and navigate among the results.
===== RadDiagram =====
http://docs.telerik.com/devtools/winforms/diagram/diagram
{{tdn:image148.png?233x207}}\\
RadDiagram offers flexible and interactive diagramming layouts for your rich data-visualization applications.
{{tdn:image149.png?308x213}}
====== Telerik – Themes ======
http://www.telerik.com/help/winforms/themes-using-a-default-theme-for-the-entire-application.html Definitely this one\\
http://www.telerik.com/support/kb/winforms/details/creating-a-theme-component Maybe this one??\\
http://www.telerik.com/community/forums/winforms/themes-and-visual-style-builder.aspx\\
Video: [[http://www.telerik.com/videos/winforms/theme-for-telerik-ui-for-winforms|Theme for Telerik UI for Winforms]]\\
Video: http://www.telerik.com/videos/winforms/changing-themes-at-run-time-with-radcontrols-for-winforms
Use the Telerik ThemeViewer Tool to examine all the controls in the available themes. **This is also a good place to see all the controls in action.**
### At some point I’d like to have a standard “Tools | Options” dialog in our project templates where that’s appropriate. This would contain a tree on the left and a property grid on the right. I’d like a search field above that tree so you can type word(s) to filter and only see branches of the tree that contain that text. This would enable the user to easily find settings.
==== ucTelerikThemeSelector in LS.Common.Presentation ====
See this video: [[file:///\\192.168.93.1\KB_MiM\Telerik\20160110)%20ucTelerikThemeSelector.mp4|\\
192.168.93.1\KB_MiM\Telerik\20160110) ucTelerikThemeSelector.mp4]]
// Set the theme to the current ucTelerikThemeSelector default
ThemeName = ucTelerikThemeSelector1.ThemeName; // Set the theme for this (existing) form
ThemeResolutionService.ApplicationThemeName = usTelerikThemeSelector1.ThemeName; // Set the theme for all other (future created) forms in this application
==== Code to Set the Current Theme ** ====
ThemeResolutionService.ApplicationThemeName = "Office2013Dark"; // Set the Current Theme Applicaton wide
// NOTE: You must also load the Office2013Dark theme in the solution and add ‘’
ThemeName = ucTelerikThemeSelector1.ThemeName; %%//%% Set the theme for this (existing) form. This is good for rfrmMain where it is already created before the ApplicationThemeName was set.
Or load the Office2013Dark theme as the default/only theme for a simple application (with no ThemeSelector)
Add this code fragment after InitializeComponent();
ThemeResolutionService.ApplicationThemeName = "Office2013Dark"; // Set the Current Theme Applicaton wide
ThemeName = "Office2013Dark"; // Set the theme for this (existing) form.
// NOTE: You must also add the Office2013Dark theme control by dragging it from the Toolbox to the form
**Note: You still must to drop the theme component on the form (e.g. Office2007Black in the code samples above) or create an instance of the desired theme programmatically.**
==== Enable/Disable the globally set theme for a specific control ====
* ‘EnableApplicationThemeName’ – Set a control’s ‘EnableApplicationThemeName’ property to a different theme than the assigned application wide theme.
* If true the control will use the globally set ApplicationThemeName property.
* If false this control’s theme is set by its own ThemeName property.
ThemeResolutionService.ApplicationThemeName = "Office2010Blue"; // Application wide theme
radGridView1.ElementTree.EnableApplicationThemeName = false; // set GridView to use separate theme
radGridView1.ThemeName = "Office2010Silver"; // set GridView alternate theme
this.rpnlPanel.PanelElement.PanelBorder.ShouldPaint = false;
* Or to hide some/selected borders using this code:
// Hide some/selected RadPanel borders
this.rpnlPanel.PanelElement.PanelBorder.BoxStyle = BorderBoxStyle.FourBorders; // enable border segments
this.rpnlPanel.PanelElement.PanelBorder.TopWidth = 0; // hide the top border
this.rpnlPanel.PanelElement.PanelBorder.BottomWidth = 0;
this.rpnlPanel.PanelElement.PanelBorder.LeftWidth = 0;
this.rpnlPanel.PanelElement.PanelBorder.RightWidth = 0;
From: http://www.telerik.com/forums/can-radpanel-only-have-bottom-border-or-top-etc
===== HTML-like Text Formatting =====
http://docs.telerik.com/devtools/winforms/telerik-presentation-framework/html-like-text-formatting
VIDEO: Enhanced HTML-like Markup Support
Telerik UI for for WinForms provide an advanced text styling mechanism which can be applied to all Telerik WinForms controls and their elements, because it enhances one of the smallest element in Telerik Presentation Framework - the text primitive. The new rich text formatting mechanism uses plain HTML tags to display formatted text such as font style, font color, font size, etc. Your text must start with the tag so that HTML-like formatting is activated. The list of supported markup tags is given below:
**Supported Tags**\\
|
|Paragraph | | | |Span. There is limited support of the style attribute and the CSS properties: font-family, font-size, color, and background-color. Refer to the example below. The Span tag is preferable to font, color, and size tags.| |