![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
| |
| | #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 | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| How can I change a ConnectionString depending on the dev or prod environment ? | .NET General | |||
| renaming files, depending on their dates ... | PowerShell | |||
| 2 separate addresses-can i select, depending on arena? | Vista mail | |||