Window1.xaml 1.95 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
<Window x:Class="WpfApplication1.Window1"
        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:local="clr-namespace:WpfApplication1"
        mc:Ignorable="d"
        Title="Window1" Height="450" Width="800">
    <Grid>
        
        <StackPanel Orientation="Vertical" Margin="10" >
            <StackPanel.Resources>
                <Style TargetType="TextBlock">
                    <Setter Property="FontSize" Value="20"/>
                </Style>
            </StackPanel.Resources>
            <StackPanel Orientation="Horizontal">
                <TextBlock >
                    <Run Text="Elapsed="/>
                    <Run Text="{Binding Elapsed}"/>
                </TextBlock>
            </StackPanel>
            <StackPanel Orientation="Horizontal">
                <TextBlock >
                    <Run Text="风机="/>
                    <Run Text="{Binding IsFanOn}"/>
                </TextBlock>
            </StackPanel>
            <StackPanel Orientation="Horizontal">
                <TextBlock >
                    <Run Text="电流="/>
                    <Run Text="{Binding IsPowerOn}"/>
                </TextBlock>
            </StackPanel>
            <StackPanel Orientation="Horizontal">
                <TextBlock >
                    <Run Text="D800=["/>
                    <Run Text="{Binding D800[0],StringFormat={}{0:D3}}"/>
                    <Run Text="."/>
                    <Run Text="{Binding D800[1],StringFormat={}{0:D3}}"/>
                    <Run Text="]"/>
                </TextBlock>
            </StackPanel>
            <Button x:Name="button" Content="Button" HorizontalAlignment="Left" Margin="3" VerticalAlignment="Top" Width="75"/>
        </StackPanel>
    </Grid>
</Window>