visibility

TargetNullValue for Visibility that's bound to a boolean

安稳与你 提交于 2019-12-10 02:56:20
问题 I have a Grid whose Visibility property is bound to a boolean property of a certain model using a Converter : <Grid Visibility="{Binding ElementName=MyTreeView, Path=SelectedItem.MyBoolProperty, Converter={StaticResource boolToVisConverter}}"> <!-- child elements --> </Grid> It works great when an element in my TreeView is selected, but if nothing is selected or the TreeView is empty it defaults to being visible. I need it to be hidden by default. I've tried using TargetNullValue=Hidden but

Bind ContextMenu's MenuItem visibility to ListView selection

心不动则不痛 提交于 2019-12-09 17:10:34
问题 I have a user control with a ListView containing simple items from an ObservableCollection. I would like the ContextMenu of that ListView to contain items depending on what's selected in the ListView. If no item is selected, some MenuItems should not be visible. My converter isn't even called when I open the ContextMenu. The binding seems to be wrong, I find this in the output window: System.Windows.Data Error: 4 : Cannot find source for binding with reference 'ElementName=listView'.

Alternative to visibility:collapse not working on IE and Chrome

﹥>﹥吖頭↗ 提交于 2019-12-09 15:36:40
问题 The following page: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <STYLE type="text/css"> tr.cccc { visibility: collapse; } </STYLE> <BODY> <TABLE border="1"> <TR class="cccc"> <TD>one</TD> </TR> </TABLE> </BODY> </HTML> works only in Firefox. IE always displays the row, and Chrome hides the row but showing its vertical space. So, how can I hide completely a row using only CSS? 回答1: Use display: none instead of

Make one div visible and another invisible

断了今生、忘了曾经 提交于 2019-12-09 07:46:41
问题 I have two div tags, one is for the search and the other is for the results. What I need is for when the submit button is clicked the results are returned and placed into the results div (with an iframe) and the search div should become hidden and the results div should be made visible. search div is initially set to visible (using the visibility to visible) and the results div is initially set to hidden (using the visibility to hidden). Also, initially ther eis a huge white space at the

How to supress empty subreports in SSRS 2008

穿精又带淫゛_ 提交于 2019-12-09 04:52:00
问题 I'm creating a 'master' report in SSRS 2008 that collaborates other reports about a person. Sometimes not all of the other reports are relevant and as such return nothing. I'd like to be able to exclude this from the master report so it does not leave a blank page. I'm aware of the 'no-rows-message' feature, but a whole page with simply "Not applicable for this person" is hardly the best solution! Essentially I'm looking for a way to determine if a subreport is 'empty' and use that in a

Anyone familiar with mobile visibility and zurbs foundation

送分小仙女□ 提交于 2019-12-09 03:25:35
问题 I am trying to hide a div on both a tablet device and a desktop. I am using zurbs foundation http://foundation.zurb.com/docs/layout.php to do so. However when I try to apply the classes hide-on-tablets & hide-on-desktops the second one overrides the first one somehow and the hide-on-tablets shows up on a tablet. I can create my own media queries and hide them on both but I figure I should take advantage of classes or what's the point of having all the code. You can view it on my site at http:

CSS Style Visibility not behaving as expected

情到浓时终转凉″ 提交于 2019-12-08 18:03:42
问题 I have a html page with a basic tab control. I use javascript to show and hide tabs and tab content divs. My problem is that if I change the visibility of an element inside one of the tab content divs to 'hidden', then back to 'visible', the element seems to forget or lose its parent div container and remains visible, regardless of its original parents visibility. To illustrate, take the following example: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR

Method does not override package visible method in Eclipse

五迷三道 提交于 2019-12-08 12:59:30
From the Eclipse Java compiler setting: Method does not override package visible method "A package default method is not visible in a different package, and thus cannot be overridden. When this option is enabled, the compiler will signal such scenario either as an error or a warning." How can I trigger this Warning/Error? I'm looking for a code example. Foo.java: package foopackage; public class Foo { String getString() { return "foo"; } } Bar.java: package barpackage; import foopackage.Foo; public class Bar extends Foo { String getString() { return "bar"; } } Should do it. From the Eclipse

How to toggle between gallery-thumbnails and a specific slideshow-image on the same page?

99封情书 提交于 2019-12-08 11:25:54
问题 This is my first question, but I did read the guidelines. I hope you'll welcome me to the community with a straight answer. I'm working on a gallery-website where JQuery is not a dependency. I'm trying to switch between a thumbnails-view of all pictures and a slideshow-view showing only one picture, namely, the one picture whose thumbnail I clicked on. Also, I want the thumbnails-view and the slideshow-view to be separate, one to not show when the other does, but I want to have them both on

Will ViewPager Adapter's instantiateItem will be called if ViewPager.visibility is GONE?

廉价感情. 提交于 2019-12-08 10:24:39
问题 I have an activity with the following layout: LinearLayout (orientation vertical) --> ViewPager --> ListView On initial load of the the activity the ViewPager visibility is set to be GONE though its adapter is created and set. At this point while the layout is inflated will PagerAdapter 's instantiateItem() be called or not? (because its visibility is GONE) 回答1: I tested the flow and found that even after inflating the ViewPager view and setting the adapter for the view, if the viewpager is