首页
学习
活动
专区
圈层
工具
发布
    • 综合排序
    • 最热优先
    • 最新优先
    时间不限
  • 来自专栏walterlv - 吕毅的博客

    将 UWP 中 CommandBar 的展开方向改为向下展开

    也许你能见到 CommandBar 按你所需向下展开,不过可能更多数情况会看到 CommandBar 的展开方向是向上的。 本文将解释 CommandBar 的展开方向逻辑,并且提供多种方法来解决它展开方向的问题。 ---- 为什么我们需要更改 CommandBar 的展开方向? 将 CommandBar 改为向下展开的几种方法 首先定一个基调:CommandBar 的默认展开方向就是向上,无论你使用哪种方式,本质上都没有解决其展开方向的问题。 ▲ Page.TopAppBar 中的 CommandBar 看!现在 CommandBar 向下展开了。这就是我们的解决方案之一。 不过,觉得怪怪的是不是? 例如让 CommandBar 始终显示或隐藏文字,或者让 CommandBar 默认为 Minimal 的状态。

    2.3K10发布于 2020-02-10
  • 来自专栏托老师

    EXCEL 自定义菜单

    Menu Bar").Controls.Add(Type:=msoControlPopup) XXX.Caption = "XXX公司" ‘点击XXX公司,出现两个子项 Set scrap = XXX.CommandBar.Controls.Add (Type:=msoControlPopup) scrap.Caption = "Scrap" Set about = XXX.CommandBar.Controls.Add(Type:=msoControlButton ID:=2950) about.Caption = "About" about.OnAction = "abouttony" ‘点击scrap,出现三个子项 Set cleanup = scrap.CommandBar.Controls.Add msoControlButton) cleanup.Caption = "Clean up data" cleanup.OnAction = "cleanuptony" Set finderror = scrap.CommandBar.Controls.Add finderror.Caption = "Find error data" finderror.OnAction = "finderrortony" Set updatascrap = scrap.CommandBar.Controls.Add

    68720发布于 2020-03-05
  • 来自专栏Windows Community

    Windows Phone 8.1 新特性 - 控件之应用程序栏

    BottomAppBar 可以包含CommandBar, 而CommandBar 中可以使用两种命令元素,主命令元素和辅助命令元素。这两种元素在作用上类似于WP8 中的按钮和菜单项。 来看看代码: <Page.BottomAppBar> <CommandBar IsSticky="True"> <CommandBar.PrimaryCommands > <CommandBar.SecondaryCommands> <AppBarButton Label="Test01"/> <AppBarButton Label="Test02"/> </CommandBar.SecondaryCommands> </CommandBar> </Page.BottomAppBar> 我们为CommandBar定义了两种集合元素,PrimaryCommands 和 SecondaryCommands,集合中的元素可以是AppBarButton

    1K50发布于 2018-04-28
  • 来自专栏Windows Community

    Windows 8.1 应用再出发 - 几种新增控件(1)

    Windows 8.1 新增的一些控件,分别是:AppBar、CommandBar、DatePicker、TimePicker、Flyout、MenuFlyout、SettingsFlyout、Hub 我们分成两篇来介绍,本篇先为大家介绍AppBar、CommandBar、DatePicker 和 TimePicker。 1. CommandBar  Windows 8.1 引入的CommandBar在很大程度上简化了我们创建应用程序栏的过程,它会把按钮分为右侧的主命令(Primary Commands)和左侧的辅助命令(Secondary 当应用程序栏中仅包括AppBarButton、AppBarToggleButton 和 AppBarSeparator 时,我们应该选择使用CommandBar。 到这里我们就把AppBar、CommandBar、DatePicker 和 TimePicker的用法介绍完了,下一篇我们会介绍剩余的新增控件,谢谢大家。

    1.9K90发布于 2018-04-28
  • 来自专栏全栈程序员必看

    wp和uwp_uwp wpf

    { test.Text = "abc"; }); 二、原来的ApplicationBar更改为CommandBar <BitmapIcon UriSource="Images/Tools/pingjia.png" /> </AppBarButton.Icon> </AppBarButton> <CommandBar.SecondaryCommands AppBarButton Icon="Like" Label="Like" IsCompact="True"/> <AppBarButton Icon="Dislike" Label="Dislike" /> </CommandBar.SecondaryCommands

    73130编辑于 2022-09-20
  • 来自专栏林德熙的博客

    win10 uwp 如何在DataTemplate绑定方法

    TitleTextBlockStyle}" Text="lindexi.github.io/lindexi" /> <CommandBar Label="ChangeUser" Click="{x:Bind Foo}" /> </CommandBar

    1.1K10发布于 2018-09-18
  • 来自专栏张善友的专栏

    Line Counter - Writing a Visual Studio 2005 Add-In

    Below, you can find numerous methods that will facilitate the creation of new CommandBar's in Visual bar = null; try { try { // Create the new CommandBar bar = cmdBars.Add(name, position , false, false); } catch (ArgumentException) { // Try to find an existing CommandBar bar = null)) { command.AddControl(popup.CommandBar, 1); } } catch (ArgumentException) { // Command </param> private void AddToolbarCommand(CommandBar bar, string name, string label, string ttip, int

    1.3K80发布于 2018-01-29
  • 来自专栏完美Excel

    VBA通用代码:自定义右键菜单

    打开VBE,单击菜单“插入——模块”,插入一个标准模块,在其中输入代码: Sub AddToCellMenu() Dim ContextMenu As CommandBar ' 首先, .Tag = "My_Cell_Control_Tag" End With End Sub Sub DeleteFromCellMenu() Dim ContextMenu As CommandBar

    2.4K30编辑于 2022-11-16
  • 来自专栏林德熙的博客

    控件

    App bar toggle button 开关命名命令栏 Command bar 一种专门处理命令按钮栏按钮 我们把刚才的按钮放在<CommandBar> <CommandBar> </MenuFlyout> </AppBarButton.Flyout> </AppBarButton> </CommandBar 我们也看到最后的按钮,那些用户不是很容易就需要使用的,但是还是有用的按钮就可以放在这里,请看下面 <CommandBar.SecondaryCommands> <AppBarButton Label="没有授权"/> <AppBarButton Label="红黑转载"/> </CommandBar.SecondaryCommands

    6K10发布于 2018-09-19
  • 来自专栏办公魔盒

    VBA 给Excel添加自定义菜单栏

    Sub SetMenu() Dim myBar As CommandBar Dim myButton As CommandBarButton Set

    3.7K20发布于 2019-07-22
  • 来自专栏完美Excel

    在Excel中自定义上下文菜单(下)

    Sub Add_Name_To_Contextmenus() Dim Cbar As CommandBar For Each Cbar In Application.CommandBars End If End With Next End Sub Sub Delete_Name_From_Contextmenus() Dim Cbar As CommandBar

    4.1K20编辑于 2022-11-16
  • 来自专栏dino.c的专栏

    [WPF自定义控件库]为Form和自定义Window添加FunctionBar

    为Form添加FunctionBar 本来打算派生自ToolBar,或者参考UWP的CommandBar,但最后决定参考MahApps.Metro的WindowCommands创建了FormFunctionBar 其实实现FunctionBar最大的难题是命名,我在CommandBar、ActionBar、Toolbar、ButtonsBar等名称之间由于了很久,根据反馈也许还是会修改。 5.

    1.1K30发布于 2019-06-11
  • 来自专栏完美Excel

    Word VBA应用技术:列出文档中的所有书签

    代码如下: Sub CreateBookMarkMenu() Dim bkBookmark As Bookmark Dim cbrBar As CommandBar Dim cbrPopup As CommandBarPopup

    2.3K50编辑于 2023-02-16
  • 来自专栏完美Excel

    创建自定义工具栏,可查看按钮图标及对应的ID属性

    代码: Sub ShowFaceIDs() Dim NewToolbar As CommandBar Dim NewButton As CommandBarButton Dim i As Integer

    79510编辑于 2024-03-13
  • 来自专栏完美Excel

    在Excel中自定义上下文菜单(上)

    下面是6个过程的代码: Sub AddToCellMenu() Dim ContextMenu As CommandBar Dim MySubMenu As CommandBarControl ContextMenu.Controls(4).BeginGroup = True End Sub Sub DeleteFromCellMenu() Dim ContextMenu As CommandBar

    4.5K40编辑于 2022-11-16
  • 来自专栏完美Excel

    Excel实战技巧50: 避免因粘贴破坏数据有效性

    As Long) Dim oCtl As CommandBarControl Dim CCatcher As clsCommandBarCatcher Dim oBar As CommandBar '开启/禁用所有命令栏中的指定控件 Private Sub EnableDisableControl(lID As Long, bEnable As Boolean) Dim oBar As CommandBar

    8.3K31发布于 2019-07-29
  • 来自专栏林德熙的博客

    win10 uwp 使用油墨输入 保存,修改,加载inkUWP 手写清理笔画手写识别无法识别手写语音

    </Grid.RowDefinitions> <InkCanvas x:Name="ink_canvas" Grid.RowSpan="2" /> <CommandBar easyicon.net.ico"/> </AppBarButton.Icon> </AppBarButton> </CommandBar

    1.8K10发布于 2018-09-18
  • 来自专栏林德熙的博客

    win10 uwp 使用油墨输入

    </Grid.RowDefinitions> <InkCanvas x:Name="ink_canvas" Grid.RowSpan="2" /> <CommandBar easyicon.net.ico"/> </AppBarButton.Icon> </AppBarButton> </CommandBar

    72510编辑于 2022-08-09
  • 来自专栏四楼没电梯

    Visual Studio 插件 --代码注释对齐

    = null)) { command.AddControl(toolsPopup.CommandBar, 1);

    1.5K10编辑于 2024-10-12
  • 来自专栏VBA 学习

    VBE菜单——CommandBars对象

    我们写个代码遍历一下这个对象,看看在VBA编辑器里的这个菜单对象: Sub testCMDB() Dim cmd As CommandBar For Each cmd In

    2.7K20发布于 2020-07-28
领券