Click here to Skip to main content
15,890,557 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: Custom user control binding Pin
Joe Rozario31-Mar-10 21:00
Joe Rozario31-Mar-10 21:00 
AnswerRe: Custom user control binding Pin
Super Lloyd31-Mar-10 18:09
Super Lloyd31-Mar-10 18:09 
QuestionStrange window is shown every time i save a silverlight project Pin
jonatan_55629-Mar-10 0:51
jonatan_55629-Mar-10 0:51 
AnswerRe: Strange window is shown every time i save a silverlight project Pin
Abhinav S29-Mar-10 7:12
Abhinav S29-Mar-10 7:12 
GeneralRe: Strange window is shown every time i save a silverlight project Pin
jonatan_55629-Mar-10 22:27
jonatan_55629-Mar-10 22:27 
GeneralRe: Strange window is shown every time i save a silverlight project Pin
Abhinav S30-Mar-10 3:52
Abhinav S30-Mar-10 3:52 
QuestionTo generate Text boxes, Combo boxes, IP Address controls at runtime Pin
luckyshah29-Mar-10 0:32
luckyshah29-Mar-10 0:32 
AnswerRe: To generate Text boxes, Combo boxes, IP Address controls at runtime [modified] Pin
Parwej Ahamad29-Mar-10 9:49
professionalParwej Ahamad29-Mar-10 9:49 
In the mean time I am giving here steps. If you stuck anywhere then free to ask here. Thanks.

Step: 1- Arrange all data into XML properly. I am assuming each item having it's all required information.

Step: 2-
Crate a class contais that contains all required properties which can contain the XML item data.

Step: 3-
Load all XML tab item data using Linq in Generic list (Like: List<tabliteminfo>)
XDocument xmlDoc = XDocument.Load("TabItemsData.xml");
List<TabItemInfo> tabItemInfoList= (from tabItem in xmlDoc.Descendants("TabItems")
                                select new TabItemInfo //TabItemInfo is your class name
                                {
                                    //Set all class properties as given below
                                    TabItemID =int.Parse(tabItem.Element("TabItemId").Value),
                                    TabName = tabItem.Element("TabName").Value,
                                }).ToList<TabItemInfo>();


Step: 4-
On WPF window. Creat a Tabcontrol without any tabitem.

Note: No need to take Tabcontrol at design time. You can also take at runtime and add it into Grid or Stack Panel whatever panel are using.

Load all controls items as tab item.
foreach (TabItemInfo tabItemInfo in tabItemInfoList)
          {
              //Create Tab Items
              TabItem tabItem = new TabItem();
              tabItem.Header = tabItemInfo.TabName;
              moduleTabControls.Items.Add(tabItem);
          }



Hope so it will help you.


Thanks for your patience
Parwej Ahamad
ahamad.parwej@gmail.com



modified on Tuesday, March 30, 2010 11:18 PM

GeneralRe: To generate Text boxes, Combo boxes, IP Address controls at runtime Pin
luckyshah29-Mar-10 22:02
luckyshah29-Mar-10 22:02 
QuestionBinding Double click Pin
Joe Rozario28-Mar-10 23:18
Joe Rozario28-Mar-10 23:18 
AnswerRe: Binding Double click Pin
Pete O'Hanlon29-Mar-10 0:00
mvePete O'Hanlon29-Mar-10 0:00 
AnswerRe: Binding Double click Pin
Frank W. Wu12-Oct-10 9:23
Frank W. Wu12-Oct-10 9:23 
Questiongetting and setting textbox.txt value in XAML from C# in Winform Pin
Colin Bowdery27-Mar-10 6:30
Colin Bowdery27-Mar-10 6:30 
AnswerRe: getting and setting textbox.txt value in XAML from C# in Winform Pin
Parwej Ahamad27-Mar-10 7:09
professionalParwej Ahamad27-Mar-10 7:09 
AnswerRe: getting and setting textbox.txt value in XAML from C# in Winform Pin
carlecomm31-Mar-10 17:05
carlecomm31-Mar-10 17:05 
QuestionHow to animate the ListBox Items While Scrolling Pin
wasimsharp26-Mar-10 20:12
wasimsharp26-Mar-10 20:12 
AnswerRe: How to animate the ListBox Items While Scrolling Pin
wasimsharp28-Mar-10 19:00
wasimsharp28-Mar-10 19:00 
QuestionUser Control take time for loading???? Pin
urooj_mahmood26-Mar-10 4:27
urooj_mahmood26-Mar-10 4:27 
AnswerRe: User Control take time for loading???? Pin
Abhinav S26-Mar-10 5:33
Abhinav S26-Mar-10 5:33 
GeneralRe: User Control take time for loading???? Pin
urooj_mahmood28-Mar-10 21:35
urooj_mahmood28-Mar-10 21:35 
GeneralRe: User Control take time for loading???? Pin
Kunal Chowdhury «IN»28-Mar-10 23:07
professionalKunal Chowdhury «IN»28-Mar-10 23:07 
GeneralRe: User Control take time for loading???? Pin
Kunal Chowdhury «IN»29-Mar-10 0:58
professionalKunal Chowdhury «IN»29-Mar-10 0:58 
Questioncan't load .xaml in browser Pin
yuripon25-Mar-10 20:31
yuripon25-Mar-10 20:31 
AnswerRe: can't load .xaml in browser Pin
Abhinav S25-Mar-10 22:19
Abhinav S25-Mar-10 22:19 
GeneralRe: can't load .xaml in browser Pin
yuripon26-Mar-10 2:18
yuripon26-Mar-10 2:18 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.