Click here to Skip to main content
15,883,835 members
Home / Discussions / WPF
   

WPF

 
AnswerRe: how to access cell template control's in listview in wpf Pin
Varsha Ramnani1-Dec-13 23:15
professionalVarsha Ramnani1-Dec-13 23:15 
GeneralRe: how to access cell template control's in listview in wpf Pin
dharmaa.m2-Dec-13 0:32
dharmaa.m2-Dec-13 0:32 
GeneralRe: how to access cell template control's in listview in wpf Pin
Varsha Ramnani2-Dec-13 1:10
professionalVarsha Ramnani2-Dec-13 1:10 
QuestionHow to send the parent name when we click on chlid Pin
Ashfaque Hussain29-Nov-13 3:41
Ashfaque Hussain29-Nov-13 3:41 
QuestionCreate two window by silverlight for windows embeded compact7 os Pin
yingkou21-Nov-13 2:09
yingkou21-Nov-13 2:09 
AnswerRe: Create two window by silverlight for windows embeded compact7 os Pin
Mycroft Holmes21-Nov-13 11:48
professionalMycroft Holmes21-Nov-13 11:48 
GeneralRe: Create two window by silverlight for windows embeded compact7 os Pin
yingkou23-Nov-13 18:02
yingkou23-Nov-13 18:02 
QuestionTrouble with MultiTrigger and IsMouseOver property Pin
t2b18-Nov-13 10:28
t2b18-Nov-13 10:28 
Hi,

I'm working at a custom control in WPF. This control should work as menu with buttons. The buttons are on left side of the window (4..5 one below the other) and realized by rectangles.

At the first time I used triggers with setters to set the colors of the rectangle
( Button Enabled = DarkBlue,
Button Disabled = LightBlue,
MouseOver = MiddleBlue).

This worked fine for every button. If the mouse was over the enabled buttons, the button color became middleblue and by leaving the button, the button became darkblue. The disabled button was always lightblue. If I switched the buttons from enable to disable, the previous button became dark blue and the IsMouseOver works again.

But now, I decided to animate the rectangles by color transition. Now I'm using the MultiTrigger to animate the color transition. But it doesn't work. When starting the application the button at the top is disabled. If I click the next button under the button at the top, the clicked button becomes disable (lightblue) and the top button becomes enabled (darkblue). Now the IsMouseOver property doesn't work for the first button in the top. But it works already for the buttons I never clicked.
I think, that the disabled button, which becomes enable again, ignores the MouseOver property. How can I solve this problem? Confused | :confused:

Here is the code:
XML
<!-- Set properties when mouse pointer is over the button. -->
                          <MultiTrigger> 
                            <MultiTrigger.Conditions>
                                <Condition Property="IsEnabled" Value="True" /> 
                                <Condition Property="IsMouseOver" Value="True" />
                            </MultiTrigger.Conditions>

                            <!-- Happens when the mouse cursor enter the button area -->
                            <MultiTrigger.EnterActions>
                                <BeginStoryboard>
                                    <Storyboard>
                                        <!-- rectangle - changing color to middle blue -->
                                        <ColorAnimation     Storyboard.TargetName="rightRectangle" 
                                                            Storyboard.TargetProperty="(Rectangle.Fill).Color"  
                                                            To="{StaticResource colorMiddleBlue}" 
                                                            Duration="0:0:0.25" />
                                    </Storyboard>
                                </BeginStoryboard>
                            </MultiTrigger.EnterActions>
                              
                            <!-- Happens when the mouse cursor leaves the button -->
                            <MultiTrigger.ExitActions>
                                <BeginStoryboard>
                                    <Storyboard>
                                        <ColorAnimation     Storyboard.TargetName="rightRectangle" 
                                                            Storyboard.TargetProperty="(Rectangle.Fill).Color"  
                                                            To="{StaticResource colorDarkBlue}" 
                                                            Duration="0:0:0.20" />
                                        </Storyboard>
                                    </BeginStoryboard>
                                </MultiTrigger.ExitActions> 
                              
                            </MultiTrigger>

                        <!-- Disabled Button-->
                        <MultiTrigger>
                            <MultiTrigger.Conditions>
                                <Condition Property="IsEnabled"  Value="False"/>
                            </MultiTrigger.Conditions>

                            <MultiTrigger.EnterActions>
                                <BeginStoryboard>
                                    <Storyboard>
                                        <ColorAnimation     Storyboard.TargetName="rightRectangle" 
                                                            Storyboard.TargetProperty="(Rectangle.Fill).Color"
                                                            Duration="0:0:0.15"
                                                            To="{StaticResource colorLightBlue}" />
                                    </Storyboard>
                                </BeginStoryboard>
                            </MultiTrigger.EnterActions>
                            <MultiTrigger.ExitActions>
                                <BeginStoryboard>
                                    <Storyboard>
                                        <ColorAnimation     Storyboard.TargetName="rightRectangle" 
                                                            Storyboard.TargetProperty="(Rectangle.Fill).Color" 
                                                            Duration="0:0:0.15"
                                                            To="{StaticResource colorDarkBlue}" />
                                    </Storyboard>
                                </BeginStoryboard>
                            </MultiTrigger.ExitActions>
                        </MultiTrigger>

QuestionScroll Bar is not showing Pin
Ashfaque Hussain18-Nov-13 1:56
Ashfaque Hussain18-Nov-13 1:56 
AnswerRe: Scroll Bar is not showing Pin
t2b19-Nov-13 1:22
t2b19-Nov-13 1:22 
GeneralRe: Scroll Bar is not showing Pin
Ashfaque Hussain19-Nov-13 2:30
Ashfaque Hussain19-Nov-13 2:30 
GeneralRe: Scroll Bar is not showing Pin
t2b19-Nov-13 19:57
t2b19-Nov-13 19:57 
QuestionDisplaying border after adding Opacity mask for the image Pin
gourav852412-Nov-13 20:31
gourav852412-Nov-13 20:31 
AnswerRe: Displaying border after adding Opacity mask for the image Pin
RedDk16-Nov-13 11:00
RedDk16-Nov-13 11:00 
QuestionCombobox data wont update WPF MVVM Pin
LiquidHolic12-Nov-13 16:18
LiquidHolic12-Nov-13 16:18 
AnswerRe: Combobox data wont update WPF MVVM Pin
karthikeyal8712-Nov-13 22:58
karthikeyal8712-Nov-13 22:58 
GeneralRe: Combobox data wont update WPF MVVM Pin
LiquidHolic13-Nov-13 2:09
LiquidHolic13-Nov-13 2:09 
GeneralRe: Combobox data wont update WPF MVVM Pin
SledgeHammer0113-Nov-13 4:53
SledgeHammer0113-Nov-13 4:53 
GeneralRe: Combobox data wont update WPF MVVM Pin
LiquidHolic13-Nov-13 13:42
LiquidHolic13-Nov-13 13:42 
GeneralRe: Combobox data wont update WPF MVVM Pin
SledgeHammer0113-Nov-13 15:32
SledgeHammer0113-Nov-13 15:32 
GeneralRe: Combobox data wont update WPF MVVM Pin
LiquidHolic13-Nov-13 18:47
LiquidHolic13-Nov-13 18:47 
GeneralRe: Combobox data wont update WPF MVVM Pin
SledgeHammer0114-Nov-13 10:16
SledgeHammer0114-Nov-13 10:16 
GeneralRe: Combobox data wont update WPF MVVM Pin
LiquidHolic14-Nov-13 14:25
LiquidHolic14-Nov-13 14:25 
GeneralRe: Combobox data wont update WPF MVVM Pin
Pete O'Hanlon14-Nov-13 19:38
mvePete O'Hanlon14-Nov-13 19:38 
GeneralRe: Combobox data wont update WPF MVVM Pin
LiquidHolic14-Nov-13 19:54
LiquidHolic14-Nov-13 19:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.