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

ItemsControl inside of DockPanel

1 Answer 100 Views
DockPanel
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Tyler
Top achievements
Rank 1
Tyler asked on 24 Jun 2011, 09:37 PM

Can the ItemsControl work inside of the DockPanel ?   I'm trying to have the dice animimate a doc from the left side to the right when the "Saved" property changes.



<telerikPrimitives:RadDockPanel x:Name="radDockPanel" LastChildFill="True" Background="Red"
                                           IsAnimated="True" AnimationDuration="0:0:0.5">
               <telerikPrimitives:RadDockPanel.AnimationEasing>
                   <ElasticEase/>
               </telerikPrimitives:RadDockPanel.AnimationEasing>
 
               <ItemsControl ItemsSource="{Binding CurrentDice}" HorizontalAlignment="Left">
                   <ItemsControl.ItemTemplate>
                       <DataTemplate>
                           <Button Width="100" Height="100" BorderThickness="0" Background="{StaticResource diceBrush}" 
                                   Tag="{Binding Index}"  Content="{Binding FaceValue, Converter={StaticResource diceConverter}}"
                                   telerikPrimitives:RadDockPanel.Dock="{Binding Saved, Converter={StaticResource dockConverter}}">
                               <i:Interaction.Triggers>
                                   <i:EventTrigger EventName="Click">
                                       <cmd:EventToCommand Command="{Binding Source={StaticResource vm}, Path=SaveDiceCommand }"
                                   CommandParameter="{Binding}"     
                                   PassEventArgsToCommand="true" />
                                   </i:EventTrigger>
                               </i:Interaction.Triggers>
                           </Button>
                       </DataTemplate>
                   </ItemsControl.ItemTemplate>
               </ItemsControl>
           </telerikPrimitives:RadDockPanel>

1 Answer, 1 is accepted

Sort by
0
Deyan
Telerik team
answered on 30 Jun 2011, 08:44 AM
Hello Tyler,

Generally you should be able to put an ItemsControl in a DockPanel. If you, however, experience any difficulties in doing so, we would kindly like to ask you to prepare a sample project that demonstrates the scenario so that we can directly take a look at it and see how we can help.

Please note that you will have to open a new support ticket in order to be able to attach your project.

Thanks for your time.

Greetings,
Deyan
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
Tags
DockPanel
Asked by
Tyler
Top achievements
Rank 1
Answers by
Deyan
Telerik team
Share this question
or