![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|
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 | 'Default' source for an Image Hi, I'm trying to display a default image in an Image control when the Source property is null. Unfortunately, a DataTrigger which checks for {x:Null} in the Source property, and sets another value to Source in the trigger does not work, as the trigger property and can not be repeated in the trigger setters: <Style x:Key="defImageStyle" TargetType="{x:Type Image}"> <Style.Triggers> <Trigger Property="Source" Value="{x:Null}"> <Setter Property="Source" Value="defaultPicture.jpg"/> </Trigger> </Style.Triggers> </Style> Is there a way to achieve this in Xaml? Thanks, Luc |
My System Specs![]() |
| | #2 (permalink) |
| Guest | Re: 'Default' source for an Image How about overriding the Template property such that it contains a hidden default image that's visibilty gets flipped based on the Source trigger? |
My System Specs![]() |
| | #3 (permalink) |
| Guest | Re: 'Default' source for an Image How about overriding the Template property such that it contains a hidden default image that's visibilty gets flipped based on the Source trigger? |
My System Specs![]() |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| XamlWriter.Save breaking Image.Source | Curtis | Avalon | 0 | 11-21-2007 10:31 AM |
| WPF Image source real size? | JN1974 | Avalon | 3 | 04-12-2007 08:21 AM |
| default image editor | Demus | Vista General | 27 | 03-03-2007 06:32 PM |
| What's source of default Desktop Background photo | OscarVogel | Vista General | 1 | 07-10-2006 06:52 PM |
| TemplateBinding with Image Source Property | HolaMan | Avalon | 2 | 04-12-2006 10:02 PM |