• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            隨筆 - 55  文章 - 15  trackbacks - 0
            <2012年3月>
            26272829123
            45678910
            11121314151617
            18192021222324
            25262728293031
            1234567

            常用鏈接

            留言簿

            隨筆分類

            隨筆檔案

            搜索

            •  

            最新評論

            閱讀排行榜

            評論排行榜

                  
                  GridView這個東西可以接受一個集合(一個組Group),也可以一個包含集合的集合(多個Group)。ListView是一樣的道理。GridView有諸多的屬性,有的是關(guān)于Item的,包括Item的DataTemplate,即一個項中的數(shù)據(jù)如何排列,有的是多個Items的,包括ItemsPanel,即多個Item怎么在一個Panel中配列,有的是多個Group的,Group怎么排列,等等,我只將我遇到的問題,接觸到的問題闡述一下,其他的東西慢慢研究。
                  老套路,先上個圖吧。自己總結(jié)的各個屬性都代表了什么意思,設(shè)置哪一塊的。
                 
            這里是講述了一個GridView中有兩個Group的情況,每個Group中又有三個Items。
            另外,因為之前我們一直在搗鼓不同的DataTemplate,所以這里的一個Group里面有兩個DataTemplate,左邊的大的占單獨一列,其他兩個占一列。這里需要注意一下:

            設(shè)置規(guī)律:
                   如果在GroupStyle.Panel里面設(shè)置了ItemHeight  ItemWidth,并且設(shè)置了MaxColumOrRow的話,會自動計算,比如設(shè)置了100,200,5的話,那么現(xiàn)在算出來,這個Group的寬是1000,高是500,如果同時在GroupStyle.Container里面設(shè)置的<Setter Property="Width" value="1000"/> <Setter Property="Heigh" Value="500"/>的話,那么剛合適。
                   如果Container里面設(shè)置的是width=800, height=400的話,將會有一部分不會顯示.
                   如果你在Container里面沒有設(shè)置Width和height的話,那么,如果豎著裝不下的話,它會查看橫著能不能裝下,如果可以就橫著裝,如果不行,一部分不顯示。

            以下部分是在之前練習(xí)GridView分組的時候
            GroupStyle: Describes how to display the grouped items in a collection. If a gridview have two groups, this groupstyle is purposed to display how these two gropu display in gridview. It has some properties need to be setted in XAML file.

            ContainerStyle: Gets or sets style that is applied to the GroupItem genarated or each item. Means set each groups border, margin, or background e.t.
            HeaderTemplate: Gets or sets the template that is used to display the group header.
            HidesIfEmpty : indicates whether items corresponding to empty groups should be display.
            Panel: a template that creates the panel used to lay out the items.
            It looks like similar with ItemsPanel, because the definition is:
            property ItemsPanelTemplate^ Panel{
                ItemsPanelTemplate^ get();
                void set(ItemsPanelTemplate^ value);
            }
            But even this, they're different.
            I'v try modify <GroupStyle.Panel><ItemsPanelTemplate><VeriableGrid ...></..></..>. It didn't affect the items layout in a Group.
            Other wise, If you modify ItemsPanel, a property of GridView, you can obviously notify the difference. 
            So my suggestion is if you want change layout of items, just use ItemsPanel="{StaticResource someTemplate}".

            if you set a Itemspanel and then you also set a  GroupStyle.Panel, you will got a wrong layout. Seggestion is set GoupStyle and don't set ItemsPanel


            <local:VariableSizedWrapGridView.ItemContainerStyle>
                            <Style TargetType="GridViewItem">
                                <Setter Property="Background" Value="Red"/>
                                <Setter Property="BorderBrush" Value="Green"/>
                                <Setter Property="BorderThickness" Value="5"/>
                                <Setter Property="Margin" Value="60"/>
                                <Setter Property="Foreground" Value="Black"/>
                                <Setter Property="Name" Value="Hello"/>
                            </Style>
                        </local:VariableSizedWrapGridView.ItemContainerStyle>


            今天暫且到這里,明天再把這章好好整理一下。實在不想弄了。下一章結(jié)合著如何實現(xiàn)GridView的分組分析一下GridView。
                  
            posted on 2012-10-18 21:29 Dino-Tech 閱讀(985) 評論(0)  編輯 收藏 引用

            只有注冊用戶登錄后才能發(fā)表評論。
            網(wǎng)站導(dǎo)航: 博客園   IT新聞   BlogJava   博問   Chat2DB   管理


            久久久黄片| 亚洲精品乱码久久久久久久久久久久| 久久99热精品| 久久久无码精品午夜| 久久久久久久波多野结衣高潮 | 久久被窝电影亚洲爽爽爽| 青青草国产成人久久91网| 久久亚洲电影| 久久精品无码一区二区无码| 精品久久久无码中文字幕天天| 久久九九兔免费精品6| 国産精品久久久久久久| 麻豆成人久久精品二区三区免费 | AA级片免费看视频久久| 狠狠色丁香婷婷综合久久来来去| 国产A级毛片久久久精品毛片| 国产成人香蕉久久久久| 久久综合精品国产二区无码| 精品久久人人妻人人做精品| 久久久91精品国产一区二区三区| 久久久久国产精品嫩草影院| 欧美午夜A∨大片久久 | 国产激情久久久久影院小草| 精品久久无码中文字幕| 欧美大战日韩91综合一区婷婷久久青草 | 成人精品一区二区久久久| 成人久久免费网站| 亚洲国产成人精品无码久久久久久综合| 精品久久人妻av中文字幕| 久久久久久久人妻无码中文字幕爆| 伊人久久国产免费观看视频| 久久精品无码一区二区三区免费 | 狠狠色丁香婷婷久久综合| 久久久久综合中文字幕| 精品无码久久久久久久动漫| 伊人久久综在合线亚洲2019 | 久久丫忘忧草产品| 亚洲AV日韩精品久久久久久 | 999久久久免费国产精品播放| 国产精品久久久久影院色| 久久精品国产亚洲AV香蕉|