This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- 適合格線的 250 像素方形項目範本,如 GroupedItemsPage 和 ItemsPage 中所見 --> | |
<DataTemplate x:Key="Standard250x250ItemTemplate"> | |
<Grid HorizontalAlignment="Left" Width="250" Height="250"> | |
<Border Background="{StaticResource ListViewItemPlaceholderBackgroundThemeBrush}"> | |
<Image Source="{Binding Image}" Stretch="UniformToFill" AutomationProperties.Name="{Binding Title}"/> | |
</Border> | |
<StackPanel VerticalAlignment="Bottom" Background="{StaticResource ListViewItemOverlayBackgroundThemeBrush}"> | |
<TextBlock Text="{Binding Title}" Foreground="{StaticResource ListViewItemOverlayForegroundThemeBrush}" Style="{StaticResource TitleTextStyle}" Height="60" Margin="15,0,15,0"/> | |
<TextBlock Text="{Binding Subtitle}" Foreground="{StaticResource ListViewItemOverlaySecondaryForegroundThemeBrush}" Style="{StaticResource CaptionTextStyle}" TextWrapping="NoWrap" Margin="15,0,15,10"/> | |
</StackPanel> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<ListView x:Name="MyListViewitems" ItemTemplate="{StaticResource Standard250x250ItemTemplate}"> | |
</ListView> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
using Windows.Foundation; | |
using Windows.Foundation.Collections; | |
using Windows.UI.Xaml; | |
using Windows.UI.Xaml.Controls; | |
using Windows.UI.Xaml.Controls.Primitives; | |
using Windows.UI.Xaml.Data; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Page | |
x:Class="DataSource.MainPage" | |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
xmlns:local="using:DataSource" | |
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | |
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | |
mc:Ignorable="d"> | |
<Grid Background="{StaticResource ApplicationPageBackgroundThemeBrush}"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace ListConsoleApp | |
{ | |
public class Student | |
{ | |
public string Name; | |
public int Score; | |
public Student(string name, int score) | |
{ | |
this.Name = name; | |
this.Score = score; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var query = from stu in students | |
where stu.Score < 60 | |
select stu; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace ListConsoleApp | |
{ | |
public class Student | |
{ | |
public string Name; | |
public int Score; | |
public Student(string name, int score) | |
{ | |
this.Name = name; | |
this.Score = score; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
students.Sort((x, y) => { return -x.Score.CompareTo(y.Score); }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace ListConsoleApp | |
{ | |
public class Student | |
{ | |
public string Name; | |
public int Score; | |
public Student(string name, int score) | |
{ | |
this.Name = name; | |
this.Score = score; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void pageTitle_Click_1(object sender, RoutedEventArgs e) | |
{ | |
// 若是第一次按,則將物件新增到 Popup 物件裡。 | |
if (!this.isAddedToPopup) | |
{ | |
this.headerMenuPopup = ShowPopup(this.pageTitle, this.headerMenuCtl); | |
this.headerMenuCtl.Tapped += headerMenuCtl_Tapped; | |
this.isAddedToPopup = true; | |
} | |
// 顯示 Popup |