日期:2014-05-17 浏览次数:20868 次
foreach (V_LISTRIGHT tmp in list)
{
NavBarGroup newGroup = new NavBarGroup();
newGroup.Header = tmp.DISPLAYNAME;
navBarList.Groups.Add(newGroup);
foreach (V_LISTRIGHT item in context.V_LISTRIGHTs)
{
if (item.PARENTNADOID == tmp.NODEID)
{
NavBarItem newItem = new NavBarItem();
newItem.Content = item.DISPLAYNAME;
newItem.Name = item.NODEID;
if(item.NODEID=="2")
newItem.ImageSource = new BitmapImage(new Uri("/images/"+item.LINKIMAGE+ ".png", UriKind.Relative));
newGroup.Items.Add(newItem);