![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|
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.
br> br> |
| |||||||
![]() |
| | Thread Tools | Display Modes |
| | #1 (permalink) |
| 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 Specs![]() |
![]() |
| 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 |