Click here to Skip to main content
15,925,781 members
Home / Discussions / WPF
   

WPF

 
AnswerRe: DataGrid Column Right Aligned Pin
Richard Deeming17-Nov-19 23:03
mveRichard Deeming17-Nov-19 23:03 
QuestionWPF C# Make window's the same width as the screen Pin
Acuena3-Nov-19 7:44
Acuena3-Nov-19 7:44 
AnswerRe: WPF C# Make window's the same width as the screen Pin
Richard MacCutchan3-Nov-19 21:45
mveRichard MacCutchan3-Nov-19 21:45 
AnswerRe: WPF C# Make window's the same width as the screen Pin
Richard Deeming3-Nov-19 22:28
mveRichard Deeming3-Nov-19 22:28 
GeneralRe: WPF C# Make window's the same width as the screen Pin
Acuena4-Nov-19 12:31
Acuena4-Nov-19 12:31 
GeneralRe: WPF C# Make window's the same width as the screen Pin
Mycroft Holmes4-Nov-19 18:42
professionalMycroft Holmes4-Nov-19 18:42 
GeneralRe: WPF C# Make window's the same width as the screen Pin
Gerry Schmitz5-Nov-19 5:25
mveGerry Schmitz5-Nov-19 5:25 
GeneralRe: WPF C# Make window's the same width as the screen Pin
Acuena8-Nov-19 5:21
Acuena8-Nov-19 5:21 
GeneralRe: WPF C# Make window's the same width as the screen Pin
Richard Deeming8-Nov-19 6:14
mveRichard Deeming8-Nov-19 6:14 
QuestionDataGrid with DataGridTemplateColumns - Cannot create new rows Pin
Mc_Topaz7-Oct-19 23:42
Mc_Topaz7-Oct-19 23:42 
AnswerRe: DataGrid with DataGridTemplateColumns - Cannot create new rows Pin
Gerry Schmitz8-Oct-19 3:11
mveGerry Schmitz8-Oct-19 3:11 
NewsRe: DataGrid with DataGridTemplateColumns - Cannot create new rows Pin
Mc_Topaz8-Oct-19 3:25
Mc_Topaz8-Oct-19 3:25 
QuestionWPF Pin
RajaMohammed.A3-Oct-19 22:29
RajaMohammed.A3-Oct-19 22:29 
AnswerRe: WPF Pin
Richard Deeming4-Oct-19 1:59
mveRichard Deeming4-Oct-19 1:59 
AnswerRe: WPF Pin
Richard MacCutchan4-Oct-19 3:22
mveRichard MacCutchan4-Oct-19 3:22 
AnswerRe: WPF Pin
Gerry Schmitz4-Oct-19 6:32
mveGerry Schmitz4-Oct-19 6:32 
Questionvb.net Pin
RajaMohammed.A20-Sep-19 21:27
RajaMohammed.A20-Sep-19 21:27 
AnswerRe: vb.net Pin
Richard MacCutchan21-Sep-19 2:58
mveRichard MacCutchan21-Sep-19 2:58 
Questionvb.net Pin
RajaMohammed.A20-Sep-19 20:09
RajaMohammed.A20-Sep-19 20:09 
AnswerRe: vb.net Pin
Richard MacCutchan20-Sep-19 21:07
mveRichard MacCutchan20-Sep-19 21:07 
AnswerRe: vb.net Pin
Mycroft Holmes21-Sep-19 12:48
professionalMycroft Holmes21-Sep-19 12:48 
QuestionHow to use DataTrigger to run Storyboard? Pin
Pew_new20-Sep-19 8:00
Pew_new20-Sep-19 8:00 
Helo everyone!

I have a Storyboard at Window resources as shown below.


XML
<Window.Resources>
    <!--  Storyboard as a window resource  -->
    <Storyboard
        x:Key="NB"
        x:Name="NB_resource"
        Completed="NB_resource_Completed"
        RepeatBehavior="5x">
        <ObjectAnimationUsingKeyFrames
            Storyboard.TargetName="NB_image"
            Storyboard.TargetProperty="Source"
            Duration="0:0:1.2">
            <DiscreteObjectKeyFrame KeyTime="0:0:0">
                <DiscreteObjectKeyFrame.Value>
                    <BitmapImage UriSource="pack://application:,,,/CircleSurrogateButton;component/Images/NB_00.png" />
                </DiscreteObjectKeyFrame.Value>
            </DiscreteObjectKeyFrame>
            <DiscreteObjectKeyFrame KeyTime="0:0:.3">
                <DiscreteObjectKeyFrame.Value>
                    <BitmapImage UriSource="pack://application:,,,/CircleSurrogateButton;component/Images/NB_01.png" />
                </DiscreteObjectKeyFrame.Value>
            </DiscreteObjectKeyFrame>

            <DiscreteObjectKeyFrame KeyTime="0:0:.6">
                <DiscreteObjectKeyFrame.Value>
                    <BitmapImage UriSource="pack://application:,,,/CircleSurrogateButton;component/Images/NB_02.png" />
                </DiscreteObjectKeyFrame.Value>
            </DiscreteObjectKeyFrame>
            <DiscreteObjectKeyFrame KeyTime="0:0:.9">
                <DiscreteObjectKeyFrame.Value>
                    <BitmapImage UriSource="pack://application:,,,/CircleSurrogateButton;component/Images/NB_03.png" />
                </DiscreteObjectKeyFrame.Value>
            </DiscreteObjectKeyFrame>
        </ObjectAnimationUsingKeyFrames>
    </Storyboard>
</Window.Resources>


The Storyboard can be started with the following string which is placed in regular Button.

XML
<EventTrigger RoutedEvent="PreviewMouseLeftButtonDown">
 <BeginStoryboard Storyboard="{DynamicResource NB}" />
 </EventTrigger>


A question is How to use a data binding in order to start that Storyboard.
For example:

XML
<DataTrigger Binding="{Binding Start_Storyboard}" Value="true">
        <DataTrigger.EnterActions>
            <BeginStoryboard Storyboard="{DynamicResource NB}"/>
        </DataTrigger.EnterActions>
 </DataTrigger>


I've tried to put DataTrigger at different places and I had got nothing besides red squiggles and exception while debugging.

Thanks in advance!
QuestionWPF Pin
RajaMohammed.A19-Sep-19 2:35
RajaMohammed.A19-Sep-19 2:35 
AnswerRe: WPF Pin
Richard Deeming19-Sep-19 2:58
mveRichard Deeming19-Sep-19 2:58 
AnswerRe: WPF Pin
Mycroft Holmes19-Sep-19 13:07
professionalMycroft Holmes19-Sep-19 13:07 

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.