- 设置点击输入框时弹出的键盘类型:
<TextBox.InputScope>
<InputScope>
<InputScope.Names>
<InputScopeName NameValue="Number" />
</InputScope.Names>
</InputScope>
</TextBox.InputScope>
其中NameValue的值即为弹出的键盘类型,可以根据自己需要进行改变
page gets several events in sequence 页面事件执行顺序:
• OnNavigatedTo
• SizeChanged
• LayoutUpdated
• Loaded
DispatcherTimer用法
- public sealed partial class BlankPage : Page
- {
- public BlankPage()
- { this.InitializeComponent();
- DispatcherTimer timer = new DispatcherTimer();
- timer.Interval = TimeSpan.FromSeconds(1);
- timer.Tick += OnTimerTick; timer.Start(); }
- void OnTimerTick(object sender, object e)
- { txtblk.Text = DateTime.Now.ToString("h:mm:ss tt"); } }
CompositionTarget.Rendering += OnCompositionTargetRendering; 不断刷新页面