• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录

gisoracle

  • 博客园
  • 联系
  • 订阅
  • 管理

公告

View Post

ArcGIS Pro中改变How can Combobox selection change Checkbox isChecked

internal class Module1 : Module
  {
    private static Module1 _this = null;
    //Capture the checkbox here
    public CheckBox CheckBox { get; set; } = null;

//Eg a ribbon or "DAML" combo
internal class ComboBox1 : ComboBox {
 ...
 protected override void OnSelectionChange(ComboBoxItem item) {
   //have we been "made" before the checkbox?
   if (Module1.Current.CheckBox == null)
    //load it then
    _  = FrameworkApplication.GetPlugInWrapper("ProAppModule1_CheckBox1");

   //Check/Uncheck
   Module1.Current.CheckBox.IsChecked = !Module1.Current.CheckBox.IsChecked;
   ...

//DAML Checkbox on the ribbon
internal class CheckBox1 : CheckBox {

  public CheckBox1() {
    //wire up the Module property
    Module1.Current.CheckBox = this;
  }
  //handle on click for when the user _does_ actually click it
  protected override void OnClick() {
    //TODO - whatever u need to do to keep everything in-sync
    //...
    base.OnClick();
  }

 

posted on 2022-03-21 21:03  gisai  阅读(65)  评论(0)    收藏  举报

刷新页面返回顶部
 
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3