Hi,
I have two TileViews on my page. First one "PhotoTiles" has MaximizeMode==One, Second one "SelectedPhotoTiles" has MaximizeMode="Zero"
When i drag foto's from PhotoTiles to SelectedPhotoTiles, the photo on the tile is not shown as i drag. But when i drag tile from SelectedPhotoTiles to PhotoTiles, the photo on the tyle is shown as i drag. When i switch the maximize properties between the two, i see exactly the opposite... This makes me thing there is a bug in the code when you drag a tile from a TileView with MaximizeMode==One
This are the templates:
The code i use for dragging is (taken from a telerik sample):
Is this a bug, or am i missing something?
I have two TileViews on my page. First one "PhotoTiles" has MaximizeMode==One, Second one "SelectedPhotoTiles" has MaximizeMode="Zero"
When i drag foto's from PhotoTiles to SelectedPhotoTiles, the photo on the tile is not shown as i drag. But when i drag tile from SelectedPhotoTiles to PhotoTiles, the photo on the tyle is shown as i drag. When i switch the maximize properties between the two, i see exactly the opposite... This makes me thing there is a bug in the code when you drag a tile from a TileView with MaximizeMode==One
<
telerik:RadTileView
x:Name
=
"PhotoTiles"
ItemsSource
=
"{Binding Photos, Mode=OneWay}"
TilesStateChanged
=
"RadTileViewTilesStateChanged"
Grid.Row
=
"1"
PreservePositionWhenMaximized
=
"True"
telerik:TileViewPanel.IsVirtualized
=
"True"
IsAutoScrollingEnabled
=
"True"
MinimizedColumnWidth
=
"180"
MinimizedRowHeight
=
"155"
RowHeight
=
" 155"
ColumnWidth
=
"180"
ColumnsCount
=
"5"
ContentTemplate
=
"{StaticResource PhotoTemplate}"
ItemTemplate
=
"{StaticResource PhotoHeaderTemplate}"
MaximizeMode
=
"One"
MinimizedItemsPosition
=
"Bottom"
SelectionMode
=
"Extended"
IsSelectionEnabled
=
"True"
>
<
telerik:RadTileView
x:Name
=
"SelectedPhotoTiles"
ItemsSource
=
"{Binding SelectedPhotos, Mode=OneWay}"
PreservePositionWhenMaximized
=
"True"
telerik:TileViewPanel.IsVirtualized
=
"True"
IsAutoScrollingEnabled
=
"True"
TileStateChangeTrigger
=
"SingleClick"
MinimizedColumnWidth
=
"180"
MinimizedRowHeight
=
"155"
RowHeight
=
" 155"
ColumnWidth
=
"180"
RowsCount
=
"1"
ContentTemplate
=
"{StaticResource PhotoTemplate}"
ItemTemplate
=
"{StaticResource PhotoHeaderTemplate}"
MaximizeMode
=
"Zero"
MinimizedItemsPosition
=
"Bottom"
SelectionChanged
=
"SelectedPhotoTiles_SelectionChanged"
SelectionMode
=
"Extended"
IsSelectionEnabled
=
"True"
>
<
DataTemplate
x:Key
=
"PhotoHeaderTemplate"
>
<
TextBlock
Text
=
"{Binding Description}"
/>
</
DataTemplate
>
<
tileview:TileToFluideStateConverter
x:Key
=
"tileConverter"
/>
<
DataTemplate
x:Key
=
"PhotoTemplate"
>
<
telerik:RadFluidContentControl
ContentChangeMode
=
"Manual"
TransitionDuration
=
"0:0:.5"
State
=
"{Binding State, Converter={StaticResource tileConverter}}"
>
<
telerik:RadFluidContentControl.SmallContent
>
<
Image
Source
=
"{Binding Image}"
Stretch
=
"Uniform"
/>
</
telerik:RadFluidContentControl.SmallContent
>
<
telerik:RadFluidContentControl.Content
>
<
Image
Source
=
"{Binding Image}"
Stretch
=
"Uniform"
/>
</
telerik:RadFluidContentControl.Content
>
<
telerik:RadFluidContentControl.LargeContent
>
<
Image
Source
=
"{Binding Image}"
/>
</
telerik:RadFluidContentControl.LargeContent
>
</
telerik:RadFluidContentControl
>
</
DataTemplate
>
The code i use for dragging is (taken from a telerik sample):
private void OnDragQuery(object sender, DragDropQueryEventArgs e)
{
if (e.Options.Status == DragStatus.DragQuery)
{
RadTileViewItem draggedItem = e.Options.Source as RadTileViewItem;
RadTileViewItem tile = new RadTileViewItem();
tile.Header = (e.Options.Source.DataContext as Model.Photo).Description;
tile.Width = 185;
tile.Height = 155;
ContentControl dragCue = new ContentControl();
dragCue.Content = tile;
e.Options.DragCue = dragCue;
}
e.QueryResult = true;
e.Handled = true;
}
Is this a bug, or am i missing something?