Hello,
I have two radlistboxes in my user control.
I need on dragging to hide (make invisible) the item in source radlistbox and keep showing up the dragged item at the same time.
If I make the source item to be invisible, the dragged item is also becomes invisible.
Is there any solution to this issue ?
This is the styles of radlistbox and radlistbox item I use :
<Style x:Key="RadListBoxStyle1" TargetType="{x:Type telerik:RadListBox}">
<Setter Property="telerik:ScrollingSettingsBehavior.IsEnabled" Value="True"/>
<Setter Property="telerik:ScrollingSettingsBehavior.ScrollAreaPadding" Value="30"/>
<Setter Property="telerik:ScrollingSettingsBehavior.ScrollStep" Value="24"/>
<Setter Property="telerik:ScrollingSettingsBehavior.ScrollStepTime" Value="0:0:0.05"/>
<Setter Property="Padding" Value="0"/>
<Setter Property="Background" Value="Transparent"/>
<Setter Property="Foreground" Value="Black"/>
<Setter Property="HorizontalContentAlignment" Value="Left"/>
<Setter Property="VerticalContentAlignment" Value="Top"/>
<Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
<Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="ScrollViewer.CanContentScroll" Value="True"/>
<Setter Property="KeyboardNavigation.TabNavigation" Value="Once"/>
<Setter Property="BorderBrush" Value="#FF848484"/>
<Setter Property="ItemsPanel">
<Setter.Value>
<ItemsPanelTemplate>
<VirtualizingStackPanel IsItemsHost="True"/>
</ItemsPanelTemplate>
</Setter.Value>
</Setter>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type telerik:RadListBox}">
<Grid>
<ScrollViewer x:Name="PART_ScrollViewer" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}" IsTabStop="False" Margin="0" Padding="{TemplateBinding Padding}" VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}">
<telerik:StyleManager.Theme>
<telerik:Expression_DarkTheme/>
</telerik:StyleManager.Theme>
<ItemsPresenter/>
</ScrollViewer>
<ContentPresenter x:Name="PART_DropVisualPlaceholder" HorizontalAlignment="Stretch" Visibility="Collapsed" VerticalAlignment="Stretch"/>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="CustomRadListBoxItemStyle" TargetType="telerik:RadListBoxItem">
<Setter Property="Padding" Value="0" />
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
<Setter Property="VerticalContentAlignment" Value="Top" />
<Setter Property="Background" Value="Transparent" />
<Setter Property="BorderBrush" Value="Transparent" />
<Setter Property="IsSelected" Value="{Binding IsSelected,UpdateSourceTrigger=PropertyChanged,Mode=TwoWay}"/>
<Setter Property="BorderThickness" Value="0" />
<Setter Property="telerik:DragDropManager.AllowDrag" Value="True"/>
<Setter Property="telerik:DragDropManager.AllowCapturedDrag" Value="True"/>
<Setter Property="telerik:DragDropManager.TouchDragTrigger" Value="TapDown"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="telerik:RadListBoxItem">
<Grid>
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal" />
<VisualState x:Name="MouseOver">
<Storyboard>
<DoubleAnimation Duration="0" Storyboard.TargetName="MouseOverVisual" Storyboard.TargetProperty="Opacity" To="1" />
</Storyboard>
</VisualState>
<VisualState x:Name="Disabled">
<Storyboard>
<DoubleAnimation Duration="0" Storyboard.TargetName="contentPresenter" Storyboard.TargetProperty="Opacity" To="0.5" />
</Storyboard>
</VisualState>
</VisualStateGroup>
<VisualStateGroup x:Name="SelectionStates">
<VisualState x:Name="Unselected" />
<VisualState x:Name="Selected">
<Storyboard>
<DoubleAnimation Duration="0" Storyboard.TargetName="SelectedVisual" Storyboard.TargetProperty="Opacity" To="1" />
</Storyboard>
</VisualState>
</VisualStateGroup>
<VisualStateGroup x:Name="FocusStates">
<VisualState x:Name="Focused">
<Storyboard>
<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="FocusVisual" />
</Storyboard>
</VisualState>
<VisualState x:Name="Unfocused" />
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
<!-- normal-->
<Border CornerRadius="{StaticResource ControlOuterBorder_CornerRadius}" Margin="1 0" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" />
<!-- Mouseover -->
<Border x:Name="MouseOverVisual" Opacity="0"
CornerRadius="{StaticResource ControlOuterBorder_CornerRadius}" Margin="1 0"
BorderBrush="{StaticResource ControlOuterBorder_Highlighted}"
BorderThickness="{TemplateBinding BorderThickness}" SnapsToDevicePixels="True">
<Border Background="Transparent" BorderBrush="{StaticResource ControlInnerBorder_Highlighted}" BorderThickness="0" CornerRadius="{StaticResource ControlInnerBorder_CornerRadius}" SnapsToDevicePixels="True" />
</Border>
<!-- Selected -->
<Border x:Name="SelectedVisual" Opacity="0" CornerRadius="{StaticResource ControlOuterBorder_CornerRadius}" Margin="1 0" BorderBrush="{StaticResource ControlSubItem_OuterBorder_Selected}" BorderThickness="{TemplateBinding BorderThickness}" SnapsToDevicePixels="True">
<Border Background="Transparent" BorderBrush="{StaticResource ControlSubItem_InnerBorder_Selected}" BorderThickness="0" CornerRadius="{StaticResource ControlInnerBorder_CornerRadius}" SnapsToDevicePixels="True" />
</Border>
<ContentPresenter x:Name="contentPresenter" Margin="{TemplateBinding Padding}" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
<!-- Focus -->
<Border x:Name="FocusVisual" Opacity="0" Margin="0 0" BorderThickness="0" CornerRadius="{StaticResource ControlOuterBorder_CornerRadius}" BorderBrush="{StaticResource ControlOuterBorder_Focused}" SnapsToDevicePixels="True" />
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
<!--<Style.Triggers>
<DataTrigger Binding="{Binding Path=IsItemEnable}" Value="True">
<Setter Property="Visibility" Value="Visible" />
</DataTrigger>
<DataTrigger Binding="{Binding Path=IsItemEnable}" Value="False">
<Setter Property="Visibility" Value="Hidden" />
</DataTrigger>
</Style.Triggers>-->
</Style>
Thank you,
Alex.S