Click here to Skip to main content
16,006,531 members
Home / Discussions / WPF
   

WPF

 
AnswerRe: could any one help in how to create seprate dlls in wpf project? Pin
Jammer19-Oct-08 2:39
Jammer19-Oct-08 2:39 
AnswerRe: could any one help in how to create seprate dlls in wpf project? Pin
User 27100919-Oct-08 4:58
User 27100919-Oct-08 4:58 
QuestionXAML Power Toys 3.4 Released Pin
User 27100918-Oct-08 20:25
User 27100918-Oct-08 20:25 
AnswerRe: XAML Power Toys 3.4 Released Pin
Michael Sync18-Oct-08 21:39
Michael Sync18-Oct-08 21:39 
GeneralRe: XAML Power Toys 3.4 Released Pin
User 27100919-Oct-08 4:59
User 27100919-Oct-08 4:59 
QuestionHow to bind TreeView with nested object without using HierarchicalDatatemplate Pin
Michael Sync18-Oct-08 5:12
Michael Sync18-Oct-08 5:12 
AnswerRe: How to bind TreeView with nested object without using HierarchicalDatatemplate Pin
User 27100918-Oct-08 20:11
User 27100918-Oct-08 20:11 
GeneralRe: How to bind TreeView with nested object without using HierarchicalDatatemplate Pin
Michael Sync18-Oct-08 21:37
Michael Sync18-Oct-08 21:37 
GeneralRe: How to bind TreeView with nested object without using HierarchicalDatatemplate Pin
User 27100919-Oct-08 4:55
User 27100919-Oct-08 4:55 
QuestionQuick Question Pin
MrMcIntyre18-Oct-08 1:52
MrMcIntyre18-Oct-08 1:52 
AnswerRe: Quick Question Pin
User 27100918-Oct-08 20:12
User 27100918-Oct-08 20:12 
Questionhelp in xps? Pin
Dotnetkanna17-Oct-08 18:45
Dotnetkanna17-Oct-08 18:45 
AnswerRe: help in xps? Pin
touseef17-Oct-08 20:25
touseef17-Oct-08 20:25 
QuestionOdd WPF Problem Pin
Jammer17-Oct-08 12:57
Jammer17-Oct-08 12:57 
AnswerRe: Odd WPF Problem Pin
User 27100918-Oct-08 20:16
User 27100918-Oct-08 20:16 
GeneralRe: Odd WPF Problem Pin
Jammer19-Oct-08 3:25
Jammer19-Oct-08 3:25 
QuestionWPF ListBoxItem Question Pin
Pedram Behroozi17-Oct-08 10:58
Pedram Behroozi17-Oct-08 10:58 
AnswerRe: WPF ListBoxItem Question Pin
User 27100918-Oct-08 20:19
User 27100918-Oct-08 20:19 
GeneralRe: WPF ListBoxItem Question Pin
Pedram Behroozi19-Oct-08 0:30
Pedram Behroozi19-Oct-08 0:30 
Questionevent notification Pin
vinod.sankuthodi16-Oct-08 23:46
vinod.sankuthodi16-Oct-08 23:46 
AnswerRe: event notification Pin
User 27100918-Oct-08 20:22
User 27100918-Oct-08 20:22 
QuestionUsing Multiple User Controls Pin
jayvee102216-Oct-08 16:14
jayvee102216-Oct-08 16:14 
AnswerRe: Using Multiple User Controls Pin
Pete O'Hanlon16-Oct-08 23:07
mvePete O'Hanlon16-Oct-08 23:07 
The following XAML adds in an empty tabcontrol. The button click event is used to trigger the tab add:
<Window x:Class="SimpleWpfTabTest.Window1"
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  Title="Window1" Height="300" Width="300">
  <Grid>
  <Grid.RowDefinitions>
    <RowDefinition Height="Auto"/>
    <RowDefinition Height="20" />
  </Grid.RowDefinitions>
  <TabControl Name="myTab" Grid.Row="0">
  </TabControl>
  <Button Name="btnAddTab" Grid.Row="1" Click="btnAddTab_Click" />
  </Grid>
</Window>
Then the code for the tab add.
private void btnAddTab_Click(object sender, RoutedEventArgs e)
{
  // Create a TabItem
  TabItem child = new TabItem{Name="childTab" + myTab.Items.Count.ToString(), Header="Added"};
  // The TabItem needs a content holder - I'm using a StackPanel
  StackPanel childPanel = new StackPanel();
  child.Content = childPanel;
  // The button will be added as a child of the stack panel.
  Button myButton = new Button { Name = "hello", Content = "Woopee" };
  childPanel.Children.Add(myButton);
  // Add the TabItem to the tab
  myTab.Items.Add(child);
  // And set the focus to it.
  child.Focus();
}


Deja View - the feeling that you've seen this post before.

My blog | My articles | MoXAML PowerToys



GeneralRe: Using Multiple User Controls Pin
Jammer16-Oct-08 23:20
Jammer16-Oct-08 23:20 
GeneralRe: Using Multiple User Controls Pin
Pete O'Hanlon16-Oct-08 23:46
mvePete O'Hanlon16-Oct-08 23:46 

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.