This is a migrated thread and some comments may be shown as answers.

TransitionControl in DomainUpDown

3 Answers 71 Views
TransitionControl
This is a migrated thread and some comments may be shown as answers.
Rav
Top achievements
Rank 2
Rav asked on 08 Apr 2010, 11:41 AM
Hi Telerik,

I have the following DomainUpDown control

<inputToolkit:DomainUpDown x:Name="UpDownControl_Meter" IsEditable="False" SpinnerStyle="{StaticResource ButtonSpinnerHorizontalStyle}"  
                                       Background="White" ValueChanged="UpDownControl_Meter_ValueChanged" Height="160" BorderBrush="{StaticResource LightGray}"
                <inputToolkit:DomainUpDown.ItemTemplate> 
                    <DataTemplate> 
                        <StackPanel VerticalAlignment="Top" Margin="10"
                            <StackPanel.Resources> 
                                <Style TargetType="TextBlock"
                                    <Setter Property="FontFamily" Value="Arial"/> 
                                    <Setter Property="Foreground" Value="{StaticResource DarkGray}"/> 
                                    <Setter Property="FontSize" Value="12" /> 
                                </Style> 
                            </StackPanel.Resources> 
                            <TextBlock FontWeight="Bold" FontSize="15" Text="{Binding Name}" Foreground="{StaticResource SpruceGreen}" Margin="0 0 0 5" /> 
                            <Grid> 
                                <Grid.ColumnDefinitions> 
                                    <ColumnDefinition Width="Auto"/> 
                                    <ColumnDefinition Width="*"/> 
                                </Grid.ColumnDefinitions> 
                                <Grid.RowDefinitions> 
                                    <RowDefinition /> 
                                    <RowDefinition /> 
                                    <RowDefinition /> 
                                    <RowDefinition /> 
                                    <RowDefinition /> 
                                    <RowDefinition /> 
                                </Grid.RowDefinitions> 
                                <TextBlock Text="{Binding Objects[0].ObjectName}" Margin="0,2.5" /> 
                                <TextBlock Text="{Binding Objects[0].ObjectValueString}" Grid.Column="1" Margin="20,0,0,0" HorizontalAlignment="Right" VerticalAlignment="Center" /> 
                                <TextBlock Text="{Binding Objects[1].ObjectName}" Grid.Row="1" Margin="0,2.5" /> 
                                <TextBlock Text="{Binding Objects[1].ObjectValueString}" Grid.Row="1" Grid.Column="1" Margin="20,0,0,0" HorizontalAlignment="Right" VerticalAlignment="Center"/> 
                                <TextBlock Text="{Binding Objects[2].ObjectName}" Grid.Row="2" Margin="0,2.5" /> 
                                <TextBlock Text="{Binding Objects[2].ObjectValueString}" Grid.Row="2" Grid.Column="1" Margin="20,0,0,0" HorizontalAlignment="Right" VerticalAlignment="Center" /> 
                                <TextBlock Text="{Binding Objects[3].ObjectName}" Grid.Row="3" Margin="0,2.5" /> 
                                <TextBlock Text="{Binding Objects[3].ObjectValueString}" Grid.Row="3" Grid.Column="1" Margin="20,0,0,0" HorizontalAlignment="Right" VerticalAlignment="Center" /> 
                                <TextBlock Text="{Binding Objects[4].ObjectName}" Grid.Row="4" Margin="0,2.5" /> 
                                <TextBlock Text="{Binding Objects[4].ObjectValueString}" Grid.Row="4" Grid.Column="1" Margin="20,0,0,0" HorizontalAlignment="Right" VerticalAlignment="Center" /> 
                                <TextBlock Text="{Binding Objects[5].ObjectName}" Grid.Row="5" Margin="0,2.5" /> 
                                <TextBlock Text="{Binding Objects[5].ObjectValueString}" Grid.Row="5" Grid.Column="1" Margin="20,0,0,0" HorizontalAlignment="Right" VerticalAlignment="Center" /> 
                                <!--<TextBlock Text="Power Factor:" Grid.Row="4" Margin="0,1" /> 
                                    <TextBlock Text="x.x pf" Grid.Row="4" Grid.Column="1" Margin="20,0,0,0" HorizontalAlignment="Right" VerticalAlignment="Center" />--> 
                            </Grid> 
                        </StackPanel> 
                    </DataTemplate> 
                </inputToolkit:DomainUpDown.ItemTemplate> 
            </inputToolkit:DomainUpDown> 

And the controltemplate as follows:

<ControlTemplate TargetType="inputToolkit:ButtonSpinner"
<Grid> 
<Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}"
                                <Grid> 
                                    <Grid.ColumnDefinitions> 
                                        <ColumnDefinition Width="Auto"/> 
                                        <ColumnDefinition Width="*"/> 
                                        <ColumnDefinition Width="Auto"/> 
                                    </Grid.ColumnDefinitions> 
                                    <telerik:RadTransitionControl Content="{TemplateBinding Content}"  
                                                                  Grid.Column="1"  
                                                                  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"  
                                                                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                        <telerik:RadTransitionControl.Transition> 
                                            <telerikTransitions:FadeTransition /> 
                                        </telerik:RadTransitionControl.Transition>                           
                                    </telerik:RadTransitionControl> 
                                    <!--<ContentPresenter Grid.Column="1"  
                                        HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"  
                                        VerticalAlignment="{TemplateBinding VerticalContentAlignment}"  
                                        Content="{TemplateBinding Content}" IsHitTestVisible="False"/>--> 
                                    <Rectangle Grid.Column="1" > 
                                        <Rectangle.Fill> 
                                            <SolidColorBrush Color="Transparent"/> 
                                        </Rectangle.Fill> 
                                    </Rectangle> 
                                    <Button Grid.Column="0" IsTabStop="False" IsHitTestVisible="True"
                                        <Button.Template> 
                                            <ControlTemplate TargetType="Button"
                                                <Grid Background="Transparent" /> 
                                            </ControlTemplate> 
                                        </Button.Template> 
                                    </Button> 
                                    <Button Grid.Column="2" IsTabStop="False" IsHitTestVisible="True"
                                        <Button.Template> 
                                            <ControlTemplate TargetType="Button"
                                                <Grid Background="Transparent" /> 
                                            </ControlTemplate> 
                                        </Button.Template> 
                                    </Button> 
                                    <RepeatButton Grid.Column="0" Width="20" IsTabStop="False" Template="{StaticResource IncreaseButtonTemplate}" x:Name="IncreaseButton" ClickMode="Press"/> 
                                    <RepeatButton Grid.Column="2" Width="20" IsTabStop="False" Template="{StaticResource DecreaseButtonTemplate}" x:Name="DecreaseButton" ClickMode="Press"/> 
                                </Grid> 
                            </Border> 
</Grid> 

My transition does not work, is there something I'm doing wrong?

Thanks

Rav


3 Answers, 1 is accepted

Sort by
0
Miroslav Nedyalkov
Telerik team
answered on 13 Apr 2010, 12:49 PM
Hi Rav,

 What do you mean by it doesn't work? The transition is not applied, the content is not changed or an exception is thrown? If you could send us a sample project that reproduces the issue it would be very helpful.

All the best,
Miroslav Nedyalkov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Rav
Top achievements
Rank 2
answered on 13 Apr 2010, 11:46 PM
Sorry for not being clear, the transition effect does not happen, the content does change.

Regards

Rav
0
Miroslav Nedyalkov
Telerik team
answered on 19 Apr 2010, 12:47 PM
Hello Rav,

 Could you please send us a sample project that reproduces the issue? This would help us a lot to find out what the problem is.

Regards,
Miroslav Nedyalkov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
TransitionControl
Asked by
Rav
Top achievements
Rank 2
Answers by
Miroslav Nedyalkov
Telerik team
Rav
Top achievements
Rank 2
Share this question
or