Share via

Access level WPF

Brok 0 Reputation points
2023-04-03T15:29:21.28+00:00

I have a style file and I used animations in it. I want to put the name of the button on the page for (StopStoryboard) for (SourceName), but it gives an error


File Style :

<EventTrigger SourceName="Button_main" RoutedEvent="Mouse.MouseLeave">
                <StopStoryboard BeginStoryboardName="bsb1"/>
            </EventTrigger>
------------------------------------------------------
Grid :

<Button x:Name="sb" x:FieldModifier="public"/>
            
        </Button
Developer technologies | Windows Presentation Foundation
Developer technologies | C#
Developer technologies | C#

An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.


1 answer

Sort by: Most helpful
  1. Brok 0 Reputation points
    2023-04-03T15:36:05.3666667+00:00
    <EventTrigger SourceName="Button_main" RoutedEvent="Mouse.MouseLeave">
                    <StopStoryboard BeginStoryboardName="bsb1"/>
                </EventTrigger>
    ------------------------------------------------------
    Grid :
    
    <Button x:Name="Button_main" x:FieldModifier="public"/>
                
            </Button
    

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.