private void radDiagramToolbox1_VisualItemFormatting(object sender, ListViewVisualItemEventArgs e) { var dataItem = e.VisualItem.Data as DiagramListViewDataItem; //dataItem.Shape = new RadDiagramShape(); if (dataItem != null) { var el = e.VisualItem as DiagramListViewVisualItem; if (el != null) { switch (dataItem.Key) { case "Pipette": //el = new PipetteDiagramShape(); el.ShapeElement.BackColor = Color.FromArgb(11, 187, 239); break; case "Magnetic\r\nSeparation": el.ShapeElement.BackColor = Color.FromArgb(234, 82, 151); break; case "Incubation": el.ShapeElement.BackColor = Color.FromArgb(149, 193, 31); break; case "Centrifugation": el.ShapeElement.BackColor = Color.FromArgb(255, 204, 0); break; } } } }
private void radCheckedListBox1_VisualItemFormatting(object sender, ListViewVisualItemEventArgs e) { SimpleListViewVisualItem item = e.VisualItem as SimpleListViewVisualItem; Product product = item.Data.Tag as Product; string color = "#681406"; if (TelerikHelper.IsDarkTheme(this.radListView1.ThemeName)) { color = "#FFFFFF"; } if (item.Children.Count > 0) { ListViewItemCheckbox checkBoxItem = item.Children[0] as ListViewItemCheckbox; checkBoxItem.Margin = new Padding(2, 2, 3, 2); } item.Data.Text = "" + " " + product.Name + "" + " " + product.Weight + "gr" + " " + " " + string.Format("{0:C2}", product.Price) + ""; // item.ImageLayout = ImageLayout.Center; // item.ImageAlignment = ContentAlignment.MiddleLeft; }
private void radListView1_VisualItemFormatting(object sender, ListViewVisualItemEventArgs e) { DetailListViewVisualItem visualItem = e.VisualItem as DetailListViewVisualItem; if (visualItem != null) { e.VisualItem.Margin = new Padding(20, 0, 0, 0); } else { e.VisualItem.Margin = new Padding(0); } }
private void UsersListView_VisualItemFormatting(object sender, ListViewVisualItemEventArgs e) { if (e.VisualItem.Current) { e.VisualItem.NumberOfColors = 1; e.VisualItem.BackColor = Color.Aqua; e.VisualItem.BorderColor = Color.Aqua; } else { e.VisualItem.NumberOfColors = 1; e.VisualItem.BackColor = Color.LightBlue; e.VisualItem.BorderColor = Color.LightBlue; } }
//public class AShape : ElementShape //{ // //public override GraphicsPath CreatePath(Rectangle bounds) // //{ // // GraphicsPath path = new GraphicsPath(); // // path.AddString("PcsTec", new FontFamily("Arial"), 0, 50, Point.Empty, StringFormat.GenericTypographic); // // return path; // //} //} private void radDiagramToolbox1_VisualItemFormatting(object sender, ListViewVisualItemEventArgs e) { DiagramListViewDataItem dataItem = e.VisualItem.Data as DiagramListViewDataItem; if (dataItem != null) { if (dataItem.Key == "Image") { DiagramListViewVisualItem visual = e.VisualItem as DiagramListViewVisualItem; visual.Image = Properties.Resources.background_ok; visual.ImageLayout = ImageLayout.Zoom; visual.ShapeElement.Opacity = 0; } } }
private void movList_VisualItemFormatting(object sender, ListViewVisualItemEventArgs e) { SimpleListViewVisualItem item = e.VisualItem as SimpleListViewVisualItem; Product product = item.Data.Tag as Product; string color = "#681406"; item.Data.Text = "<html>" + "<span style=\"font-size:14.5pt;font-family:Segoe UI Semibold;\"> " + product.Title + "</span>" + "<br><span style=\"font-size:12px;\"><i> Total: " + product.TotalItem + " Available: " + product.Avaiable + "</i></span>" + "<br><span style=\"font-size:15pt;\"> </span>" + "<span style=\"color:" + color + ";font-size:14.5pt;\"> BDT " + product.SellingPrice + "</span>"; item.ImageLayout = ImageLayout.Center; item.ImageAlignment = ContentAlignment.MiddleLeft; }
private void radListView1_VisualItemFormatting(object sender, ListViewVisualItemEventArgs e) { if (e.VisualItem is BaseListViewGroupVisualItem) { return; } if (this.radListView1.ViewType == ListViewType.IconsView) { e.VisualItem.Text = "<html>" + "<span style=\"color:#0066FF;\"> " + " " + e.VisualItem.Data["TenChuongTrinh"] + "</span>"; e.VisualItem.ImageLayout = ImageLayout.Stretch; e.VisualItem.ImageAlignment = ContentAlignment.MiddleLeft; e.VisualItem.Font = new System.Drawing.Font("Times New Roman", 10F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(163))); } }
void radListView1_VisualItemFormatting(object sender, ListViewVisualItemEventArgs e) { e.VisualItem.SetThemeValueOverride(LightVisualElement.NumberOfColorsProperty, 1, "RadListVisualItem.ContainsMouse.MouseOver"); e.VisualItem.SetThemeValueOverride(LightVisualElement.BackColorProperty, Color.LightBlue, "RadListVisualItem.ContainsMouse.MouseOver"); if (e.VisualItem.Selected == true) { e.VisualItem.BackColor = Color.Transparent; e.VisualItem.NumberOfColors = 1; e.VisualItem.GradientStyle = Telerik.WinControls.GradientStyles.Solid; e.VisualItem.BorderColor = Color.White; } else { e.VisualItem.BackColor = Color.Transparent; // e.VisualItem.ResetValue(LightVisualElement.BackColorProperty, Telerik.WinControls.ValueResetFlags.Local); // e.VisualItem.ResetValue(LightVisualElement.NumberOfColorsProperty, Telerik.WinControls.ValueResetFlags.Local); // e.VisualItem.ResetValue(LightVisualElement.GradientStyleProperty, Telerik.WinControls.ValueResetFlags.Local); // } }
private void DailyMenuListView_VisualItemFormatting(object sender, ListViewVisualItemEventArgs e) { }
private void radListViewClientList_VisualItemFormatting(object sender, ListViewVisualItemEventArgs e) { e.VisualItem.DrawFill = false; e.VisualItem.ForeColor = Color.Black; e.VisualItem.DrawBorder = false; }
/// <summary> /// Handles the VisualItemFormatting event of the lvParts control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="ListViewVisualItemEventArgs" /> instance containing the event data.</param> private void lvParts_VisualItemFormatting(object sender, ListViewVisualItemEventArgs e) { e.VisualItem.TextWrap = true; if (!e.VisualItem.Selected && !((IVfPartModel)e.VisualItem.Data.Tag).Processed) { e.VisualItem.BorderColor = Color.Red; e.VisualItem.ForeColor = Color.Gray; } else { e.VisualItem.ResetValue(LightVisualElement.ForeColorProperty, Telerik.WinControls.ValueResetFlags.Local); e.VisualItem.ResetValue(LightVisualElement.BorderColorProperty, Telerik.WinControls.ValueResetFlags.Local); } //((IVfPartModel)e.VisualItem.Tag).Processed //e.VisualItem.NumberOfColors = 1; //e.VisualItem.BackColor = Color.Yellow; //e.VisualItem.BorderColor = Color.Blue; }
private void MealsListView_VisualItemFormatting(object sender, ListViewVisualItemEventArgs e) { }