Windows-universal-samples学习笔记系列二:Controls, layout, and text

Controls, layout, and text
AutoSuggestBox migration Clipboard Commanding
Context menu Context menu (XAML) Disabling selection
Display orientation Downloadable fonts (DirectWrite) Downloadable fonts (XAML)
Drag and drop Focus visuals Full screen mode
Line spacing (DirectWrite) ListView and GridView Lock screen apps
Message dialog Multiple views OCR
Printing Pull-to-refresh Responsiveness techniques
Scaling according to DPI Splash screen State triggers
Tailored multiple views Title bar UI basics (XAML)
User interaction mode WebView control (HTML) Window resizing
 

 AutoSuggestBox migration sample

This sample shows how to migrate your Windows 8.1 app to Windows 10 by replacing your SearchBox with an AutoSuggestBox.  With the improvements in AutoSuggestBox, you will get the same end-user experience across all supported Windows 10 devices.

Clipboard sample (复制、粘贴文本或文件)

Commanding sample (AppBar 和 CommandBar 的使用,不再像win8.1的metro那样了。Page.BottomAppBar更适合手机)

This sample highlights the changes and new features to the CommandBar.  On Windows 10, both the AppBar and the CommandBar are visible by default and can be either "closed" or "opened". While in the closed state, an app bar can provide either a "minimal" or "compact" hint or no hint at all.  The AppBar/CommandBar transition to an opened state when the user taps the More button that appears as an ellipsis or the control is opened programmatically.

 Context menu sample (右键菜单)

Context menu (XAML) sample (增强版右键菜单)

Disabling selection sample (仅针对JavaScript开发的应用)

Display orientation sample (可设置自动旋转)

This sample demonstrates the use of the DisplayInformation class for retrieving the display orientation and setting an app's auto-rotation orientation preferences.

Specifically, this sample shows how to:

  • Read the native display orientation.
  • Read the current display orientation.
  • Respond to changes in display orientation.
  • Set auto-rotation orientation preferences.

Downloadable fonts (DirectWrite) sample (下载字体,仅用于C++)

Downloadable fonts (XAML) sample (下载字体,win10新特性) 

Drag and drop sample (拖放操作)

Focus visuals sample (可自定义获取焦点后的显示)

Full screen mode sample (全屏模式)

Line spacing (DirectWrite) sample (仅用于C++)

ListView and GridView sample

Lock screen apps sample (锁屏时显示信息)

Message dialog sample (估计MVVM Light 用的也是这个)

Multiple views sample (手机上创建新窗口时报错了)

OCR sample (从图像中提取文本)

 Printing sample

Pull-to-refresh sample (相当于QQ的往下拉显示更多以前聊天信息的功能)

Responsiveness techniques sample (相应UI场景的改变,可作为起始案例)

Showcases a UI scenario from Settings (Personalization UI) and highlights the simple responsive techniques we have introduced in Windows 10 – namely, VisualState.Setters, AdaptiveTriggers, SplitView and RelativePanel (static and dynamically modifying properties). This sample can be viewed as a getting started sample.

Scaling according to DPI sample (对不同DPI的处理)

Splash screen sample (起始屏幕?这个有待研究...)

State triggers sample (状态触发,如:屏幕尺寸WindowSizeStates;输入InputTypeStates;设备DeviceFamilyStates)

Showcases extensible StateTriggers with a couple of different custom triggers built into a scenario app. Custom triggers shown here include DeviceFamilyTrigger, InputTypeTrigger, ControlSizeTrigger and ViewModelTrigger

Tailored multiple views sample (根据屏幕尺寸提供不同的视图,分别采用Pivot或SplitView)

Showcases how to build tailored UI using multiple views that are optimized for one-handed use.  Specifically, the usage of the Pivot control plus commands at the bottom of devices that are < 7" in size and the usage of the SplitView control plus commands at the top of the device for devices > 7" in size.

Title bar sample (标题栏,手机应该没有的)

This sample shows various ways of customizing the title bar.

UI basics (XAML) sample列举了所有控件的基本使用

This sample shows all of the XAML controls in an interactive format.

Specifically, this sample shows how to:

  • Specify XAML controls in markup: Each control page shows the markup used to create each example
  • Basic layout: This sample will show all of the possible layout options for your app and allow you to interact with the panels to show how to achieve any layout you are looking for.
  • Adaptive UI: In addition to showing how each control responds to different form factors, the app itself is responsive and shows various methods for achieving adaptive UI.

User interaction mode sample (区分触摸与鼠标)

This sample shows how to detect and respond to the user interaction mode.

The sample shows the following techniques:

  • Retrieving the current user interaction mode.
  • Responding to changes in the user interaction mode.

WebView control (HTML) sample (仅用于JS)

Window resizing sample (改变窗口尺寸,手机上会失败)

This sample shows how to customize the size of your app's view.

The sample shows the following techniques:

  • Resizing the view.
  • Setting a minimum size for the view.
  • Launching at a specific size.
原文地址:https://www.cnblogs.com/qianblue/p/4862513.html