碎知识 GIS

  1. 设置点击输入框时弹出的键盘类型:

    <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用法

  1. public sealed partial class BlankPage : Page
  2. {
  3. public BlankPage()
  4. { this.InitializeComponent();
  5. DispatcherTimer timer = new DispatcherTimer();
  6. timer.Interval = TimeSpan.FromSeconds(1);
  7. timer.Tick += OnTimerTick; timer.Start(); }
  8. void OnTimerTick(object sender, object e)
  9. { txtblk.Text = DateTime.Now.ToString("h:mm:ss tt"); } }

CompositionTarget.Rendering += OnCompositionTargetRendering; 不断刷新页面

原文地址:https://www.cnblogs.com/gisbeginner/p/2678772.html