Questions tagged [fallbackvalue]

17 questions
11
votes
2 answers

How to set FallbackValue in binding as path to external image file?

I'm trying to set FallbackValue in case when my converter cannot be call, but I'm not sure how to do that.
h__
  • 761
  • 3
  • 12
  • 41
10
votes
1 answer

How does FallbackValue work with a MultiBinding?

I ask because it doesn't seem to work. Assume we're binding to the following object: public class HurrDurr { public string Hurr {get{return null;}} public string Durr {get{return null;}} } Well, it would appear that if we used a MultiBinding…
user1228
9
votes
3 answers

How to handle bindings when the source object may not have the given property?

I have two classes with different properties, but both inherit some other base class: public class BaseClass { } public class ClassA : BaseClass { public string PropertyA { get; set; } } public class ClassB : BaseClass { public string…
snurre
  • 3,045
  • 2
  • 24
  • 31
4
votes
6 answers

AppSettings fallback/default value?

ASP.NET For each appSetting I use, I want to specify a value that will be returned if the specified key isn't found in the appSettings. I was about to create a class to manage this, but I'm thinking this functionality is probably already in the…
lance
  • 16,092
  • 19
  • 77
  • 136
4
votes
2 answers

Emacs lisp: "Fall through" type for defcustom.

TL;DR Is there some standard fallback handling in the customize system, for handling partially invalid composite customization variables, e.g. an alist where one entry is not a cons? Long Version The customize-mechanism of emacs is quite powerful by…
kdb
  • 4,098
  • 26
  • 49
3
votes
1 answer

TYPO3 / TypoScript: How to make a fallback?

I want to output a string to the rendered HTML by using two fallbacks. My typoscript is defined at the top level page (root page of my website) and is passed to all pages at lower levels. Structure: Homepage Page at level 1 Page at level 2…
DanielaWaranie
  • 1,405
  • 1
  • 17
  • 22
3
votes
2 answers

Handling a bool fallback value for a binding within a MultiBinding

I have a MultiBinding converter that determines the visibility of a control depending on if both of my Binding fields evaluate to true. If for some reason it can't reach either of these bool properties, I want to set them to evaluate to true. For…
justin peterson
  • 367
  • 1
  • 6
  • 17
2
votes
2 answers

Add item to itemssource if no match from binding

So, here's my scenario: I have a ComboBox where the itemssource is a Dictionary of various titles and their IDs. These titles can be disabled at some point in the future, and therefore shouldn't show in the ComboBox anymore. However,…
jmgardn2
  • 981
  • 2
  • 8
  • 21
2
votes
1 answer

wpf When binding to array index, fallbackvalue doesn't seem to work

I have a simple Grid in which i bind the Row height to an array member. But the content may be cleared in case of wrong entries from the user, that the array index becomes invalid. Therefore, I set the FallbackValue to a default value. But this…
deafjeff
  • 754
  • 7
  • 25
1
vote
2 answers

Conditionally use fallback value if value in resultset does not match currently logged in user

I have the php script below to get data from a database and return it to a calendar as part of a booking system. The title field, $row["title"], is actually the username of different people for each booking. Everything works well, but I want to…
Liam
  • 13
  • 4
1
vote
2 answers

Should I always use BindingBase.FallbackValue?

Greetings, As I create WPF application I obviously use lots of bindings. However I figured out that generally I don't use FallbackValue property. My question is: should I always set Fallback value event if it should be: FallbackValue="" ? What is…
niao
  • 4,972
  • 19
  • 66
  • 114
1
vote
1 answer

WPF: Cannot save value from target back to source

Thats the full error message I get: System.Windows.Data Error: 8 : Cannot save value from target back to source. BindingExpression:Path=SelectedPupil; DataItem='AdministrationViewModel' (HashCode=52357250); target element is 'DataGrid' (Name='');…
Elisabeth
  • 20,496
  • 52
  • 200
  • 321
1
vote
1 answer

Dummy FallbackValue for IEnumerable Asynchronous

I am trying to debug some of the databinding/performance issues in my MVVM program (Josh Smith based). There is a lot of concurrent loading of different lists and objects, so I've been using isAsync and some threading to improve performance and…
Zach Leighton
  • 1,939
  • 14
  • 24
0
votes
2 answers

Many binding errors in visual studio with WPF application?

When I debug my app visual studio gives many binding errors like those in the example here: Anybody know why this is happening? Also colleague of mine doesn't have those binding errors but has the same version as me. System.Windows.Data…
KDP
  • 1,377
  • 3
  • 11
  • 13
0
votes
1 answer

Is there a Fallback for Dataitem=null

I'm trying to resolve performance issues. The current gremlin is my tooltip that throws: System.Windows.Data Information: 41 : BindingExpression path error: 'ViewLine3' property not found for 'object' because data item is null. This could happen…
Mandelbrotter
  • 2,216
  • 2
  • 11
  • 28
1
2