Windows Vista Forums
Vista Forums Home Join Vista Forums Webcasts Vista Tutorials Tags

Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums Now

Go Back   Vista Forums > Microsoft Technical Newsgroups > Avalon

Set Binding.FallbackValue depending on DesignMode and RuntimeMode

Update your Vista Drivers Update Your Drivers Now!!
Closed Thread
 
Thread Tools Display Modes
Old 07-13-2007   #1 (permalink)
Horst Klein
Guest


 

Set Binding.FallbackValue depending on DesignMode and RuntimeMode

Hi I try to set a custom class to handle the FallbackValue depending on the
Design- and RuntimeMode.

The basic Idea:
We build Xaml to include in other Xamls.
For example an Adress.xaml that contains Name, Surname, City etc.
This Xaml we "recycle" (include) in other Xamls.
For examle into a Xaml to show patients, into a Xaml to show employers, and
so on
(all these "Persons" have an Adresse)

The DataContext is defined Outside in the "Root Xaml".
If we now want design the lowest Xaml (Adress.xaml) in Blend there is no
Datacontext defined.
To simulate datas we set the FallbackValue.

This works fine at designtime.
At runtime it works also.
But not if a datafield in the database contains a DbNull value.
In this case our "DesignTime" Value is shown.

In the attached VB sample I try to set the FallBackValue depending of the
Design- or RuntimeMode.

What I don't now is in what kind af way I have to set the return Value of my
"MyFallbackValueSource" Class
Override the ToString Function dons't help.

How can tell me how can return a value?
I my sample i return a String, can I also retrun numbers?

Thanks for support

Best regards
Horst










My System SpecsSystem Spec
Closed Thread

Thread Tools
Display Modes



Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I change a ConnectionString depending on the dev or prod environment ? Gilbert Tordeur .NET General 2 05-28-2008 06:58 AM
Binding inside binding question Yoavo Avalon 0 12-03-2007 08:24 AM
renaming files, depending on their dates ... show3r PowerShell 6 09-28-2007 09:48 PM
Binding Question (Binding in General) Jason Avalon 2 05-09-2007 04:41 AM
2 separate addresses-can i select, depending on arena? njw Vista mail 5 05-03-2007 09:11 AM


Vistax64.com is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media 2005-2008

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51