Hi I am using 2011.1.419 version.
Bugs i found:
1, the position property is not behaving correctly. I am expecting the order of items will be 1-7 (even some of them are hidden), but it is not.
2, if you remove binding to Position property and hardcode all items' position from 1 - 7 (or 0 - 6), application will blew up.
3, if you remove binding and use following code in RadTileView, you will find one tile (t6) is missing
Please run this code
xaml:
cs:
Bugs i found:
1, the position property is not behaving correctly. I am expecting the order of items will be 1-7 (even some of them are hidden), but it is not.
2, if you remove binding to Position property and hardcode all items' position from 1 - 7 (or 0 - 6), application will blew up.
3, if you remove binding and use following code in RadTileView, you will find one tile (t6) is missing
<
telerik:RadTileViewItem
Header
=
"t1"
Visibility
=
"Collapsed"
/>
<
telerik:RadTileViewItem
Header
=
"t2"
Visibility
=
"Visible"
/>
<
telerik:RadTileViewItem
Header
=
"t3"
Visibility
=
"Collapsed"
/>
<
telerik:RadTileViewItem
Header
=
"t4"
Visibility
=
"Visible"
/>
<
telerik:RadTileViewItem
Header
=
"t5"
Visibility
=
"Collapsed"
/>
<
telerik:RadTileViewItem
Header
=
"t6"
Visibility
=
"Visible"
/>
<
telerik:RadTileViewItem
Header
=
"t7"
Visibility
=
"Collapsed"
/>
Please run this code
xaml:
<
UserControl
x:Class
=
"SilverlightApp.RadTileView.RadTileViewInTabControl"
xmlns:telerik
=
"clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation"
mc:Ignorable
=
"d"
d:DesignHeight
=
"300"
d:DesignWidth
=
"400"
>
<
UserControl.Resources
>
<
DataTemplate
x:Key
=
"itemTemplate"
>
<
telerik:RadTileView
MinimizedColumnWidth
=
"120"
PreservePositionWhenMaximized
=
"True"
DataContext
=
"{Binding Path=Value}"
>
<
telerik:RadTileViewItem
Header
=
"t1"
Position
=
"{Binding Path=Position1, Mode=TwoWay}"
Visibility
=
"Visible"
/>
<
telerik:RadTileViewItem
Header
=
"t2"
Position
=
"{Binding Path=Position2, Mode=TwoWay}"
Visibility
=
"Visible"
/>
<
telerik:RadTileViewItem
Header
=
"t3"
Position
=
"{Binding Path=Position3, Mode=TwoWay}"
Visibility
=
"Collapsed"
/>
<
telerik:RadTileViewItem
Header
=
"t4"
Position
=
"{Binding Path=Position4, Mode=TwoWay}"
Visibility
=
"Visible"
/>
<
telerik:RadTileViewItem
Header
=
"t5"
Position
=
"{Binding Path=Position5, Mode=TwoWay}"
Visibility
=
"Collapsed"
/>
<
telerik:RadTileViewItem
Header
=
"t6"
Position
=
"{Binding Path=Position6, Mode=TwoWay}"
Visibility
=
"Visible"
/>
<
telerik:RadTileViewItem
Header
=
"t7"
Position
=
"{Binding Path=Position7, Mode=TwoWay}"
Visibility
=
"Collapsed"
/>
</
telerik:RadTileView
>
</
DataTemplate
>
<
DataTemplate
x:Key
=
"headerTemplate"
>
<
ContentPresenter
Content
=
"{Binding Path=Key}"
/>
</
DataTemplate
>
<
Style
x:Key
=
"itemStyle"
TargetType
=
"telerik:RadTabItem"
>
<
Setter
Property
=
"HeaderTemplate"
Value
=
"{StaticResource headerTemplate}"
/>
<
Setter
Property
=
"ContentTemplate"
Value
=
"{StaticResource itemTemplate}"
/>
</
Style
>
</
UserControl.Resources
>
<
Grid
x:Name
=
"LayoutRoot"
Background
=
"White"
>
<
telerik:RadTabControl
ItemsSource
=
"{Binding}"
ItemContainerStyle
=
"{StaticResource itemStyle}"
>
</
telerik:RadTabControl
>
</
Grid
>
</
UserControl
>
cs:
using
System.Collections.Generic;
using
System.Windows.Controls;
namespace
SilverlightApp.RadTileView
{
using
GalaSoft.MvvmLight;
public
partial
class
RadTileViewInTabControl : UserControl
{
public
RadTileViewInTabControl()
{
InitializeComponent();
DataContext =
new
Dictionary<
object
,
object
>
{
{
"111"
,
new
TileViewVm() },
{
"222"
,
"content 22"
},
};
}
}
public
class
TileViewVm : ViewModelBase
{
private
int
_position1;
public
int
Position1
{
get
{
return
_position1; }
set
{
if
(_position1 == value)
{
return
;
}
_position1 = value;
RaisePropertyChanged(
"Position1"
);
}
}
private
int
_position2;
public
int
Position2
{
get
{
return
_position2; }
set
{
if
(_position2 == value)
{
return
;
}
_position2 = value;
RaisePropertyChanged(
"Position2"
);
}
}
private
int
_position3;
public
int
Position3
{
get
{
return
_position3; }
set
{
if
(_position3 == value)
{
return
;
}
_position3 = value;
RaisePropertyChanged(
"Position3"
);
}
}
private
int
_position4;
public
int
Position4
{
get
{
return
_position4; }
set
{
if
(_position4 == value)
{
return
;
}
_position4 = value;
RaisePropertyChanged(
"Position4"
);
}
}
private
int
_position5;
public
int
Position5
{
get
{
return
_position5; }
set
{
if
(_position5 == value)
{
return
;
}
_position5 = value;
RaisePropertyChanged(
"Position5"
);
}
}
private
int
_position6;
public
int
Position6
{
get
{
return
_position6; }
set
{
if
(_position6 == value)
{
return
;
}
_position6 = value;
RaisePropertyChanged(
"Position6"
);
}
}
private
int
_position7;
public
int
Position7
{
get
{
return
_position7; }
set
{
if
(_position7 == value)
{
return
;
}
_position7 = value;
RaisePropertyChanged(
"Position7"
);
}
}
}
}