<ListBox> <TextBlock Text="Arial" FontFamily="Arial"/> <TextBlock Text="Courier New" FontFamily="Courier New"/> <TextBlock Text="Times New Roman" FontFamily="Times New Roman"/> </ListBox> この例では、データ バインディングを使用して、 ListBox コントロールに FontFamily オブジェ...
{ DateTimeOffset time = DateTimeOffset.Now; TimeSpan span = time - lastTime; lastTime = time;//Time since last tick should be very very close to IntervalTimerLog.Text += timesTicked +"\t time since last tick: "+ span.ToString() +"\n"; timesTicked++;if(timesTicked > timesToTick) ...
C# コピー ObservableCollection<FontFamily> fonts = new ObservableCollection<FontFamily>(); public MainPage() { this.InitializeComponent(); fonts.Add(new FontFamily("Arial")); fonts.Add(new FontFamily("Courier New")); fonts.Add(new FontFamily("Times New Roman")); } ...