Hi,
In my WPF MVVM application I have a view with RadTabControl with 4 different TabItems.
I use the tabs to display 4 different categories of items
Visibility Property of each TabItem is bound to a property in my ViewModel.
Now if let say Tab1 and Tab4 are visible and Tab2 and Tab3 hidden I got gaps like this:
[ Tab 1 ] __________________ [ Tab 4] .
How to make all tab headers to move to the left like this:
[ Tab 1 ] [ Tab 4] __________________ .
(see pseudo-code below)
In my WPF MVVM application I have a view with RadTabControl with 4 different TabItems.
I use the tabs to display 4 different categories of items
Visibility Property of each TabItem is bound to a property in my ViewModel.
Now if let say Tab1 and Tab4 are visible and Tab2 and Tab3 hidden I got gaps like this:
[ Tab 1 ] __________________ [ Tab 4] .
How to make all tab headers to move to the left like this:
[ Tab 1 ] [ Tab 4] __________________ .
(see pseudo-code below)
<
telerik:RadTabControl
>
<
telerik:RadTabItem
Visibility
=
"{Binding Converter={StaticResource boolToVisibilityConverter}, Path=IsTab1Visible}"
>
<
telerik:RadTabItem.Header
>
<
TextBlock
>
<
TextBlock.Text
>
<
Binding
Path
=
"Tab1"
/>
</
TextBlock.Text
>
</
TextBlock
>
</
telerik:RadTabItem.Header
>
</
telerik:RadTabItem
>
<
telerik:RadTabItem
Visibility
=
"{Binding Converter={StaticResource boolToVisibilityConverter}, Path=IsTab2Visible}"
>
<
telerik:RadTabItem.Header
>
<
TextBlock
>
<
TextBlock.Text
>
<
Binding
Path
=
"Tab2"
/>
</
TextBlock.Text
>
</
TextBlock
>
</
telerik:RadTabItem.Header
>
</
telerik:RadTabItem
>
<
telerik:RadTabItem
Visibility
=
"{Binding Converter={StaticResource boolToVisibilityConverter}, Path=IsTab3Visible}"
>
<
telerik:RadTabItem.Header
>
<
TextBlock
>
<
TextBlock.Text
>
<
Binding
Path
=
"Tab3"
/>
</
TextBlock.Text
>
</
TextBlock
>
</
telerik:RadTabItem.Header
>
</
telerik:RadTabItem
>
<
telerik:RadTabItem
Visibility
=
"{Binding Converter={StaticResource boolToVisibilityConverter}, Path=IsTab4Visible}"
>
<
telerik:RadTabItem.Header
>
<
TextBlock
>
<
TextBlock.Text
>
<
Binding
Path
=
"Tab4"
/>
</
TextBlock.Text
>
</
TextBlock
>
</
telerik:RadTabItem.Header
>
</
telerik:RadTabItem
>
</
telerik:RadTabControl
>