WPF中的实际可见性(Actual Visibility in WPF)
在WPF中,元素可以具有“可见”的可见性,但在屏幕上实际上不可见,因为它的父级(或父级的父级)具有“可见性”。
我希望能够知道元素是否实际呈现在屏幕上,而不必遍历可视树检查父项。
有谁知道这样做的方法?
提前致谢!
In WPF an element can have a Visibility of "Visible", but not be actually visible on the screen because it's parent (or parent of parent) has Visibility of Collapsed.
I want to be able to know if a element is actually rendered on the screen, without having to traverse up the visual tree checking parents.
Does anyone know of a way to accomplish this?
Thanks in advance!
原文:https://stackoverflow.com/questions/7907192
最满意答案
尝试:
- name: Install Bundler command: rvm alias create default ruby-2.1.2-p95
顺便说一句。 你有没有看到RVM支持Ansible: https : //github.com/rvm/rvm1-ansible
try:
- name: Install Bundler command: rvm alias create default ruby-2.1.2-p95
btw. have you seen RVMs support for Ansible: https://github.com/rvm/rvm1-ansible
相关问答
更多-
你可以使用assert模块 : - assert: that: ansible_version.major < 2 Ansible provides a global dict called ansible_version, dict contains the following "ansible_version": { "full": "2.7.4", "major": 2, "minor": 7, "revision": 4 ...
-
原始问题是: - 限制选项不起作用 通过调用ansible-playbook --limit 'PM' akana-installation.yml您可以告诉ansible-playbook --limit 'PM' akana-installation.yml将服务器限制为PM组中的主机。 在您的情况下,它将是xyz.example.com 。 请记住,如果您在多个组中拥有此服务器,那么它仍将是该组的成员。 您的有限库存将变为: [PM] xyz.example.com ansible_connectio ...
-
在配置Ubuntu(以及可能的其他一些发行版)时,这是一种非常常见的情况。 您尝试在后台运行自动更新时运行Ansible(这是在设置新计算机后立即执行的操作)。 由于APT使用信号量,Ansible被踢出局。 该剧本没问题,最简单的验证方法是稍后运行(自动更新过程完成后)。 对于永久性解决方案,您可能希望: 使用禁用自动更新的操作系统映像 在Ansible playbook中添加一个显式循环,重复失败的任务,直到成功为止 This is a very common situation when provis ...
-
修复。 我需要添加: [[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # This loads RVM 到.zshrc Fixed it. I needed to add: [[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # This loads RVM to .zshrc
-
用ansible安装指南针(install compass with ansible)[2022-10-03]
您也可以使用gem模块,它比shell脚本更好,因为它不依赖于您使用的Linux发行版,例如: 一个剧本的例子 - name: Installing ruby apt: pkg: "{{ item }}" state: present with_items: - ruby2.0 - ruby2.0-dev - name: Symlink exists for Ruby 2.0 file: src=/usr/bin/ruby2.0 dest=/usr/local/ ... -
Ansible仅为匹配某些变量的主机运行playbook(Ansible run playbook only for hosts that match some variables)[2021-08-30]
使用include with with_first_found : - include: "{{ include_path }}" with_first_found: - "{{ ansible_distribution }}.yml" - "{{ ansible_os_family }}.yml" - "default.yml" loop_control: loop_var: include_path 更新:添加loop_var以防止可能的item变量冲突。 Use i ... -
它应该是vars_files (复数变量): docs 。 在ansible-container示例中有一个拼写错误。 It should be vars_files (plural vars) in the playbook: docs. There's a typo in ansible-container example.
-
2个主要问题是unarchive任务不会创建/opt/adt/android-sdk-linux目录,而且我认为你安装SDK的命令不正确。 作为旁注,您不需要为每个任务使用action模块。 您只需将其替换为操作内部的模块即可。 - name: Make opt dir for user action: file path=/opt/adt/ state=directory mode=0777 会成为 - name: Make opt dir for user file: path: /o ...
-
任务的参数应采用key=value的格式,而不是key:value 。 这让Ansible感到困惑。 你想要的是这个: - name: Wait for SSH to start wait_for: host="{{ newmachines.instances[0].public_ip }}" port=22 timeout=300 delegate_to: localhost 任务的修饰符,如delegate_to , with_items等,应该使用: 。 The pa ...
-
尝试: - name: Install Bundler command: rvm alias create default ruby-2.1.2-p95 顺便说一句。 你有没有看到RVM支持Ansible: https : //github.com/rvm/rvm1-ansible try: - name: Install Bundler command: rvm alias create default ruby-2.1.2-p95 btw. have you seen RVMs suppor ...