TransitionControl in DomainUpDown

4 posts, 0 answers
  1. Rav
    Rav avatar
    36 posts
    Member since:
    Nov 2011

    Posted 08 Apr 2010 Link to this post

    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


  2. Miroslav Nedyalkov
    Admin
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 13 Apr 2010 Link to this post

    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.
  3. DevCraft banner
  4. Rav
    Rav avatar
    36 posts
    Member since:
    Nov 2011

    Posted 13 Apr 2010 Link to this post

    Sorry for not being clear, the transition effect does not happen, the content does change.

    Regards

    Rav
  5. Miroslav Nedyalkov
    Admin
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 19 Apr 2010 Link to this post

    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.
Back to Top