****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\"\r\n\"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>

WPF 控件的更多相关文章

  1. 浅尝辄止——使用ActiveX装载WPF控件

    1 引言 使用VC编写的容器类编辑器,很多都可以挂接ActiveX控件,因为基于COM的ActiveX控件不仅封装性不错,还可以显示一些不错的界面图元. 但是随着技术不断的进步,已被抛弃的Active ...

  2. XMAL语法系列之-(2)---WPF控件继承图

    WPF控件继承图 1 FrameworkElement 1.1 Panel(面板类元素) 1.1.1 Canvas 1.1.2 DockPanel 1.1.3 Grid 1.1.4 TabPanel ...

  3. 通过WinForm控件创建的WPF控件无法输入的问题

    今天把写的一个WPF程序发布到别的机器上执行,发现一个比较奇怪的问题:在那个机器上用英文输入法无法输入数字,非要切换到中文输入法才行:但在我的机器上却是好好的. 最开始以为是输入法的问题,弄了好一阵子 ...

  4. WPF控件--利用Winform库中的NotifyIcon实现托盘小程序

    WPF控件--NotifyIcon   运行界面如下所示:            图1                                             图2 代码很少,如下所示 ...

  5. (转)WPF控件开源资源

    (转)WPF控件开源资源 Textbox Drag/Drop in WPFhttp://www.codeproject.com/Articles/42696/Textbox-Drag-Drop-in- ...

  6. WPF控件模板

    引言:在进行WPF项目开发过程中,由于项目的需要,经常要对某个控件进行特殊的设定,其中就牵涉到模板的相关方面的内容.本文也是在自己进行项目开发过程中遇到控件模板设定时集中搜集资料后整理出来的,以供在以 ...

  7. 关于WinForm引用WPF窗体---在Winform窗体中使用WPF控件

    项目中有个界面展示用WPF实现起来比较简单,并且能提供更酷炫的效果,但是在WinForm中使用WPF窗体出现了问题,在网上找了一下有些人说Winform不能引用WPF的窗体,我就很纳闷,Win32都能 ...

  8. 我的WPF控件库——KAN.WPF.XCtrl(141105)

    自己开发的WPF控件库,只是初版,有扩展的Button,TextBox,Window.详细参见前几篇博文. WPF自定义控件(一)——Button:http://www.cnblogs.com/Qin ...

  9. Dev的WPF控件与VS2012不兼容问题

    在只有vs2010环境下Dev的wpf可以在视图模式下显示,但是安装vs2012后无法打开界面的视图模式,报错:无法创建控件实例! 发现是Dev的wpf控件与.net framework 4.5不兼容 ...

  10. 解决 CefSharp WPF控件不能使用输入法输入中文的问题(代码已提交到 github)

    首先,本文所有 代码已经提交到github,需要的可以直接从github获取:https://github.com/starts2000/CefSharp,希望可以帮助到有需要的朋友们. CEF 简介 ...

随机推荐

  1. Gaussian Discriminant Analysis

    如果在我们的分类问题中,输入特征$x$是连续型随机变量,高斯判别模型(Gaussian Discriminant Analysis,GDA)就可以派上用场了. 以二分类问题为例进行说明,模型建立如下: ...

  2. 类 ArrayBlockingQueue<E>(一个由数组支持的有界阻塞队列。)

    类型参数: E - 在此 collection 中保持的元素类型 所有已实现的接口: Serializable, Iterable<E>, Collection<E>, Blo ...

  3. Google(谷歌)中国工程研究院 工程师 方坤 对学生朋友的一些建议

    对学生朋友的一点建议 发表者:Google(谷歌)中国工程研究院工程师 方坤 自去年春天加入谷歌,我曾多次随公司校园招聘团队一起走访各地院校,帮助公司发掘人才 .利用这样的出差机会到处走走看看,饱览祖 ...

  4. [转帖]2010.10.7google北大笔试题回忆

    1.1关于IP协议那个正确 A IP是TCP上层协议B IP协议是应用层协议C由于两个属于同一层协议,他们之间可以直接通信DIP协议不提供可靠的通信 1.2 关于内存正确的是 A内存的存取速度不能低于 ...

  5. 如何使用MVP模式搭建我们的Android应用?

    听到很多人在讨论MVVM,我自己早些时候也写过一篇介绍MVVM的文章(玩转Android之MVVM开发模式实战,炫酷的DataBinding!),实际上,在Android开发领域中,除了MVVM之外, ...

  6. 三个案例带你看懂LayoutInflater中inflate方法两个参数和三个参数的区别

    关于inflate参数问题,我想很多人多多少少都了解一点,网上也有很多关于这方面介绍的文章,但是枯燥的理论或者翻译让很多小伙伴看完之后还是一脸懵逼,so,我今天想通过三个案例来让小伙伴彻底的搞清楚这个 ...

  7. 使用Mou 编写Markdown编辑器博客

    Mou Overview Mou, the missing Markdown editor for web developers. Syntax Strong and Emphasize strong ...

  8. sscanf、strsep

    #include <stdio.h> #include <string.h> int main() { char token[] ="abdzxbcdefgh&quo ...

  9. Orchard 学习-安装Orchard

    前段时间使用一个ABP的框架进行了一个简单CMS开发.但感觉自己开发CMS不够灵活和通用,所以还是学习一下Orchard.学习的第一步,阅读官方的文档.由于是英文,所以我对其进行了翻译和记录,方便自己 ...

  10. 你所不知道的Html5那些事(一)

    文章简介:       关于html5相信大家早已经耳熟能详,但是他真正的意义在具体的开发中会有什么作用呢?相对于html,他又有怎样的新的定义与新理念在里面呢?为什么一些专家认为html5完全完成后 ...