zoukankan      html  css  js  c++  java
  • WPF 控件

    ****ScrollViewer****

    前台:

    <ScrollViewer  HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" HorizontalAlignment="Left" Margin="96,66,0,0" Name="scrollViewer1" VerticalAlignment="Top" Width="218"  Height="115">
                <TextBlock  HorizontalAlignment="Left" Margin="96,2,0,0" Name="textBlock1" VerticalAlignment="Top" />
            </ScrollViewer>

    后台:

     textBlock1.Text = "dfsdfsdfsdfsdfsdfsdfsdfdfsdfsdf" "sdf“

    ****ListView****

    前台:

    <ListView Height="100" HorizontalAlignment="Left" Margin="12,12,0,0" Name="listView1" VerticalAlignment="Top" Width="300" >
                <ListView.View>
                    <GridView x:Name="gridView1">
                        <GridViewColumn Header="商品名称" DisplayMemberBinding="{Binding Path=GoodsName}"></GridViewColumn>
                        <GridViewColumn Header="内容" DisplayMemberBinding="{Binding Path=GoodsIntroduce}"></GridViewColumn>
                    </GridView>
                </ListView.View>
            </ListView>

    后台:

     public MainWindow()
            {
                InitializeComponent();
                string sql = "server=.;database=db_Tome1;uid=sa;pwd=123456";//连接字符串
                SqlConnection sqlcon = new SqlConnection(sql);//
                string sqlstr = "select GoodsName,GoodsIntroduce from tb_GoodsInfo";
                SqlDataAdapter da = new SqlDataAdapter(sqlstr, sqlcon);
                DataSet ds = new DataSet();
                ds.Clear();
                DataTable table1 = new DataTable();
                sqlcon.Open();
                da.Fill(ds, "table1");
                listView1.ItemsSource = ds.Tables[0].DefaultView;
                sqlcon.Dispose();
                sqlcon.Close();
               
            }

    ****Expander****

    <StackPanel Margin="20,20" Width="100" Height="460" HorizontalAlignment="Left"  
                    VerticalAlignment="Top">
                <Expander VerticalAlignment="Stretch" ExpandDirection="Down" HorizontalContentAlignment="Left" SnapsToDevicePixels="True">
                    <Expander.Header>
                        <TextBlock Text="用户管理" FontSize="14" FontWeight="Bold" />
                    </Expander.Header>
                    <Expander.Content>
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="auto"/>
                                <RowDefinition Height="auto"/>
                            </Grid.RowDefinitions>
                            <RadioButton Grid.Row="0">会员管理</RadioButton>
                            <RadioButton Grid.Row="1">角色管理</RadioButton>
                        </Grid>
                    </Expander.Content>
                </Expander>
                <Expander VerticalAlignment="Stretch" ExpandDirection="Down" HorizontalContentAlignment="Left" SnapsToDevicePixels="True">
                    <Expander.Header>
                        <TextBlock Text="文档管理" FontSize="14" FontWeight="Bold" />
                    </Expander.Header>
                    <Expander.Content>
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="auto"/>
                                <RowDefinition Height="auto"/>
                                <RowDefinition Height="auto"/>
                            </Grid.RowDefinitions>
                            <RadioButton Grid.Row="0">部门资料</RadioButton>
                            <RadioButton Grid.Row="1">员工资料</RadioButton>
                            <RadioButton Grid.Row="2">职位资料</RadioButton>
                        </Grid>
                    </Expander.Content>
                </Expander>
                <Expander VerticalAlignment="Stretch" ExpandDirection="Down" HorizontalContentAlignment="Left" SnapsToDevicePixels="True">
                    <Expander.Header>
                        <TextBlock Text="采购管理" FontSize="14" FontWeight="Bold" />
                    </Expander.Header>
                    <Expander.Content>
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="auto"/>
                                <RowDefinition Height="auto"/>
                                <RowDefinition Height="auto"/>
                                <RowDefinition Height="auto"/>
                                <RowDefinition Height="auto"/>
                            </Grid.RowDefinitions>
                            <RadioButton Grid.Row="0">采购计划</RadioButton>
                            <RadioButton Grid.Row="1">需求分析</RadioButton>
                            <RadioButton Grid.Row="2">采购单</RadioButton>
                            <RadioButton Grid.Row="3">入库验收</RadioButton>
                            <RadioButton Grid.Row="4">入库退回</RadioButton>
                        </Grid>
                    </Expander.Content>
                </Expander>
                <Expander VerticalAlignment="Stretch" ExpandDirection="Down" HorizontalContentAlignment="Left" SnapsToDevicePixels="True">
                    <Expander.Header>
                        <TextBlock Text="供应商" FontSize="14" FontWeight="Bold" />
                    </Expander.Header>
                    <Expander.Content>
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="auto"/>
                                <RowDefinition Height="auto"/>
                                <RowDefinition Height="auto"/>
                            </Grid.RowDefinitions>
                            <RadioButton Grid.Row="0">基本资料</RadioButton>
                            <RadioButton Grid.Row="1">往来单位</RadioButton>
                            <RadioButton Grid.Row="2">上游供应商</RadioButton>
                        </Grid>
                    </Expander.Content>
                </Expander>
            </StackPanel>

  • 相关阅读:
    《完结篇》论文笔记
    《QD超市管理系统的设计与实现》论文笔记(十九)
    《基于JSP的超市管理系统设计与实现》论文笔记(十八)
    《B/S模式下ADO.NET数据库访问技术的设计及应用》论文笔记(十七)
    《基于B/S中小型超市进销存管理系统的研究与设计》论文笔记(十六)
    《基于Web的Git可视化设计与实现》论文笔记(十五)
    《小型超市商品管理系统的设计与实现》论文笔记(十四)
    《超市商品管理系统的设计与实现》论文笔记(十三)
    《中小连锁超市管理系统的设计与实现》论文笔记(十二)
    laravels安装horizon和Supervisor
  • 原文地址:https://www.cnblogs.com/zhaoliang831214/p/3547722.html
Copyright © 2011-2022 走看看