• <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
            <2025年6月>
            25262728293031
            1234567
            891011121314
            15161718192021
            22232425262728
            293012345

            常用鏈接

            留言簿

            隨筆分類

            隨筆檔案

            搜索

            •  

            最新評(píng)論

            閱讀排行榜

            評(píng)論排行榜

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

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

            以下部分是在之前練習(xí)GridView分組的時(shí)候
            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>


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

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


            国产2021久久精品| 欧美粉嫩小泬久久久久久久| 久久频这里精品99香蕉久| 国内精品免费久久影院| 久久99精品国产麻豆不卡| 久久久久国色AV免费观看| 99久久做夜夜爱天天做精品| 久久无码中文字幕东京热| 亚洲AV日韩AV天堂久久| 国产精品久久影院| 久久久久婷婷| 亚洲va中文字幕无码久久不卡 | 情人伊人久久综合亚洲| 日本三级久久网| 久久久这里只有精品加勒比| 久久综合给合久久狠狠狠97色 | 99久久99这里只有免费费精品| 久久91亚洲人成电影网站| 国产精品gz久久久| 久久国产劲爆AV内射—百度| 久久国产精品一区二区| 久久久人妻精品无码一区| 亚洲国产精品18久久久久久| 久久激情亚洲精品无码?V| 日产精品久久久久久久性色| 久久人人爽人人爽人人片AV麻豆 | 国产亚洲精品自在久久| 久久精品一区二区影院| 精品久久久久久久久午夜福利| 国内精品久久久久久中文字幕| 久久精品人人做人人爽97| 一级A毛片免费观看久久精品| 久久人妻少妇嫩草AV无码专区| 欧美亚洲另类久久综合婷婷| 四虎国产精品免费久久5151| 久久超乳爆乳中文字幕| 国产亚洲精品久久久久秋霞| 久久天天躁狠狠躁夜夜2020老熟妇 | 久久精品午夜一区二区福利| 亚洲&#228;v永久无码精品天堂久久 | 午夜久久久久久禁播电影|