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 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 TopicListbox_MouseClicked(object sender, MouseEventArgs e) { if (_setView.TopicListbox.SelectedIndex != -1) { SimpleListViewVisualItem item = _setView.TopicListbox.ElementTree.GetElementAtPoint(e.Location) as SimpleListViewVisualItem; if (item != null) { var visualItem = _setView.TopicListbox.ElementTree.GetElementAtPoint(e.Location) as BaseListViewVisualItem; var dataItem = visualItem?.Data; var index = _setView.TopicListbox?.Items?.IndexOf(dataItem); _setView.TopicListbox.SelectedIndex = (int)index; string SelectedItemText = item.Text; SetModel.SelectedTopic = SelectedItemText; _setView.InputNewTopicName.Text = SelectedItemText; _setView.MainContent.LoadFile(Encoding.ASCII.GetString(_setModel.SetTopics[_setView.TopicListbox.SelectedIndex].TopicFile)); AddThumbsToPanel(); //Add thumbnails for the selected set } } }
private void HomeSetList_MouseClick(object sender, System.Windows.Forms.MouseEventArgs e) { if (_setlistboxView.HomeSetList.SelectedIndex != -1) { SimpleListViewVisualItem item = _setlistboxView.HomeSetList.ElementTree.GetElementAtPoint(e.Location) as SimpleListViewVisualItem; if (item == null) { SetModel.SelectedSet = null; _setlistboxView.HomeSetList.SelectedIndex = -1; } else { SetModel.SelectedSet = item.Text; } } else { SetModel.SelectedSet = null; } }