public DetailItem CreateDetailItem(IArticleMasterCollection masterStore, DetailCode symbolCode, DetailName symbolName, MasterCode symbolRole, DetailGang symbolGang, DetailType symbolType, DetailBind symbolBind, TaxingBehaviour taxingType, HealthBehaviour healthType, SocialBehaviour socialType, params DetailCode[] symbolPath) { MasterItem elementNode = masterStore.FindArticleConfig(symbolRole); DetailItem elementItem = new ArticleConfigDetail(symbolCode, symbolName, symbolGang, symbolType, symbolBind, taxingType, healthType, socialType, symbolPath); MasterStub elementStub = elementNode.CloneMasterStub( symbolCode, symbolRole, symbolGang, symbolType, symbolBind, taxingType, healthType, socialType); elementItem.SetSymbolRole(symbolRole, elementStub); return(elementItem); }
public void GetDetailView(string product_name) { var query = from product in products where product.Name == product_name select product; Product p = query.FirstOrDefault(); var bind = new Binding("Name") { Source = p }; DetailName.SetBinding(TextBlock.TextProperty, bind); bind = new Binding("Image") { Source = p }; DI.SetBinding(Image.SourceProperty, bind); bind = new Binding("Price") { Source = p }; DetailPrice.SetBinding(TextBlock.TextProperty, bind); //detailImage.ImageSource = ImageSource.Equals(temp.Image); //DI.Source = new BitmapImage(new Uri(temp.Image, UriKind.Relative)); }