当前位置: 首页>>代码示例>>C#>>正文


C# Controls.ListView类代码示例

本文整理汇总了C#中Windows.UI.Xaml.Controls.ListView的典型用法代码示例。如果您正苦于以下问题:C# ListView类的具体用法?C# ListView怎么用?C# ListView使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ListView类属于Windows.UI.Xaml.Controls命名空间,在下文中一共展示了ListView类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: UserSelect

 public UserSelect()
 {
     this.InitializeComponent();
     accountListView = listView_UserTileList;
     accountListView.SelectionChanged += Button_SelectUser_Click;
     this.Loaded += OnLoadedActions;
 }
开发者ID:RasmusTG,项目名称:Windows-universal-samples,代码行数:7,代码来源:UserSelect.xaml.cs

示例2: InitializeComponent

        public void InitializeComponent()
        {
            if (_contentLoaded)
                return;

            _contentLoaded = true;
            Application.LoadComponent(this, new System.Uri("ms-appx:///CommentPage.xaml"), Windows.UI.Xaml.Controls.Primitives.ComponentResourceLocation.Application);
 
            pageRoot = (TheBellyofAuthority.Common.LayoutAwarePage)this.FindName("pageRoot");
            commentBar = (Windows.UI.Xaml.Controls.AppBar)this.FindName("commentBar");
            DeleteButton = (Windows.UI.Xaml.Controls.Button)this.FindName("DeleteButton");
            EditButton = (Windows.UI.Xaml.Controls.Button)this.FindName("EditButton");
            commentThread = (Windows.UI.Xaml.Controls.ListView)this.FindName("commentThread");
            commentLabel = (Windows.UI.Xaml.Controls.TextBlock)this.FindName("commentLabel");
            commentBox = (Windows.UI.Xaml.Controls.TextBox)this.FindName("commentBox");
            postButton = (Windows.UI.Xaml.Controls.Button)this.FindName("postButton");
            backButton = (Windows.UI.Xaml.Controls.Button)this.FindName("backButton");
            pageTitle = (Windows.UI.Xaml.Controls.TextBlock)this.FindName("pageTitle");
            UserPanel = (Windows.UI.Xaml.Controls.StackPanel)this.FindName("UserPanel");
            progBar = (Windows.UI.Xaml.Controls.ProgressBar)this.FindName("progBar");
            LabelBox = (Windows.UI.Xaml.Controls.TextBlock)this.FindName("LabelBox");
            UserBox = (Windows.UI.Xaml.Controls.TextBlock)this.FindName("UserBox");
            ApplicationViewStates = (Windows.UI.Xaml.VisualStateGroup)this.FindName("ApplicationViewStates");
            FullScreenLandscape = (Windows.UI.Xaml.VisualState)this.FindName("FullScreenLandscape");
            Filled = (Windows.UI.Xaml.VisualState)this.FindName("Filled");
            FullScreenPortrait = (Windows.UI.Xaml.VisualState)this.FindName("FullScreenPortrait");
            Snapped = (Windows.UI.Xaml.VisualState)this.FindName("Snapped");
        }
开发者ID:abettadapur,项目名称:BellyofAuthorityMX,代码行数:28,代码来源:CommentPage.g.i.cs

示例3: deleteItem

 public static void deleteItem(ref ListView display0)
 {
     if(display0.SelectedIndex > -1)
     {
         display0.Items.RemoveAt(display0.SelectedIndex);
     }
 }
开发者ID:agangal,项目名称:EmojiTable,代码行数:7,代码来源:Library.cs

示例4: InitializeComponent

        public void InitializeComponent()
        {
            if (_contentLoaded)
                return;

            _contentLoaded = true;
            Application.LoadComponent(this, new System.Uri("ms-resource://wikipediaquerytoolxaml/Files/SplitPage.xaml"));

            CollectionViewSource = (Windows.UI.Xaml.Data.CollectionViewSource)this.FindName("CollectionViewSource");
            LayoutRoot = (Windows.UI.Xaml.Controls.Grid)this.FindName("LayoutRoot");
            OrientationStates = (Windows.UI.Xaml.VisualStateGroup)this.FindName("OrientationStates");
            Full = (Windows.UI.Xaml.VisualState)this.FindName("Full");
            Fill = (Windows.UI.Xaml.VisualState)this.FindName("Fill");
            Portrait = (Windows.UI.Xaml.VisualState)this.FindName("Portrait");
            PortraitDetail = (Windows.UI.Xaml.VisualState)this.FindName("PortraitDetail");
            Snapped = (Windows.UI.Xaml.VisualState)this.FindName("Snapped");
            SnappedDetail = (Windows.UI.Xaml.VisualState)this.FindName("SnappedDetail");
            PrimaryColumn = (Windows.UI.Xaml.Controls.ColumnDefinition)this.FindName("PrimaryColumn");
            TitlePanel = (Windows.UI.Xaml.Controls.Grid)this.FindName("TitlePanel");
            ItemListView = (Windows.UI.Xaml.Controls.ListView)this.FindName("ItemListView");
            ItemDetail = (Windows.UI.Xaml.Controls.ContentControl)this.FindName("ItemDetail");
            ItemStackPanel = (Windows.UI.Xaml.Controls.StackPanel)this.FindName("ItemStackPanel");
            BackButton = (Windows.UI.Xaml.Controls.Button)this.FindName("BackButton");
            PageTitle = (Windows.UI.Xaml.Controls.TextBlock)this.FindName("PageTitle");
        }
开发者ID:danshultz11,项目名称:NetflixBrowserXaml,代码行数:25,代码来源:SplitPage.g.i.cs

示例5: InitializeComponent

        public void InitializeComponent()
        {
            if (_contentLoaded)
                return;

            _contentLoaded = true;
            Application.LoadComponent(this, new System.Uri("ms-appx:///ArtistDetails.xaml"), Windows.UI.Xaml.Controls.Primitives.ComponentResourceLocation.Application);
 
            pageRoot = (Mu_genotype1.Common.LayoutAwarePage)this.FindName("pageRoot");
            primaryColumn = (Windows.UI.Xaml.Controls.ColumnDefinition)this.FindName("primaryColumn");
            titlePanel = (Windows.UI.Xaml.Controls.Grid)this.FindName("titlePanel");
            itemListScrollViewer = (Windows.UI.Xaml.Controls.ScrollViewer)this.FindName("itemListScrollViewer");
            itemDetail = (Windows.UI.Xaml.Controls.ScrollViewer)this.FindName("itemDetail");
            itemDetailGrid = (Windows.UI.Xaml.Controls.Grid)this.FindName("itemDetailGrid");
            itemDetailTitlePanel = (Windows.UI.Xaml.Controls.StackPanel)this.FindName("itemDetailTitlePanel");
            ArtistContentTb = (Windows.UI.Xaml.Controls.TextBlock)this.FindName("ArtistContentTb");
            itemTitle = (Windows.UI.Xaml.Controls.TextBlock)this.FindName("itemTitle");
            itemSubtitle = (Windows.UI.Xaml.Controls.TextBlock)this.FindName("itemSubtitle");
            itemListView = (Windows.UI.Xaml.Controls.ListView)this.FindName("itemListView");
            backButton = (Windows.UI.Xaml.Controls.Button)this.FindName("backButton");
            pageTitle = (Windows.UI.Xaml.Controls.TextBlock)this.FindName("pageTitle");
            FullScreenLandscape = (Windows.UI.Xaml.VisualState)this.FindName("FullScreenLandscape");
            Filled = (Windows.UI.Xaml.VisualState)this.FindName("Filled");
            FullScreenPortrait = (Windows.UI.Xaml.VisualState)this.FindName("FullScreenPortrait");
            FullScreenPortrait_Detail = (Windows.UI.Xaml.VisualState)this.FindName("FullScreenPortrait_Detail");
            Snapped = (Windows.UI.Xaml.VisualState)this.FindName("Snapped");
            Snapped_Detail = (Windows.UI.Xaml.VisualState)this.FindName("Snapped_Detail");
        }
开发者ID:sagar-sm,项目名称:Mu,代码行数:28,代码来源:ArtistDetails.g.i.cs

示例6: InitializeComponent

        public void InitializeComponent()
        {
            if (_contentLoaded)
                return;

            _contentLoaded = true;
            Application.LoadComponent(this, new System.Uri("ms-appx:///HomePage.xaml"), Windows.UI.Xaml.Controls.Primitives.ComponentResourceLocation.Application);
 
            pageRoot = (_8Tracks.Common.LayoutAwarePage)this.FindName("pageRoot");
            groupedItemsViewSource = (Windows.UI.Xaml.Data.CollectionViewSource)this.FindName("groupedItemsViewSource");
            passwordPrompt = (Windows.UI.Xaml.Controls.Grid)this.FindName("passwordPrompt");
            itemGridView = (Windows.UI.Xaml.Controls.GridView)this.FindName("itemGridView");
            itemListView = (Windows.UI.Xaml.Controls.ListView)this.FindName("itemListView");
            backButton = (Windows.UI.Xaml.Controls.Button)this.FindName("backButton");
            pageTitle = (Windows.UI.Xaml.Controls.TextBlock)this.FindName("pageTitle");
            loginText = (Windows.UI.Xaml.Controls.TextBlock)this.FindName("loginText");
            loginBox = (Windows.UI.Xaml.Controls.TextBox)this.FindName("loginBox");
            passwordText = (Windows.UI.Xaml.Controls.TextBlock)this.FindName("passwordText");
            passwordBox = (Windows.UI.Xaml.Controls.PasswordBox)this.FindName("passwordBox");
            doneButton = (Windows.UI.Xaml.Controls.Button)this.FindName("doneButton");
            ApplicationViewStates = (Windows.UI.Xaml.VisualStateGroup)this.FindName("ApplicationViewStates");
            FullScreenLandscape = (Windows.UI.Xaml.VisualState)this.FindName("FullScreenLandscape");
            Filled = (Windows.UI.Xaml.VisualState)this.FindName("Filled");
            FullScreenPortrait = (Windows.UI.Xaml.VisualState)this.FindName("FullScreenPortrait");
            Snapped = (Windows.UI.Xaml.VisualState)this.FindName("Snapped");
        }
开发者ID:anadobes,项目名称:Win8Tracks,代码行数:26,代码来源:HomePage.g.i.cs

示例7: InitializeComponent

        public void InitializeComponent()
        {
            if (_contentLoaded)
                return;

            _contentLoaded = true;
            Application.LoadComponent(this, new System.Uri("ms-appx:///SplitPage.xaml"), Windows.UI.Xaml.Controls.Primitives.ComponentResourceLocation.Application);
 
            pageRoot = (NoelBlogReader.Common.LayoutAwarePage)this.FindName("pageRoot");
            itemsViewSource = (Windows.UI.Xaml.Data.CollectionViewSource)this.FindName("itemsViewSource");
            primaryColumn = (Windows.UI.Xaml.Controls.ColumnDefinition)this.FindName("primaryColumn");
            titlePanel = (Windows.UI.Xaml.Controls.Grid)this.FindName("titlePanel");
            itemListScrollViewer = (Windows.UI.Xaml.Controls.ScrollViewer)this.FindName("itemListScrollViewer");
            itemDetail = (Windows.UI.Xaml.Controls.ScrollViewer)this.FindName("itemDetail");
            itemDetailGrid = (Windows.UI.Xaml.Controls.Grid)this.FindName("itemDetailGrid");
            itemTitle = (Windows.UI.Xaml.Controls.TextBlock)this.FindName("itemTitle");
            contentViewBorder = (Windows.UI.Xaml.Controls.Border)this.FindName("contentViewBorder");
            contentView = (Windows.UI.Xaml.Controls.WebView)this.FindName("contentView");
            contentViewRect = (Windows.UI.Xaml.Shapes.Rectangle)this.FindName("contentViewRect");
            itemListView = (Windows.UI.Xaml.Controls.ListView)this.FindName("itemListView");
            backButton = (Windows.UI.Xaml.Controls.Button)this.FindName("backButton");
            pageTitle = (Windows.UI.Xaml.Controls.TextBlock)this.FindName("pageTitle");
            FullScreenLandscape = (Windows.UI.Xaml.VisualState)this.FindName("FullScreenLandscape");
            Filled = (Windows.UI.Xaml.VisualState)this.FindName("Filled");
            FullScreenPortrait = (Windows.UI.Xaml.VisualState)this.FindName("FullScreenPortrait");
            FullScreenPortrait_Detail = (Windows.UI.Xaml.VisualState)this.FindName("FullScreenPortrait_Detail");
            Snapped = (Windows.UI.Xaml.VisualState)this.FindName("Snapped");
            Snapped_Detail = (Windows.UI.Xaml.VisualState)this.FindName("Snapped_Detail");
        }
开发者ID:noelitoa,项目名称:WinRT---Blog-Reader,代码行数:29,代码来源:SplitPage.g.i.cs

示例8: InitializeComponent

        public void InitializeComponent()
        {
            if (_contentLoaded)
                return;

            _contentLoaded = true;
            Application.LoadComponent(this, new System.Uri("ms-appx:///BlankPage.xaml"), Windows.UI.Xaml.Controls.Primitives.ComponentResourceLocation.Application);
 
            FullScreenLandscape = (Windows.UI.Xaml.VisualState)this.FindName("FullScreenLandscape");
            Filled = (Windows.UI.Xaml.VisualState)this.FindName("Filled");
            FullScreenPortrait = (Windows.UI.Xaml.VisualState)this.FindName("FullScreenPortrait");
            Snapped = (Windows.UI.Xaml.VisualState)this.FindName("Snapped");
            FullGrid = (Windows.UI.Xaml.Controls.Grid)this.FindName("FullGrid");
            SnapGrid = (Windows.UI.Xaml.Controls.Grid)this.FindName("SnapGrid");
            PortaitGrid = (Windows.UI.Xaml.Controls.Grid)this.FindName("PortaitGrid");
            textBlock = (Windows.UI.Xaml.Controls.TextBlock)this.FindName("textBlock");
            ContentView2 = (Windows.UI.Xaml.Controls.WebView)this.FindName("ContentView2");
            ItemListView1 = (Windows.UI.Xaml.Controls.ListView)this.FindName("ItemListView1");
            ContentView1 = (Windows.UI.Xaml.Controls.WebView)this.FindName("ContentView1");
            TitleText = (Windows.UI.Xaml.Controls.TextBlock)this.FindName("TitleText");
            grid = (Windows.UI.Xaml.Controls.Grid)this.FindName("grid");
            ItemListView = (Windows.UI.Xaml.Controls.ListView)this.FindName("ItemListView");
            PostTitleText = (Windows.UI.Xaml.Controls.TextBlock)this.FindName("PostTitleText");
            ContentView = (Windows.UI.Xaml.Controls.WebView)this.FindName("ContentView");
        }
开发者ID:DavidVotrubec,项目名称:Win8-Hackathon--1,代码行数:25,代码来源:BlankPage.g.i.cs

示例9: ListBoxCompressionHandling

        private void ListBoxCompressionHandling(ListView targetlistbox)
        {
            VisualStateGroup vgroup = new VisualStateGroup();
            var border=VisualTreeHelper.GetChild(targetlistbox,0);
            var scrollViewer=VisualTreeHelper.GetChild(border,0);
            // ListBox の初めに定義されている ScrollViewerを取り出す 
            ScrollViewer ListViewScrollViewer = (ScrollViewer)scrollViewer;

            // Visual State はコントロールテンプレートの常に最上位に定義されている 
            FrameworkElement element = (FrameworkElement)VisualTreeHelper.GetChild(ListViewScrollViewer, 0);
            // Visual State を取り出しその中から 縦横Compression のVisualStateを取り出す 
            foreach (VisualStateGroup group in VisualStateManager.GetVisualStateGroups(element))
                if (group.Name == "VerticalCompression") vgroup = group;

            //縦横Compressionの状態が変わった時のイベントハンドラ 
            vgroup.CurrentStateChanging += (s,e) =>
            {
                switch (e.NewState.Name) 
                { 
                    case "CompressionTop":
                        break; 
                    case "CompressionBottom":
                        break; 
                    case "NoVerticalCompression": 
                        break; 
                    default: 
                        break; 
                } 


            };
        } 
开发者ID:garicchi,项目名称:Neuronia,代码行数:32,代码来源:TimeLineControl.xaml.cs

示例10: Attach

        public void Attach(DependencyObject associatedObject)
        {
            listView = associatedObject as ListView;
            if (listView == null) return;

            listView.Loaded += ListViewOnLoaded;
        }
开发者ID:QuickBlox,项目名称:q-municate-dotnet,代码行数:7,代码来源:ListViewIncrementalLoadingBehavior.cs

示例11: OnApplyTemplate

        protected override void OnApplyTemplate()
        {
            base.OnApplyTemplate();

            _listView = (ListView)GetTemplateChild("ListView");
            _listView.ContainerContentChanging += ListViewOnContainerContentChanging;
        }
开发者ID:yukiyuki,项目名称:MyToolkit,代码行数:7,代码来源:LongListSelector.cs

示例12: InitializeComponent

        public void InitializeComponent()
        {
            if (_contentLoaded)
                return;

            _contentLoaded = true;
            Application.LoadComponent(this, new System.Uri("ms-resource://spotifyapp/Files/View/CollectionSummaryPage.xaml"));

            CollectionViewSource = (Windows.UI.Xaml.Data.CollectionViewSource)this.FindName("CollectionViewSource");
            LayoutRoot = (Windows.UI.Xaml.Controls.Grid)this.FindName("LayoutRoot");
            OrientationStates = (Windows.UI.Xaml.VisualStateGroup)this.FindName("OrientationStates");
            Full = (Windows.UI.Xaml.VisualState)this.FindName("Full");
            Fill = (Windows.UI.Xaml.VisualState)this.FindName("Fill");
            Portrait = (Windows.UI.Xaml.VisualState)this.FindName("Portrait");
            Snapped = (Windows.UI.Xaml.VisualState)this.FindName("Snapped");
            ScrollViewer = (Windows.UI.Xaml.Controls.ScrollViewer)this.FindName("ScrollViewer");
            CategoryPanel = (Windows.UI.Xaml.Controls.StackPanel)this.FindName("CategoryPanel");
            HeaderTitlePanel = (Windows.UI.Xaml.Controls.Grid)this.FindName("HeaderTitlePanel");
            ItemGridView = (Windows.UI.Xaml.Controls.GridView)this.FindName("ItemGridView");
            ItemListView = (Windows.UI.Xaml.Controls.ListView)this.FindName("ItemListView");
            Title = (Windows.UI.Xaml.Controls.TextBlock)this.FindName("Title");
            Image = (Windows.UI.Xaml.Controls.Image)this.FindName("Image");
            DescriptionText = (Windows.UI.Xaml.Controls.TextBlock)this.FindName("DescriptionText");
            BackButton = (Windows.UI.Xaml.Controls.Button)this.FindName("BackButton");
            PageTitle = (Windows.UI.Xaml.Controls.TextBlock)this.FindName("PageTitle");
        }
开发者ID:beaugunderson,项目名称:Spotify-Metro-Style-App,代码行数:26,代码来源:CollectionSummaryPage.g.i.cs

示例13: InitializeComponent

        public void InitializeComponent()
        {
            if (_contentLoaded)
                return;

            _contentLoaded = true;
            Application.LoadComponent(this, new System.Uri("ms-appx:///Tweet.xaml"), Windows.UI.Xaml.Controls.Primitives.ComponentResourceLocation.Application);
 
            pageRoot = (Mu_genotype1.Common.LayoutAwarePage)this.FindName("pageRoot");
            primaryColumn = (Windows.UI.Xaml.Controls.ColumnDefinition)this.FindName("primaryColumn");
            titlePanel = (Windows.UI.Xaml.Controls.Grid)this.FindName("titlePanel");
            itemListScrollViewer = (Windows.UI.Xaml.Controls.ScrollViewer)this.FindName("itemListScrollViewer");
            itemListScrollViewer2 = (Windows.UI.Xaml.Controls.ScrollViewer)this.FindName("itemListScrollViewer2");
            PeerTweets = (Windows.UI.Xaml.Controls.TextBlock)this.FindName("PeerTweets");
            itemListView2 = (Windows.UI.Xaml.Controls.ListView)this.FindName("itemListView2");
            TweetBox = (Windows.UI.Xaml.Controls.TextBox)this.FindName("TweetBox");
            TweetIt = (Windows.UI.Xaml.Controls.Button)this.FindName("TweetIt");
            PinPanel = (Windows.UI.Xaml.Controls.StackPanel)this.FindName("PinPanel");
            itemListView = (Windows.UI.Xaml.Controls.ListView)this.FindName("itemListView");
            PinTb = (Windows.UI.Xaml.Controls.TextBox)this.FindName("PinTb");
            VerifyPinButton = (Windows.UI.Xaml.Controls.Button)this.FindName("VerifyPinButton");
            backButton = (Windows.UI.Xaml.Controls.Button)this.FindName("backButton");
            pageTitle = (Windows.UI.Xaml.Controls.TextBlock)this.FindName("pageTitle");
            pageSubtitle = (Windows.UI.Xaml.Controls.TextBlock)this.FindName("pageSubtitle");
            FullScreenLandscape = (Windows.UI.Xaml.VisualState)this.FindName("FullScreenLandscape");
            Filled = (Windows.UI.Xaml.VisualState)this.FindName("Filled");
            FullScreenPortrait = (Windows.UI.Xaml.VisualState)this.FindName("FullScreenPortrait");
            FullScreenPortrait_Detail = (Windows.UI.Xaml.VisualState)this.FindName("FullScreenPortrait_Detail");
            Snapped = (Windows.UI.Xaml.VisualState)this.FindName("Snapped");
            Snapped_Detail = (Windows.UI.Xaml.VisualState)this.FindName("Snapped_Detail");
            TwitterConnectBtn = (Windows.UI.Xaml.Controls.Button)this.FindName("TwitterConnectBtn");
            RefreshButton = (Windows.UI.Xaml.Controls.Button)this.FindName("RefreshButton");
        }
开发者ID:sagar-sm,项目名称:Mu,代码行数:33,代码来源:Tweet.g.i.cs

示例14: ListViewScrollToTop

 public static void ListViewScrollToTop(ListView lv)
 {
     if (lv.Items.Count > 0)
     {
         var item0 = lv.Items[0];
         lv.ScrollIntoView(item0, ScrollIntoViewAlignment.Leading);
     }
 }
开发者ID:CuiXiaoDao,项目名称:cnblogs-UAP,代码行数:8,代码来源:Functions.cs

示例15: LoadData

 public void LoadData(ListView listView)
 {
     var dbPath = Path.Combine(Windows.Storage.ApplicationData.Current.LocalFolder.Path, "expenses.sqlite");
     using (var db = new SQLite.SQLiteConnection(dbPath))
     {
         var res = db.Table<Data>().ToList();
         listView.ItemsSource = res;
     }
 }
开发者ID:mohamedemam0,项目名称:How-Much-App,代码行数:9,代码来源:MainPageViewModel.cs


注:本文中的Windows.UI.Xaml.Controls.ListView类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。