|
|
@ -12,18 +12,18 @@ |
|
|
|
</Window.DataContext> |
|
|
|
</Window.DataContext> |
|
|
|
|
|
|
|
|
|
|
|
<StackPanel> |
|
|
|
<StackPanel> |
|
|
|
<Button Content="Add TextBox" Command="{Binding TestCommand}"/> |
|
|
|
<Button x:Name="btnMain" Content="Add TextBox" Command="{Binding TestCommand}"/> |
|
|
|
<ItemsControl x:Name="itcMain" ItemsSource="{Binding ButtonCollection}"> |
|
|
|
<ItemsControl x:Name="ctrMain" ItemsSource="{Binding ButtonCollection}"> |
|
|
|
<ItemsControl.ItemTemplate> |
|
|
|
<ItemsControl.ItemTemplate> |
|
|
|
<DataTemplate> |
|
|
|
<DataTemplate> |
|
|
|
<Button x:Name="btnItem" |
|
|
|
<Button x:Name="btnSub" |
|
|
|
Content="{Binding Name, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" |
|
|
|
Content="{Binding Name, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" |
|
|
|
FontWeight="Bold" |
|
|
|
FontWeight="Bold" |
|
|
|
FontSize="18" |
|
|
|
FontSize="18" |
|
|
|
Margin="10" |
|
|
|
Margin="10" |
|
|
|
Width="100" |
|
|
|
Width="100" |
|
|
|
Background="{Binding SelectedColor, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" |
|
|
|
Background="{Binding SelectedColor, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" |
|
|
|
Command="{Binding ElementName=itcMain, Path=SubCommandMethod}" |
|
|
|
Command="{Binding ElementName=ctrMain, Path=DataContext.SubButtonCommand}" |
|
|
|
CommandParameter="{Binding Name}"/> |
|
|
|
CommandParameter="{Binding Name}"/> |
|
|
|
</DataTemplate> |
|
|
|
</DataTemplate> |
|
|
|
</ItemsControl.ItemTemplate> |
|
|
|
</ItemsControl.ItemTemplate> |
|
|
|