zoukankan      html  css  js  c++  java
  • WPF DataTemplate 应用之一(初级Window.Resources应用)

    效果图:

    <Window.Resources>

            <DataTemplate x:Key="myTaskTemplate">

                <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">

                    <TextBlock Text="c# " Width="80" Background="Red"/>

                    <TextBlock Text="Java " Width="80" />

                    <TextBlock Text="VB " Width="80" />

                    <TextBlock Text="C++ " Width="80" />

                    <s:SurfaceButton Background="Red" Click="Button_Click">

                        OK

                    </s:SurfaceButton>

                </StackPanel>

            </DataTemplate>

        </Window.Resources>

        <Grid>

            <ListBox Width="400" Margin="10" Background="LightBlue"     

             ItemTemplate="{StaticResource myTaskTemplate}" >

                <StackPanel>

                   

                </StackPanel>

            </ListBox>

        </Grid>

    </s:SurfaceWindow>

  • 相关阅读:
    Java学习:Scanner类
    Java学习:Object类
    js 方法
    ToDictionary
    goto
    删除多列同时重复数据
    linq中使用case when
    sql 学习笔记
    VS2012发布网站详细步骤
    由于权限不足而无法读取配置文件出现的HTTP 500.19解决办法
  • 原文地址:https://www.cnblogs.com/DeepBlues/p/2915714.html
Copyright © 2011-2022 走看看