拓展框Expander

                <Expander Name="a" Header="" Height="146" Width="225">
                    
                    <WrapPanel Height="363" Margin="0,0,-2,0">

                        <TextBlock Text="运行代码:" Width="115" HorizontalAlignment="Left"/>
                        <TextBox Width="110" HorizontalAlignment="Right"/>
                        <TextBlock Text="报警代码:" Width="115" HorizontalAlignment="Left"/>
                        <TextBox Width="110" HorizontalAlignment="Right" />
                        <TextBlock Text="检测样品编号:" Width="115" HorizontalAlignment="Left"/>
                        <TextBox Width="110" HorizontalAlignment="Right"/>
                        <TextBlock Text="检测样品名称:" Width="115" HorizontalAlignment="Left"/>
                        <TextBox Width="110" HorizontalAlignment="Right" ></TextBox>
                        <TextBlock Text="测量开始时间(s):" Width="115" HorizontalAlignment="Left"/>
                        <TextBox Width="110" HorizontalAlignment="Right" ></TextBox>
                        <TextBlock Text="预计结束时间(s):" Width="115" HorizontalAlignment="Left"/>
                        <TextBox Width="110" HorizontalAlignment="Right" ></TextBox>
                        <TextBlock Text="测量进度(%):" Width="115" HorizontalAlignment="Left"/>
                        <TextBox Width="110" HorizontalAlignment="Right" ></TextBox>


                    </WrapPanel>
                </Expander>

GroupBox

        <GroupBox Margin="0,29,0,118" x:Name="b">
            <GroupBox.Header>
                <Label>测量</Label>
            </GroupBox.Header>
            <WrapPanel Height="331" Margin="0,0,-2,0" RenderTransformOrigin="0.496,0.199">
                <TextBlock Text="实时间(s):" Width="115" HorizontalAlignment="Left"/>
                <TextBox Width="110" HorizontalAlignment="Right"/>
            </WrapPanel>
        </GroupBox>

TabControl

<TabControl>
                        <TabItem Header="待检测">
                            <Grid Background="#FFE5E5E5">
                                <Button Content="+" HorizontalAlignment="Center" Margin="0,10,0,0" VerticalAlignment="Top" Width="344"/>
                            </Grid>

                        </TabItem>
                        <TabItem Header="正在检测">
                            <Grid Background="#FFE5E5E5"/>
                        </TabItem>

                        <TabItem Header="已检测">
                            <Grid Background="#FFE5E5E5"/>
                        </TabItem>
                        <TabItem Header="历史检测">
                            <Grid Background="#FFE5E5E5">
                                <Button Content="+" HorizontalAlignment="Center" Margin="0,10,0,0" VerticalAlignment="Top" Width="344"/>
                            </Grid>


                        </TabItem>

                    </TabControl>

滚轴

    <ScrollViewer HorizontalScrollBarVisibility="Auto" RenderTransformOrigin="0.487,0.55" VerticalScrollBarVisibility="Visible"  Width="248" Height="392" >
        <Grid Height="650" Width="248" Background="White">

        </Grid>
    </ScrollViewer>

按钮/输出款等禁用

黄色灯泡点进去,IsEnabled不选

或者直接

 this.start.IsEnabled=false;

下拉框ComboBox

                                    <ComboBox  HorizontalAlignment="Left" Margin="106,20,3,0" VerticalAlignment="Top" Height="20" Width="107" SelectedIndex="0">
                                        <ComboBoxItem Content="样品1"/>
                                        <ComboBoxItem Content="样品2"/>
                                        <ComboBoxItem Content="样品3"/>
                                        <ComboBoxItem Content="样品4"/>
                                        <ComboBoxItem Content="样品5"/>
                                        <ComboBoxItem Content="样品6"/>
                                    </ComboBox>

---------

                    <DockPanel DockPanel.Dock="Top" Width="85" Height="30" Margin="90,20,0,0">
                        <DockPanel Width="20" Height="26" DockPanel.Dock="Right">
                            <DockPanel DockPanel.Dock="Top">
                                <Button x:Name="btn_ClickUp" Height="13" Click="Btn_ClickUp_Click">
                                    <Image  Source="./Images/on.png" Height="15" Width="20"/>
                                </Button>
                            </DockPanel>
                            <DockPanel DockPanel.Dock="Bottom">
                                <Button x:Name="btn_ClickDown" Height="13" Width="20" Click="Btn_ClickDown_Click">
                                    <Image  Source="/Images/under.png" Height="15" Width="20"/>
                                </Button>
                            </DockPanel>
                            <DockPanel></DockPanel>
                        </DockPanel>
                        <DockPanel />
                        <DockPanel>
                            <TextBox x:Name="txt_NamberChange"  Height="26" Width="85" Text="1440" VerticalContentAlignment="Center" >
                            </TextBox>
                        </DockPanel>
                        <DockPanel  DockPanel.Dock="Left"/>
                    </DockPanel>
        private void Btn_ClickUp_Click(object sender, RoutedEventArgs e)
        {

            this.txt_NamberChange.Text = (double.Parse(this.txt_NamberChange.Text) + 1).ToString("0");
        }

        private void Btn_ClickDown_Click(object sender, RoutedEventArgs e)
        {
            this.txt_NamberChange.Text = (double.Parse(this.txt_NamberChange.Text) - 1).ToString("0");
        }

DatePicker

<DatePicker HorizontalAlignment="Left" Margin="167,120,0,0"  VerticalAlignment="Top" Width="213" FontSize="16" RenderTransformOrigin="0.496,5.58"/>

logo

文件右键属性

添加logo,要ico格式的,可以在线转化

 talex(优先使用这个)

xmlns:talex="http://schemas.talex-soft.com/2010/xaml/presentation"

 

 

                                    <talex:NumericUpDown Name="XMoveSpeed"  Grid.Column="1" >
                                        <talex:NumericUpDown.Value>24</talex:NumericUpDown.Value>
                                        <talex:NumericUpDown.Margin>5</talex:NumericUpDown.Margin>
                                        <talex:NumericUpDown.Maximum>48000</talex:NumericUpDown.Maximum>
                                        <talex:NumericUpDown.VerticalAlignment>Center</talex:NumericUpDown.VerticalAlignment>
                                    </talex:NumericUpDown>

引用-->右键(程序包)->浏览->搜索(TAlex.WPF.Controls)

 

posted on 2023-08-23 10:18  阿霖找BUG  阅读(26)  评论(0编辑  收藏  举报