Assign a vertical alignment to a list box when selected //WP7 C# XAML -


when list box item selected, selected item become vertically centered on hit. hoping add c#. i've got far. want same applied secondary list box item (listbox1 , listbox2).

 private void listbox1_selectionchanged(object sender, selectionchangedeventargs e)     {          //messagebox.show("item selected: " + listbox1.selecteditem.tostring());          if (listbox1.selectedindex == 3)         {             listbox2.scrollintoview(listbox2.items[27]);          }     }       private void listbox2_selectionchanged(object sender, selectionchangedeventargs e)     {         //messagebox.show("item selected: " + listbox2.selecteditem.tostring());     } 

if want change appearance of in different states i'd reccomend using visualstatemanager , changing properties of elements accordingly in relevant state. in instance of items listbox, should change itemcontainerstyle.


Comments

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

windows - Python Service Installation - "Could not find PythonClass entry" -

Determine if a XmlNode is empty or null in C#? -