protected void ListBox3_ItemDataBound(object sender, ListBoxItemEventArgs e) { if (e.Item.Value == "AROUT" || e.Item.Value == "BLONP" || e.Item.Value == "BOLID") { e.Item.Selected = true; } }
public SlideBar() { ToggleCommand = new RoutedCommand("ToggleOpen", typeof(SlideBar)); initCommand(); Loaded += OnLoaded; MouseLeftButtonUp += (o, a) => { ListBoxItemEventArgs arg = new ListBoxItemEventArgs(ItemClickEvent, this); SlideBar slideBar = (SlideBar)o; if (null == slideBar) { return; } ListBoxItem listItem = UITool.GetElementUnderMouse <ListBoxItem>(); if (null == listItem) { return; } arg.SlideBar = slideBar; arg.Item = listItem; arg.Index = slideBar.ItemContainerGenerator.IndexFromContainer(listItem); arg.Data = listItem.DataContext; IsOpened = false; RaiseEvent(arg); }; }
protected void ListBox1_SelectedIndexChanged(object sender, ListBoxItemEventArgs e) { Literal container1 = e.Item.FindControl("Container1") as Literal; Literal container2 = e.Item.FindControl("Container2") as Literal; Literal container3 = e.Item.FindControl("Container3") as Literal; string details = "<br /><br />"; details += "<b>Supplier ID</b>: " + container1.Text; details += "<br />"; details += "<b>Company Name</b>: " + container2.Text; details += "<br />"; details += "<b>City</b>: " + container3.Text; Details.Text = details; }
void lsbDropbox_ItemClick(object sender, ListBoxItemEventArgs e) { //if a file is selected deselect it and reselect the folder if (!_selectedItem.Is_Dir) { _selectedItem = _selectedItem.Parent; } var selected = e.Item as MetaData; if (selected.Is_Dir) { Host.Cursor = Cursors.WaitCursor; //hide file buttons fileButtonPanel.Hide(); //Get the selected folders contents var newSelected = Form1.Instance.DropBox.GetItems(selected); if (newSelected == null) { Host.Cursor = Cursors.Default; MessageDialog.Show("Failed to Get Dropbox Folder" + Environment.NewLine + "Check Data Connection.", null, "OK"); } else { header.BackButton.Text = "Up"; newSelected.Parent = _selectedItem; _selectedItem = newSelected; lsbDropbox.Items = ListHelpers.MakeDirList(_selectedItem); lsbDropbox.SelectedItemIndex = -1; header.Title = _selectedItem.Name; Host.Cursor = Cursors.Default; } } else { selected.Parent = _selectedItem; _selectedItem = selected; fileButtonPanel.Show(ShowTransition.FromBottom); } }
void lsbFolders_FolderSelected(object sender, ListBoxItemEventArgs e) { if (!Syncer.Instance.IsSyncing) { SelectedFolder = e.Item as ItemViewModel; //Check if the folder exists if (!Directory.Exists(SelectedFolder.Path)) { var syncFolderMsgBox = new MessageDialog(); syncFolderMsgBox.Message = string.Format("Folder No Longer exists{0}Remove From List?", Environment.NewLine); syncFolderMsgBox.OkText = "Yes"; syncFolderMsgBox.CancelText = "No"; syncFolderMsgBox.Result += new EventHandler <Fluid.Classes.DialogEventArgs>(syncFolderMsgBox_Result); syncFolderMsgBox.Show(ShowTransition.FromBottom); } else { SelectFolder(sender, e); } } }
protected void ComboBox1_SelectedIndexChanged(object sender, ListBoxItemEventArgs e) { SqlDataSource2.SelectParameters[0].DefaultValue = e.Item.Value; SuperForm1.DefaultMode = DetailsViewMode.Edit; SuperForm1.DataBind(); }
protected void ListBox1_ItemDataBound(object sender, ListBoxItemEventArgs e) { e.Item.ImageUrl = GetCountryFlag(DataBinder.Eval(e.Item.DataItem, "Country").ToString()); }
protected void ListBox1_ItemDataBound(object sender, ListBoxItemEventArgs e) { e.Item.ToolTip = e.Item.Text; }
protected void ListBox1_SelectedIndexChanged(object sender, ListBoxItemEventArgs e) { SuperForm1.FolderStyle = "styles/" + e.Item.Value; SuperForm1.InterfaceFolderStyle = "../Interface/styles/" + e.Item.Value; SuperForm1.DataBind(); }
protected void ListBox1_SelectedIndexChanged(object sender, ListBoxItemEventArgs e) { EventLogger.Text = "<br /><br /><b>The selection has been changed to:</b> " + e.Item.Text; }
protected void ListBox1_SelectedIndexChanged(object sender, ListBoxItemEventArgs e) { Details.Text = "<br /><br /><br /><b>" + e.Item.Text + "</b> has been selected.<br />"; }
protected void ListBox1_ItemDataBound(object sender, ListBoxItemEventArgs e) { e.Item.ImageUrl = "resources/images/products/" + DataBinder.Eval(e.Item.DataItem, "ImageName"); }
protected void ListBox1_SelectedIndexChanged(object sender, ListBoxItemEventArgs e) { ListBox1.FolderStyle = "styles/" + e.Item.Value; }
private void DemoCheckedListBox_ItemCheckStateChanged(object sender, ListBoxItemEventArgs e) { AddEventsLogMessage("CheckedListBox: Item Check State Changed"); UpdateListBoxCheckedItemIndicesTextBox(); }
protected void ListBox1_SelectedIndexChanged(object sender, ListBoxItemEventArgs e) { var cos = "<br /><br /><b>The selection has been changed to:</b> " + e.Item.Text; }