• <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年10月>
            30123456
            78910111213
            14151617181920
            21222324252627
            28293031123
            45678910

            常用鏈接

            留言簿

            隨筆分類

            隨筆檔案

            搜索

            •  

            最新評論

            閱讀排行榜

            評論排行榜

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

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

            以下部分是在之前練習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>


            今天暫且到這里,明天再把這章好好整理一下。實在不想弄了。下一章結合著如何實現GridView的分組分析一下GridView。
                  
            posted on 2012-10-18 21:29 Dino-Tech 閱讀(977) 評論(0)  編輯 收藏 引用
            国产情侣久久久久aⅴ免费| 三级三级久久三级久久 | 777午夜精品久久av蜜臀| 热久久最新网站获取| 久久66热人妻偷产精品9| 久久电影网一区| 久久只有这精品99| 国产精品美女久久久久网| 久久亚洲色一区二区三区| 国产激情久久久久久熟女老人| 男女久久久国产一区二区三区| 99久久99久久精品国产片| 久久久亚洲欧洲日产国码是AV | 国产美女亚洲精品久久久综合| 国产精品久久久久久影院| 青青青青久久精品国产h久久精品五福影院1421 | 久久久久久精品免费免费自慰| 亚洲一区二区三区日本久久九| 2021国内久久精品| 热久久国产欧美一区二区精品| 久久久久中文字幕| 午夜天堂精品久久久久| 久久久久婷婷| 国产高潮久久免费观看| 99久久无色码中文字幕| 久久青青草原亚洲av无码app| 四虎影视久久久免费观看| 亚洲国产精品一区二区久久| 激情伊人五月天久久综合| 国产激情久久久久久熟女老人| 国产精品久久久久久久久软件 | 伊人久久大香线蕉亚洲五月天| 一极黄色视频久久网站| 久久香蕉国产线看观看猫咪?v| 久久最新精品国产| 久久综合综合久久97色| 色噜噜狠狠先锋影音久久| 久久亚洲高清观看| 国内精品久久久久国产盗摄| 成人精品一区二区久久久| 久久综合综合久久97色|