12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- <Window x:Class="Aitex.Core.UI.Dialog.TerminalDialog"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:style="clr-namespace:MECF.Framework.UI.Core.Style"
- BorderThickness="0"
- Title="Terminal Message" Height="370" Width="500" ShowInTaskbar="True" Topmost="True"
- WindowStartupLocation="CenterOwner" WindowStyle="SingleBorderWindow" ResizeMode="NoResize" FontFamily="Arial,SimSun"
- Background="{StaticResource viewBackgroundColor}">
- <Window.Resources>
- <Style TargetType="{x:Type ListViewItem}">
- <Style.Triggers>
- <DataTrigger Binding="{Binding MessageSource}" Value="E">
- <Setter Property="Foreground" Value="Blue" />
- <Setter Property="FontSize" Value="Blue" />
- </DataTrigger>
- <DataTrigger Binding="{Binding HasErrors}" Value="False">
- <Setter Property="Background" Value="Green" />
- </DataTrigger>
- </Style.Triggers>
- </Style>
- </Window.Resources>
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="250" />
- <RowDefinition Height="70" />
- <RowDefinition />
- </Grid.RowDefinitions>
- <StackPanel Grid.Row="0" Orientation="Horizontal">
- <ItemsControl Width="380" Margin="10" Background="#FFDCF7F6" ItemsSource="{Binding TerminalMessageList}" Name="itemsControl">
- <ItemsControl.Template>
- <ControlTemplate TargetType="{x:Type ItemsControl}">
- <Border CornerRadius="5">
- <ScrollViewer VerticalScrollBarVisibility="Auto" >
- <ItemsPresenter />
- </ScrollViewer>
- </Border>
- </ControlTemplate>
- </ItemsControl.Template>
- <ItemsControl.ItemsPanel>
- <ItemsPanelTemplate>
- <StackPanel Orientation="Vertical" Name="wp" Margin="0" Background="#FFDCF7F6"/>
- </ItemsPanelTemplate>
- </ItemsControl.ItemsPanel>
- <ItemsControl.ItemTemplate>
- <DataTemplate>
- <StackPanel >
- <TextBox Text="{Binding Title, Mode=OneWay }" Margin="0" IsReadOnly="True" IsEnabled="False" TextWrapping="Wrap" FontSize="12"/>
- <TextBox Text="{Binding Content, Mode=OneWay }" Margin="0" IsReadOnly="True" IsEnabled="False" TextWrapping="Wrap" FontSize="12"/>
- </StackPanel>
- </DataTemplate>
- </ItemsControl.ItemTemplate>
- </ItemsControl>
- <Button Width="80" Height="50" Margin="0" Content="Clear" VerticalAlignment="Top" HorizontalAlignment="Left" Command="{Binding TerminalClearCommand}"></Button>
- </StackPanel>
- <StackPanel Grid.Row="1" Orientation="Horizontal">
- <TextBox Text="{Binding TerminalMessageSetPoint}" Width="380" Height="60" Margin="10,0,10,0" AcceptsReturn="True"></TextBox>
- <Button Width="80" Height="50" Margin="0" Content="Send" VerticalAlignment="Center" HorizontalAlignment="Left" Command="{Binding TerminalSendCommand}"></Button>
- </StackPanel>
-
-
- </Grid>
- </Window>
|