41 lines
1.6 KiB
XML
41 lines
1.6 KiB
XML
<Window
|
|
x:Class="WpfApp1.MainWindow"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:wpfApp1="clr-namespace:WpfApp1"
|
|
Title="MainWindow"
|
|
Width="800"
|
|
Height="450"
|
|
FontSize="24"
|
|
mc:Ignorable="d">
|
|
<Window.DataContext>
|
|
<wpfApp1:MainWindowViewModel />
|
|
</Window.DataContext>
|
|
<Grid>
|
|
<StackPanel HorizontalAlignment="Center" Orientation="Vertical">
|
|
<StackPanel.Style>
|
|
<Style TargetType="StackPanel">
|
|
<Setter Property="IsEnabled" Value="False" />
|
|
<Style.Triggers>
|
|
<DataTrigger Binding="{Binding Dialogs.Count}" Value="0">
|
|
<Setter Property="IsEnabled" Value="True" />
|
|
</DataTrigger>
|
|
</Style.Triggers>
|
|
</Style>
|
|
</StackPanel.Style>
|
|
<TextBlock Text="Hello, World" />
|
|
<Button Command="{Binding TestMultiStreamingCommand}" Content="This is a button" />
|
|
<Button Command="{Binding OpenDialogCommand}" Content="Open dialog" />
|
|
</StackPanel>
|
|
<ItemsControl ItemsSource="{Binding Dialogs}">
|
|
<ItemsControl.ItemsPanel>
|
|
<ItemsPanelTemplate>
|
|
<Grid />
|
|
</ItemsPanelTemplate>
|
|
</ItemsControl.ItemsPanel>
|
|
</ItemsControl>
|
|
</Grid>
|
|
</Window>
|