Storyboard Triggers only once for second condition
up vote
3
down vote
favorite
I have a button on which Click, TextBlock MultiDataTrigger runs but on every button click it runs only twice.
Explaination: First Default TextBlock Text is Disconnected then there are two MultiDataTriggers out of which satisfies the condition runs and then after another MultiDataTrigger on again button click but after this no Storyboard animation works.
Textblock
<TextBlock x:Name="abctxt" Grid.Row="4" Grid.Column="0" Grid.ColumnSpan="2" HorizontalAlignment="Center" Text="Disconnected">
<TextBlock.Style>
<Style TargetType="TextBlock">
<Style.Triggers>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding ElementName=sbbtn, Path=IsPressed}" Value="True" />
<Condition Binding="{Binding ElementName=abctxt, Path=Text}" Value="Connected" />
</MultiDataTrigger.Conditions>
<MultiDataTrigger.EnterActions>
<BeginStoryboard Storyboard="{StaticResource DisconnectedTextChange}"/>
</MultiDataTrigger.EnterActions>
</MultiDataTrigger>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding ElementName=sbbtn, Path=IsPressed}" Value="True" />
<Condition Binding="{Binding ElementName=abctxt, Path=Text}" Value="Disconnected" />
</MultiDataTrigger.Conditions>
<MultiDataTrigger.EnterActions>
<BeginStoryboard Storyboard="{StaticResource ConnectedTextChange}"/>
</MultiDataTrigger.EnterActions>
</MultiDataTrigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
Button
<Button x:Name="sbbtn" />
Storyboard
<Storyboard x:Key="ConnectedTextChange" x:Name="ConnectedTextChange">
<StringAnimationUsingKeyFrames Storyboard.TargetProperty="(TextBlock.Text)" AccelerationRatio="1">
<DiscreteStringKeyFrame KeyTime="0:0:0.8" Value="Connected"/>
</StringAnimationUsingKeyFrames>
</Storyboard>
<Storyboard x:Key="DisconnectedTextChange" x:Name="DisconnectedTextChange">
<StringAnimationUsingKeyFrames Storyboard.TargetProperty="(TextBlock.Text)" AccelerationRatio="1">
<DiscreteStringKeyFrame KeyTime="0:0:0.8" Value="Disconnected"/>
</StringAnimationUsingKeyFrames>
</Storyboard>
c# wpf xaml storyboard
|
show 1 more comment
up vote
3
down vote
favorite
I have a button on which Click, TextBlock MultiDataTrigger runs but on every button click it runs only twice.
Explaination: First Default TextBlock Text is Disconnected then there are two MultiDataTriggers out of which satisfies the condition runs and then after another MultiDataTrigger on again button click but after this no Storyboard animation works.
Textblock
<TextBlock x:Name="abctxt" Grid.Row="4" Grid.Column="0" Grid.ColumnSpan="2" HorizontalAlignment="Center" Text="Disconnected">
<TextBlock.Style>
<Style TargetType="TextBlock">
<Style.Triggers>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding ElementName=sbbtn, Path=IsPressed}" Value="True" />
<Condition Binding="{Binding ElementName=abctxt, Path=Text}" Value="Connected" />
</MultiDataTrigger.Conditions>
<MultiDataTrigger.EnterActions>
<BeginStoryboard Storyboard="{StaticResource DisconnectedTextChange}"/>
</MultiDataTrigger.EnterActions>
</MultiDataTrigger>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding ElementName=sbbtn, Path=IsPressed}" Value="True" />
<Condition Binding="{Binding ElementName=abctxt, Path=Text}" Value="Disconnected" />
</MultiDataTrigger.Conditions>
<MultiDataTrigger.EnterActions>
<BeginStoryboard Storyboard="{StaticResource ConnectedTextChange}"/>
</MultiDataTrigger.EnterActions>
</MultiDataTrigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
Button
<Button x:Name="sbbtn" />
Storyboard
<Storyboard x:Key="ConnectedTextChange" x:Name="ConnectedTextChange">
<StringAnimationUsingKeyFrames Storyboard.TargetProperty="(TextBlock.Text)" AccelerationRatio="1">
<DiscreteStringKeyFrame KeyTime="0:0:0.8" Value="Connected"/>
</StringAnimationUsingKeyFrames>
</Storyboard>
<Storyboard x:Key="DisconnectedTextChange" x:Name="DisconnectedTextChange">
<StringAnimationUsingKeyFrames Storyboard.TargetProperty="(TextBlock.Text)" AccelerationRatio="1">
<DiscreteStringKeyFrame KeyTime="0:0:0.8" Value="Disconnected"/>
</StringAnimationUsingKeyFrames>
</Storyboard>
c# wpf xaml storyboard
It seems that the text is hold as “Connected” by the ConnectedTextChange Storyboard so the other Storyboard cannot change it back to “Disconnected”.
– kennyzx
Nov 24 at 4:36
@kennyzx have try this? Any suggestion, what should i do?
– Code Learner
Nov 24 at 8:39
do you have to use an animation (Storyboard)? Or do you just want to change the Text in response to the button click? By default, a Storyboard holds the final value when the Storyboard is completed.
– kennyzx
Nov 24 at 8:43
@kennyzx no! i have to use storyboard, actually i have a another control(Rectangle which slide through margins using storyboard) also which also have same condition as textblock but both textblock and rectangle begin storyboard only once
– Code Learner
Nov 24 at 8:54
@sachinshinde try my approach does same thing correctly.
– Shubham Sahu
Nov 27 at 9:27
|
show 1 more comment
up vote
3
down vote
favorite
up vote
3
down vote
favorite
I have a button on which Click, TextBlock MultiDataTrigger runs but on every button click it runs only twice.
Explaination: First Default TextBlock Text is Disconnected then there are two MultiDataTriggers out of which satisfies the condition runs and then after another MultiDataTrigger on again button click but after this no Storyboard animation works.
Textblock
<TextBlock x:Name="abctxt" Grid.Row="4" Grid.Column="0" Grid.ColumnSpan="2" HorizontalAlignment="Center" Text="Disconnected">
<TextBlock.Style>
<Style TargetType="TextBlock">
<Style.Triggers>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding ElementName=sbbtn, Path=IsPressed}" Value="True" />
<Condition Binding="{Binding ElementName=abctxt, Path=Text}" Value="Connected" />
</MultiDataTrigger.Conditions>
<MultiDataTrigger.EnterActions>
<BeginStoryboard Storyboard="{StaticResource DisconnectedTextChange}"/>
</MultiDataTrigger.EnterActions>
</MultiDataTrigger>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding ElementName=sbbtn, Path=IsPressed}" Value="True" />
<Condition Binding="{Binding ElementName=abctxt, Path=Text}" Value="Disconnected" />
</MultiDataTrigger.Conditions>
<MultiDataTrigger.EnterActions>
<BeginStoryboard Storyboard="{StaticResource ConnectedTextChange}"/>
</MultiDataTrigger.EnterActions>
</MultiDataTrigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
Button
<Button x:Name="sbbtn" />
Storyboard
<Storyboard x:Key="ConnectedTextChange" x:Name="ConnectedTextChange">
<StringAnimationUsingKeyFrames Storyboard.TargetProperty="(TextBlock.Text)" AccelerationRatio="1">
<DiscreteStringKeyFrame KeyTime="0:0:0.8" Value="Connected"/>
</StringAnimationUsingKeyFrames>
</Storyboard>
<Storyboard x:Key="DisconnectedTextChange" x:Name="DisconnectedTextChange">
<StringAnimationUsingKeyFrames Storyboard.TargetProperty="(TextBlock.Text)" AccelerationRatio="1">
<DiscreteStringKeyFrame KeyTime="0:0:0.8" Value="Disconnected"/>
</StringAnimationUsingKeyFrames>
</Storyboard>
c# wpf xaml storyboard
I have a button on which Click, TextBlock MultiDataTrigger runs but on every button click it runs only twice.
Explaination: First Default TextBlock Text is Disconnected then there are two MultiDataTriggers out of which satisfies the condition runs and then after another MultiDataTrigger on again button click but after this no Storyboard animation works.
Textblock
<TextBlock x:Name="abctxt" Grid.Row="4" Grid.Column="0" Grid.ColumnSpan="2" HorizontalAlignment="Center" Text="Disconnected">
<TextBlock.Style>
<Style TargetType="TextBlock">
<Style.Triggers>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding ElementName=sbbtn, Path=IsPressed}" Value="True" />
<Condition Binding="{Binding ElementName=abctxt, Path=Text}" Value="Connected" />
</MultiDataTrigger.Conditions>
<MultiDataTrigger.EnterActions>
<BeginStoryboard Storyboard="{StaticResource DisconnectedTextChange}"/>
</MultiDataTrigger.EnterActions>
</MultiDataTrigger>
<MultiDataTrigger>
<MultiDataTrigger.Conditions>
<Condition Binding="{Binding ElementName=sbbtn, Path=IsPressed}" Value="True" />
<Condition Binding="{Binding ElementName=abctxt, Path=Text}" Value="Disconnected" />
</MultiDataTrigger.Conditions>
<MultiDataTrigger.EnterActions>
<BeginStoryboard Storyboard="{StaticResource ConnectedTextChange}"/>
</MultiDataTrigger.EnterActions>
</MultiDataTrigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
Button
<Button x:Name="sbbtn" />
Storyboard
<Storyboard x:Key="ConnectedTextChange" x:Name="ConnectedTextChange">
<StringAnimationUsingKeyFrames Storyboard.TargetProperty="(TextBlock.Text)" AccelerationRatio="1">
<DiscreteStringKeyFrame KeyTime="0:0:0.8" Value="Connected"/>
</StringAnimationUsingKeyFrames>
</Storyboard>
<Storyboard x:Key="DisconnectedTextChange" x:Name="DisconnectedTextChange">
<StringAnimationUsingKeyFrames Storyboard.TargetProperty="(TextBlock.Text)" AccelerationRatio="1">
<DiscreteStringKeyFrame KeyTime="0:0:0.8" Value="Disconnected"/>
</StringAnimationUsingKeyFrames>
</Storyboard>
c# wpf xaml storyboard
c# wpf xaml storyboard
edited Nov 23 at 10:13
asked Nov 22 at 15:54
Code Learner
407
407
It seems that the text is hold as “Connected” by the ConnectedTextChange Storyboard so the other Storyboard cannot change it back to “Disconnected”.
– kennyzx
Nov 24 at 4:36
@kennyzx have try this? Any suggestion, what should i do?
– Code Learner
Nov 24 at 8:39
do you have to use an animation (Storyboard)? Or do you just want to change the Text in response to the button click? By default, a Storyboard holds the final value when the Storyboard is completed.
– kennyzx
Nov 24 at 8:43
@kennyzx no! i have to use storyboard, actually i have a another control(Rectangle which slide through margins using storyboard) also which also have same condition as textblock but both textblock and rectangle begin storyboard only once
– Code Learner
Nov 24 at 8:54
@sachinshinde try my approach does same thing correctly.
– Shubham Sahu
Nov 27 at 9:27
|
show 1 more comment
It seems that the text is hold as “Connected” by the ConnectedTextChange Storyboard so the other Storyboard cannot change it back to “Disconnected”.
– kennyzx
Nov 24 at 4:36
@kennyzx have try this? Any suggestion, what should i do?
– Code Learner
Nov 24 at 8:39
do you have to use an animation (Storyboard)? Or do you just want to change the Text in response to the button click? By default, a Storyboard holds the final value when the Storyboard is completed.
– kennyzx
Nov 24 at 8:43
@kennyzx no! i have to use storyboard, actually i have a another control(Rectangle which slide through margins using storyboard) also which also have same condition as textblock but both textblock and rectangle begin storyboard only once
– Code Learner
Nov 24 at 8:54
@sachinshinde try my approach does same thing correctly.
– Shubham Sahu
Nov 27 at 9:27
It seems that the text is hold as “Connected” by the ConnectedTextChange Storyboard so the other Storyboard cannot change it back to “Disconnected”.
– kennyzx
Nov 24 at 4:36
It seems that the text is hold as “Connected” by the ConnectedTextChange Storyboard so the other Storyboard cannot change it back to “Disconnected”.
– kennyzx
Nov 24 at 4:36
@kennyzx have try this? Any suggestion, what should i do?
– Code Learner
Nov 24 at 8:39
@kennyzx have try this? Any suggestion, what should i do?
– Code Learner
Nov 24 at 8:39
do you have to use an animation (Storyboard)? Or do you just want to change the Text in response to the button click? By default, a Storyboard holds the final value when the Storyboard is completed.
– kennyzx
Nov 24 at 8:43
do you have to use an animation (Storyboard)? Or do you just want to change the Text in response to the button click? By default, a Storyboard holds the final value when the Storyboard is completed.
– kennyzx
Nov 24 at 8:43
@kennyzx no! i have to use storyboard, actually i have a another control(Rectangle which slide through margins using storyboard) also which also have same condition as textblock but both textblock and rectangle begin storyboard only once
– Code Learner
Nov 24 at 8:54
@kennyzx no! i have to use storyboard, actually i have a another control(Rectangle which slide through margins using storyboard) also which also have same condition as textblock but both textblock and rectangle begin storyboard only once
– Code Learner
Nov 24 at 8:54
@sachinshinde try my approach does same thing correctly.
– Shubham Sahu
Nov 27 at 9:27
@sachinshinde try my approach does same thing correctly.
– Shubham Sahu
Nov 27 at 9:27
|
show 1 more comment
1 Answer
1
active
oldest
votes
up vote
1
down vote
accepted
Instead of checking textbox text or button pressed go with single condition IsChecked
,
Instead of using a simple Button
use ToggleButton
and apply your Button style on it.
You can use it like this way:
Your TextBlock
<TextBlock x:Name="abctxt" Text="Disconnected" />
ToggleButton
Instead of Button
<ToggleButton x:Name="sbbtn"> <!-- Also Apply Your Style For making your ToggleButton looks like your Button -->
<ToggleButton.Triggers>
<EventTrigger RoutedEvent="ToggleButton.Checked">
<BeginStoryboard Storyboard="{StaticResource ConnectedTextChange}" />
</EventTrigger>
<EventTrigger RoutedEvent="ToggleButton.Unchecked">
<BeginStoryboard Storyboard="{StaticResource DisconnectedTextChange}" />
</EventTrigger>
</ToggleButton.Triggers>
Your Storyboard
<!-- Here i set TargetName also -->
<Storyboard x:Key="ConnectedTextChange" x:Name="ConnectedTextChange" Storyboard.TargetName="abctxt">
<StringAnimationUsingKeyFrames Storyboard.TargetProperty="(TextBlock.Text)" AccelerationRatio="1">
<DiscreteStringKeyFrame KeyTime="0:0:0.8" Value="Connected"/>
</StringAnimationUsingKeyFrames>
<Storyboard x:Key="DisconnectedTextChange" x:Name="DisconnectedTextChange" Storyboard.TargetName="abctxt">
<StringAnimationUsingKeyFrames Storyboard.TargetProperty="(TextBlock.Text)" AccelerationRatio="1">
<DiscreteStringKeyFrame KeyTime="0:0:0.8" Value="Disconnected"/>
</StringAnimationUsingKeyFrames>
</Storyboard>
1
Thanks' its works as intended, also thanks for suggestion of using toggle button.
– Code Learner
Nov 27 at 9:57
@sachinshinde Glad it worked
– Shubham Sahu
Nov 27 at 9:58
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
Instead of checking textbox text or button pressed go with single condition IsChecked
,
Instead of using a simple Button
use ToggleButton
and apply your Button style on it.
You can use it like this way:
Your TextBlock
<TextBlock x:Name="abctxt" Text="Disconnected" />
ToggleButton
Instead of Button
<ToggleButton x:Name="sbbtn"> <!-- Also Apply Your Style For making your ToggleButton looks like your Button -->
<ToggleButton.Triggers>
<EventTrigger RoutedEvent="ToggleButton.Checked">
<BeginStoryboard Storyboard="{StaticResource ConnectedTextChange}" />
</EventTrigger>
<EventTrigger RoutedEvent="ToggleButton.Unchecked">
<BeginStoryboard Storyboard="{StaticResource DisconnectedTextChange}" />
</EventTrigger>
</ToggleButton.Triggers>
Your Storyboard
<!-- Here i set TargetName also -->
<Storyboard x:Key="ConnectedTextChange" x:Name="ConnectedTextChange" Storyboard.TargetName="abctxt">
<StringAnimationUsingKeyFrames Storyboard.TargetProperty="(TextBlock.Text)" AccelerationRatio="1">
<DiscreteStringKeyFrame KeyTime="0:0:0.8" Value="Connected"/>
</StringAnimationUsingKeyFrames>
<Storyboard x:Key="DisconnectedTextChange" x:Name="DisconnectedTextChange" Storyboard.TargetName="abctxt">
<StringAnimationUsingKeyFrames Storyboard.TargetProperty="(TextBlock.Text)" AccelerationRatio="1">
<DiscreteStringKeyFrame KeyTime="0:0:0.8" Value="Disconnected"/>
</StringAnimationUsingKeyFrames>
</Storyboard>
1
Thanks' its works as intended, also thanks for suggestion of using toggle button.
– Code Learner
Nov 27 at 9:57
@sachinshinde Glad it worked
– Shubham Sahu
Nov 27 at 9:58
add a comment |
up vote
1
down vote
accepted
Instead of checking textbox text or button pressed go with single condition IsChecked
,
Instead of using a simple Button
use ToggleButton
and apply your Button style on it.
You can use it like this way:
Your TextBlock
<TextBlock x:Name="abctxt" Text="Disconnected" />
ToggleButton
Instead of Button
<ToggleButton x:Name="sbbtn"> <!-- Also Apply Your Style For making your ToggleButton looks like your Button -->
<ToggleButton.Triggers>
<EventTrigger RoutedEvent="ToggleButton.Checked">
<BeginStoryboard Storyboard="{StaticResource ConnectedTextChange}" />
</EventTrigger>
<EventTrigger RoutedEvent="ToggleButton.Unchecked">
<BeginStoryboard Storyboard="{StaticResource DisconnectedTextChange}" />
</EventTrigger>
</ToggleButton.Triggers>
Your Storyboard
<!-- Here i set TargetName also -->
<Storyboard x:Key="ConnectedTextChange" x:Name="ConnectedTextChange" Storyboard.TargetName="abctxt">
<StringAnimationUsingKeyFrames Storyboard.TargetProperty="(TextBlock.Text)" AccelerationRatio="1">
<DiscreteStringKeyFrame KeyTime="0:0:0.8" Value="Connected"/>
</StringAnimationUsingKeyFrames>
<Storyboard x:Key="DisconnectedTextChange" x:Name="DisconnectedTextChange" Storyboard.TargetName="abctxt">
<StringAnimationUsingKeyFrames Storyboard.TargetProperty="(TextBlock.Text)" AccelerationRatio="1">
<DiscreteStringKeyFrame KeyTime="0:0:0.8" Value="Disconnected"/>
</StringAnimationUsingKeyFrames>
</Storyboard>
1
Thanks' its works as intended, also thanks for suggestion of using toggle button.
– Code Learner
Nov 27 at 9:57
@sachinshinde Glad it worked
– Shubham Sahu
Nov 27 at 9:58
add a comment |
up vote
1
down vote
accepted
up vote
1
down vote
accepted
Instead of checking textbox text or button pressed go with single condition IsChecked
,
Instead of using a simple Button
use ToggleButton
and apply your Button style on it.
You can use it like this way:
Your TextBlock
<TextBlock x:Name="abctxt" Text="Disconnected" />
ToggleButton
Instead of Button
<ToggleButton x:Name="sbbtn"> <!-- Also Apply Your Style For making your ToggleButton looks like your Button -->
<ToggleButton.Triggers>
<EventTrigger RoutedEvent="ToggleButton.Checked">
<BeginStoryboard Storyboard="{StaticResource ConnectedTextChange}" />
</EventTrigger>
<EventTrigger RoutedEvent="ToggleButton.Unchecked">
<BeginStoryboard Storyboard="{StaticResource DisconnectedTextChange}" />
</EventTrigger>
</ToggleButton.Triggers>
Your Storyboard
<!-- Here i set TargetName also -->
<Storyboard x:Key="ConnectedTextChange" x:Name="ConnectedTextChange" Storyboard.TargetName="abctxt">
<StringAnimationUsingKeyFrames Storyboard.TargetProperty="(TextBlock.Text)" AccelerationRatio="1">
<DiscreteStringKeyFrame KeyTime="0:0:0.8" Value="Connected"/>
</StringAnimationUsingKeyFrames>
<Storyboard x:Key="DisconnectedTextChange" x:Name="DisconnectedTextChange" Storyboard.TargetName="abctxt">
<StringAnimationUsingKeyFrames Storyboard.TargetProperty="(TextBlock.Text)" AccelerationRatio="1">
<DiscreteStringKeyFrame KeyTime="0:0:0.8" Value="Disconnected"/>
</StringAnimationUsingKeyFrames>
</Storyboard>
Instead of checking textbox text or button pressed go with single condition IsChecked
,
Instead of using a simple Button
use ToggleButton
and apply your Button style on it.
You can use it like this way:
Your TextBlock
<TextBlock x:Name="abctxt" Text="Disconnected" />
ToggleButton
Instead of Button
<ToggleButton x:Name="sbbtn"> <!-- Also Apply Your Style For making your ToggleButton looks like your Button -->
<ToggleButton.Triggers>
<EventTrigger RoutedEvent="ToggleButton.Checked">
<BeginStoryboard Storyboard="{StaticResource ConnectedTextChange}" />
</EventTrigger>
<EventTrigger RoutedEvent="ToggleButton.Unchecked">
<BeginStoryboard Storyboard="{StaticResource DisconnectedTextChange}" />
</EventTrigger>
</ToggleButton.Triggers>
Your Storyboard
<!-- Here i set TargetName also -->
<Storyboard x:Key="ConnectedTextChange" x:Name="ConnectedTextChange" Storyboard.TargetName="abctxt">
<StringAnimationUsingKeyFrames Storyboard.TargetProperty="(TextBlock.Text)" AccelerationRatio="1">
<DiscreteStringKeyFrame KeyTime="0:0:0.8" Value="Connected"/>
</StringAnimationUsingKeyFrames>
<Storyboard x:Key="DisconnectedTextChange" x:Name="DisconnectedTextChange" Storyboard.TargetName="abctxt">
<StringAnimationUsingKeyFrames Storyboard.TargetProperty="(TextBlock.Text)" AccelerationRatio="1">
<DiscreteStringKeyFrame KeyTime="0:0:0.8" Value="Disconnected"/>
</StringAnimationUsingKeyFrames>
</Storyboard>
answered Nov 27 at 9:23
Shubham Sahu
1,0831727
1,0831727
1
Thanks' its works as intended, also thanks for suggestion of using toggle button.
– Code Learner
Nov 27 at 9:57
@sachinshinde Glad it worked
– Shubham Sahu
Nov 27 at 9:58
add a comment |
1
Thanks' its works as intended, also thanks for suggestion of using toggle button.
– Code Learner
Nov 27 at 9:57
@sachinshinde Glad it worked
– Shubham Sahu
Nov 27 at 9:58
1
1
Thanks' its works as intended, also thanks for suggestion of using toggle button.
– Code Learner
Nov 27 at 9:57
Thanks' its works as intended, also thanks for suggestion of using toggle button.
– Code Learner
Nov 27 at 9:57
@sachinshinde Glad it worked
– Shubham Sahu
Nov 27 at 9:58
@sachinshinde Glad it worked
– Shubham Sahu
Nov 27 at 9:58
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53434537%2fstoryboard-triggers-only-once-for-second-condition%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
It seems that the text is hold as “Connected” by the ConnectedTextChange Storyboard so the other Storyboard cannot change it back to “Disconnected”.
– kennyzx
Nov 24 at 4:36
@kennyzx have try this? Any suggestion, what should i do?
– Code Learner
Nov 24 at 8:39
do you have to use an animation (Storyboard)? Or do you just want to change the Text in response to the button click? By default, a Storyboard holds the final value when the Storyboard is completed.
– kennyzx
Nov 24 at 8:43
@kennyzx no! i have to use storyboard, actually i have a another control(Rectangle which slide through margins using storyboard) also which also have same condition as textblock but both textblock and rectangle begin storyboard only once
– Code Learner
Nov 24 at 8:54
@sachinshinde try my approach does same thing correctly.
– Shubham Sahu
Nov 27 at 9:27