原文:2019-3-20-UWP-How-to-custom-RichTextBlock-right-click-menu

title author date CreateTime categories
UWP How to custom RichTextBlock right click menu
lindexi
2019-03-20 09:54:54 +0800
2019-3-20 9:46:7 +0800
UWP

We can find the default RichTextBlock will show the copy and the select all menu when we right click it.
If you think the default menu is too boring, try customizing the RichTextBlock right click menu.

We can use ContextFlyout to custom RichTextBlock right click menu.

        <RichTextBlock HorizontalAlignment="Center" VerticalAlignment="Center">
<RichTextBlock.ContextFlyout>
<MenuFlyout>
<MenuFlyoutItem Text="1" />
<MenuFlyoutItem Text="2" />
</MenuFlyout>
</RichTextBlock.ContextFlyout>
<Paragraph>Welcome to my blog http://blog.lindexi.com I write some UWP blogs</Paragraph>
</RichTextBlock>

Run the code and you can see this image.

All code is in github

c# - How can I change the right click menu of a RichTextBlock in UWP - Stack Overflow

最新文章

  1. zookeeper 应用
  2. ssl小结
  3. 【转】arcgis server site 快速恢复与重建
  4. IE10、IE11 无法写入Cookie
  5. 【HDU 3435】 A new Graph Game (KM|费用流)
  6. Dungeon Master(poj 2251)
  7. AbpZero--4.不使用谷歌字体,提升加载速度
  8. win8.1 64位+oracle11g R2 64位 +powerdesigner破解版 64位+PL/SQL
  9. Linux(3)用户和权限管理
  10. 前端框架Vue入门
  11. JavaSE语法基础(3)---函数、数组
  12. cross-env 兼容跨平台运行脚本
  13. [PHP] 工厂模式的日常使用
  14. Linux Shell 用法
  15. 用列表实现一个简单的图书管理系统 python
  16. Java Heap Dump On OutOfMemoryError
  17. Jfrog 与 jenkins Sonarqube的 测试样例 (From jfrog 培训)
  18. Delphi之Exception获得错误信息(简单好理解)
  19. HDU5399-多校-模拟
  20. pip 设置国内源

热门文章

  1. Rpg maker mv角色扮演游戏制作大师简介
  2. Java8 日期和时间API
  3. Tasteless challenges hard WP
  4. SAP MM 特殊库存之T库存初探
  5. 如何使用 CODING 进行瀑布流式研发
  6. zabbix4.0搭建2
  7. [20190918]关于函数索引问题.txt
  8. windows宿主机和docker容器设置挂载共享文件夹
  9. golang数据结构和算法之CircularBuffer环形缓冲队列
  10. 【转】基于Bootstrap的超酷jQuery开关按钮插件