Hi there,
We have a situation where we're creating dockable panes and we'd like to make it so when you hit the button to make one it will create it and start a drag option automatically so you can then dock it where you want as soon as you make it, is this doable at all? I haven't been able to find anything online about it
Thanks
Hi,
I use two RadListboxes to allow users to order some things and save the ordered list.
I now want the user to filter the lists and tried the RadDataFilter.
So I bound the Listboxes Itemsource to the RadFIlter.
The problem is, that now the Drag Dop doesnt work anymore.
Is there any way I can do both? Use the filter and the Drag Drop? Or do I have to program my own filter functionality?
Greetings Benedikt
<UserControl
x:Class="DispoTelerik2.ucMappenProduktionslinienPlanung"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:DispoTelerik2"
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
xmlns:iconPacks="http://metro.mahapps.com/winfx/xaml/iconpacks"
xmlns:mat="clr-namespace:Telerik.Windows.Controls.MaterialControls;assembly=Telerik.Windows.Controls"
xmlns:dataFilter="clr-namespace:Telerik.Windows.Controls.Data.DataFilter;assembly=Telerik.Windows.Controls.Data"
>
<Grid
Grid.IsSharedSizeScope="True"
>
<Grid.Resources>
<local:FarbeGutSchlechtConverter x:Key="FarbeGutSchlechtConverter" />
<Style x:Key="DraggableListBoxItem" TargetType="telerik:RadListBoxItem" BasedOn="{StaticResource RadListBoxItemStyle}">
<Setter Property="telerik:DragDropManager.AllowCapturedDrag" Value="True" />
</Style>
<DataTemplate x:Key="MappenTemplate">
<Border
BorderThickness="1"
BorderBrush="{telerik:MaterialResource ResourceKey=ReadOnlyBorderBrush}"
>
<Grid
Margin="2"
>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition SharedSizeGroup="ssgMappeProduktionslinienPlanung1"/>
<ColumnDefinition SharedSizeGroup="ssgMappeProduktionslinienPlanung2"/>
<ColumnDefinition SharedSizeGroup="ssgMappeProduktionslinienPlanung3"/>
</Grid.ColumnDefinitions>
<iconPacks:PackIconMaterial
Grid.Row="0"
Grid.Column="0"
HorizontalAlignment="Center"
Kind="AlphaSCircle"
>
<iconPacks:PackIconMaterial.Foreground>
<SolidColorBrush
Color="{Binding Gesägt, Converter={StaticResource FarbeGutSchlechtConverter}}"
/>
</iconPacks:PackIconMaterial.Foreground>
</iconPacks:PackIconMaterial>
<TextBlock
Grid.Row="1"
Grid.Column="0"
Grid.ColumnSpan="2"
HorizontalAlignment="Center"
FontWeight="Bold"
FontSize="{DynamicResource FontSizeM}"
Text="{Binding Mappe}"
Margin="5 2 0 2"
/>
<TextBlock
Grid.Row="2"
Grid.Column="0"
HorizontalAlignment="Center"
FontWeight="Bold"
Text="{Binding ProduktTyp}"
Margin="5 2 3 2"
/>
<TextBlock
Grid.Row="2"
Grid.Column="1"
HorizontalAlignment="Center"
Text="{Binding Zellen, StringFormat={}Zellen: {0:n0}}"
Margin="8 2 0 2"
/>
<TextBlock
Grid.Row="3"
Grid.Column="0"
HorizontalAlignment="Center"
Text="{Binding AufwandBAZ, StringFormat={}Aufwand BAZ: {0:n0}}"
Margin="10 2 3 2"
Visibility="{Binding Path=ProduktGruppeMöbel, Converter={StaticResource VisibleIfTrueConverter}}"
/>
<TextBlock
Grid.Row="3"
Grid.Column="1"
HorizontalAlignment="Center"
Text="{Binding Einzelteile, StringFormat={}Einzelteile: {0:n0}}"
Margin="8 2 0 2"
Visibility="{Binding Path=ProduktGruppeMöbel, Converter={StaticResource VisibleIfTrueConverter}}"
/>
<TextBlock
Grid.Row="3"
Grid.Column="1"
HorizontalAlignment="Center"
Text="{Binding TrennwändeEinzelteile, StringFormat={}Einzelteile: {0:n0}}"
Margin="8 2 0 2"
Visibility="{Binding Path=ProduktGruppeTrennwände, Converter={StaticResource VisibleIfTrueConverter}}"
/>
<TextBlock
Grid.Row="4"
Grid.Column="0"
Grid.ColumnSpan="2"
HorizontalAlignment="Center"
FontWeight="Medium"
Text="{Binding Termin, StringFormat={}Plantermin: {0:dd.MM.yy}}"
Margin="5 2 0 2"
/>
<TextBlock
Grid.Row="5"
Grid.Column="0"
Grid.ColumnSpan="2"
HorizontalAlignment="Center"
FontWeight="Medium"
Text="{Binding Endtermin, StringFormat={}Endtermin: {0:dd.MM.yy}}"
Margin="5 2 0 2"
/>
<TextBlock
Grid.Row="6"
Grid.Column="0"
HorizontalAlignment="Center"
Text="{Binding MöbelProduktausprägung}"
Margin="5 2 3 2"
Visibility="{Binding Path=ProduktGruppeMöbel, Converter={StaticResource VisibleIfTrueConverter}}"
/>
<TextBlock
Grid.Row="6"
Grid.Column="1"
HorizontalAlignment="Center"
Text="{Binding MöbelSchwierigkeit, StringFormat={}Schwierigkeit: {0}}"
Margin="8 2 0 2"
Visibility="{Binding Path=ProduktGruppeMöbel, Converter={StaticResource VisibleIfTrueConverter}}"
/>
<TextBlock
Grid.Row="6"
Grid.Column="0"
HorizontalAlignment="Center"
Text="{Binding TrennwändeAnlagenmerkmal}"
Margin="5 2 3 2"
Visibility="{Binding Path=ProduktGruppeTrennwände, Converter={StaticResource VisibleIfTrueConverter}}"
/>
<TextBlock
Grid.Row="6"
Grid.Column="1"
HorizontalAlignment="Center"
Text="{Binding TrennwändeProfilausbildung}"
Margin="8 2 0 2"
Visibility="{Binding Path=ProduktGruppeTrennwände, Converter={StaticResource VisibleIfTrueConverter}}"
/>
</Grid>
</Border>
</DataTemplate>
<!--<DataTemplate x:Key="ProduktTypFilterEditorTemplate">
<telerik:RadComboBox
SelectedValue="{Binding Value, Mode=TwoWay}"
ScrollViewer.CanContentScroll="False"
MinWidth="100" />
</DataTemplate>-->
<!--<local:clsCustomEditorTemplateSelector x:Key="CustomEditorTemplateSelector">
<local:clsCustomEditorTemplateSelector.EditorTemplateRules>
<local:EditorTemplateRule
PropertyName="ProduktTyp"
DataTemplate="{StaticResource ProduktTypFilterEditorTemplate}"
/>
</local:clsCustomEditorTemplateSelector.EditorTemplateRules>
</local:clsCustomEditorTemplateSelector>-->
<local:RadFilterTypes x:Key="RadFilterTypes" />
</Grid.Resources>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="100*"/>
</Grid.RowDefinitions>
<telerik:RadToolBar
Grid.Row="0"
VerticalAlignment="Top"
>
<telerik:RadComboBox
ToolTip="Anzuzeigende Linie auswählen"
ItemsSource="{Binding ProduktionslinienBereiche}"
SelectedItem="{Binding selProduktionslinienBereich, Mode=TwoWay}"
telerik:TextSearch.TextPath="Bezeichnung"
EmptyText="Linie auswählen"
ScrollViewer.CanContentScroll="False"
DisplayMemberPath="Bezeichnung"
ClearSelectionButtonContent="Auswahl aufheben"
ClearSelectionButtonVisibility="Visible"
/>
<telerik:RadDropDownButton
ToolTip="Anzuzeigenden Zeitraum auswählen"
IsOpen="{Binding ZeitraumOpen, Mode=TwoWay}"
>
<telerik:RadDropDownButton.Content>
<StackPanel
Orientation="Horizontal"
>
<iconPacks:PackIconMaterial
Kind="CalendarMultiple"
VerticalAlignment="Center"
HorizontalAlignment="Center"
Width="{DynamicResource FontSizeM}"
Height="{DynamicResource FontSizeM}"
Margin="0 0 5 0"
/>
<TextBlock
Text="Zeitraum"
/>
</StackPanel>
</telerik:RadDropDownButton.Content>
<telerik:RadDropDownButton.DropDownContent>
<StackPanel
Margin="8,5"
>
<telerik:RadDateTimePicker
ToolTip="Datum das angezeigt werden soll?"
HorizontalAlignment="Left"
InputMode="DatePicker"
SelectedValue="{Binding Datum, Mode=TwoWay}"
AllowParsingWithoutSeparator="True"
/>
<Button
Name="btZeitraum"
Content="Anzeigen"
Margin="0 10 0 0"
FontWeight="Medium"
Command="{Binding AktualisierenCommand}"
>
</Button>
</StackPanel>
</telerik:RadDropDownButton.DropDownContent>
</telerik:RadDropDownButton>
<Button
Command="{Binding SpeichernCommand}"
ToolTip="Tagesplanung Speichern"
>
<Button.Content>
<StackPanel
Orientation="Horizontal"
>
<iconPacks:PackIconMaterial
Kind="ContentSaveOutline"
VerticalAlignment="Center"
HorizontalAlignment="Center"
Width="{DynamicResource FontSizeM}"
Height="{DynamicResource FontSizeM}"
Margin="0 0 5 0"
/>
<TextBlock
Text="Speichern"
/>
</StackPanel>
</Button.Content>
</Button>
<Button
Command="{Binding HinzufügenCommand}"
ToolTip="Nicht fällige Mappe in Pool hinzufügen"
>
<Button.Content>
<StackPanel
Orientation="Horizontal"
>
<iconPacks:PackIconMaterial
Kind="FolderDownload"
VerticalAlignment="Center"
HorizontalAlignment="Center"
Width="{DynamicResource FontSizeM}"
Height="{DynamicResource FontSizeM}"
Margin="0 0 5 0"
/>
<TextBlock
Text="Hinzufügen"
/>
</StackPanel>
</Button.Content>
</Button>
</telerik:RadToolBar>
<Grid
Grid.Row="1"
>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="100*"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<TextBlock
Grid.Row="0"
Grid.Column="0"
Text="Pool"
HorizontalAlignment="Center"
FontSize="{telerik:MaterialResource ResourceKey=FontSizeL}"
Margin="5"
/>
<telerik:RadDataFilter
x:Name="rdfMappen"
Grid.Row="1"
Grid.Column="0"
Source="{Binding Mappen}"
AutoGenerateItemPropertyDefinitions="False"
>
<telerik:RadDataFilter.ItemPropertyDefinitions>
<dataFilter:ItemPropertyDefinition
PropertyName="ProduktTyp"
PropertyType="{Binding String, Source={StaticResource RadFilterTypes}}"
DisplayName="Produkt-Typ"
/>
<dataFilter:ItemPropertyDefinition
PropertyName="Mappe"
PropertyType="{Binding Int, Source={StaticResource RadFilterTypes}}"
DisplayName="Mappe"
/>
<dataFilter:ItemPropertyDefinition
PropertyName="Endtermin"
PropertyType="{Binding DateTime, Source={StaticResource RadFilterTypes}}"
DisplayName="Endtermin"
/>
<dataFilter:ItemPropertyDefinition
PropertyName="Termin"
PropertyType="{Binding DateTime, Source={StaticResource RadFilterTypes}}"
DisplayName="Plantermin"
/>
</telerik:RadDataFilter.ItemPropertyDefinitions>
</telerik:RadDataFilter>
<telerik:RadListBox
x:Name="rlbMappen"
Grid.Row="2"
Grid.Column="0"
AllowDrop="True"
ItemsSource="{Binding FilteredSource, ElementName=rdfMappen}"
ItemTemplate="{StaticResource MappenTemplate}"
ItemContainerStyle="{StaticResource DraggableListBoxItem}"
MinWidth="200"
Margin="5 0"
>
<telerik:RadListBox.DragVisualProvider>
<telerik:ScreenshotDragVisualProvider />
</telerik:RadListBox.DragVisualProvider>
<telerik:RadListBox.DragDropBehavior>
<telerik:ListBoxDragDropBehavior
AllowReorder="False"
telerik:TouchManager.DragStartTrigger="TapHoldAndMove"
/>
</telerik:RadListBox.DragDropBehavior>
</telerik:RadListBox>
<TextBlock
Grid.Row="0"
Grid.Column="1"
Text="Planung"
HorizontalAlignment="Center"
FontSize="{telerik:MaterialResource ResourceKey=FontSizeL}"
Margin="5"
/>
<telerik:RadDataFilter
x:Name="rdfMappenGeordnet"
Grid.Row="1"
Grid.Column="1"
Source="{Binding MappenGeordnet}"
AutoGenerateItemPropertyDefinitions="False"
>
<telerik:RadDataFilter.ItemPropertyDefinitions>
<dataFilter:ItemPropertyDefinition
PropertyName="ProduktTyp"
PropertyType="{Binding String, Source={StaticResource RadFilterTypes}}"
DisplayName="Produkt-Typ"
/>
<dataFilter:ItemPropertyDefinition
PropertyName="Mappe"
PropertyType="{Binding Int, Source={StaticResource RadFilterTypes}}"
DisplayName="Mappe"
/>
<dataFilter:ItemPropertyDefinition
PropertyName="Endtermin"
PropertyType="{Binding DateTime, Source={StaticResource RadFilterTypes}}"
DisplayName="Endtermin"
/>
<dataFilter:ItemPropertyDefinition
PropertyName="Termin"
PropertyType="{Binding DateTime, Source={StaticResource RadFilterTypes}}"
DisplayName="Plantermin"
/>
</telerik:RadDataFilter.ItemPropertyDefinitions>
</telerik:RadDataFilter>
<telerik:RadListBox
x:Name="rlbMappenGeordnet"
Grid.Row="2"
Grid.Column="1"
AllowDrop="True"
ItemsSource="{Binding FilteredSource, ElementName=rdfMappenGeordnet}"
ItemTemplate="{StaticResource MappenTemplate}"
ItemContainerStyle="{StaticResource DraggableListBoxItem}"
MinWidth="200"
Margin="5 0"
>
<telerik:RadListBox.DragVisualProvider>
<telerik:ScreenshotDragVisualProvider />
</telerik:RadListBox.DragVisualProvider>
<telerik:RadListBox.DragDropBehavior>
<telerik:ListBoxDragDropBehavior
AllowReorder="True"
telerik:TouchManager.DragStartTrigger="TapHoldAndMove"
/>
</telerik:RadListBox.DragDropBehavior>
</telerik:RadListBox>
</Grid>
</Grid>
</UserControl>
Hi Guys,
We're using a behaviour class that is driven by the DragDropManager, hooking into some of the events, namely GiveFeedback and DragOver.
I'd like to change the cursor to a blocked symbol if the control we're dragging is hovered over another control of the same type.
Within the GiveFeedback event, we're unable to determine what control we're currently hovering over. Instead we tried using the OnDragOver event, where we are able to establish the current position but unable to change the cursor.
Is there any other way to change the cursor without the GiveFeedbackEventArgs?
Thanks
When selected objects, like shapes and links between the shapes are dragged, if they are selected they all move together as a group as expected. At the end of the drag, a Drag event is generated and in the DragRoutedEventArgs there's an Items list which indicates which items have been dragged, and in some cases the new position.
If the item being dragged is a shape, then I see a IDragItem with a position value.
If the items is a connection between say two shapes dragged, then I see another IDragItem, however, it's position is always 0, 0
The problem I have is that if the connection is a straight line between shapes then it works fine. However, if the connection has extra points added by the user, then I don't get told about those points. So how do I update the data behind about those points?
Dragging the shapes in the view is working correctly, however there's missing data, so if I save and restore, the extra connection points weren't updated so they show the old position. I'll attach a diagram of what I mean.
Hi,
I have a project where I need to be able to drag a ListBox Item to a different ListBox. If I dont populate the second Listbox with anything; then when I drop the item, it just disappears. When I have at least 1 Item in the second ListBox then I get "'Element already has a logical parent. It must be detached from the old parent before it is attached to a new one". I need to be able to do this as well as add a prefix to each added item eg: "A - FirstItem" and "B - SecondItem".
I tried using the Converter class too but it doesnt seem to work. It is important to note that I have tried this method using Binding as well as just dynamically adding objects to the Listbox. Nothing works. Attached is all the images from my sample project needed to diagnose my issue.
Please Help
Thank you,
Dean.
Hi Telerik Team,
I am facing two issues in RadgridView,
1. I am getting "Not Responding" message when I drag and drop the column header to do grouping . this issue is occurring when we have more than 15,000 records in RadgridView.
2. After grouping when I click any grouped row , the row visibility is getting collapsed.
Please kindly help me on this issues.
Hi all
I have a ListBox and its has Items to be Displayed. Additional i have added
<telerik:ListBoxDragDrop.Behavior> // for dragging operation
<telerik:ListBoxDragDropBehavior AllowReorder="True" telerik:TouchManager.DragStartTrigger="TapHoldAndMove" />
</telerik:ListBoxDragDrop.Behavior>
<telerik:ListBoxDragDrop.DragVisualProvider> //// for dragging Visual operation
<telerik:ScreenshotDragVisualProvider />
</telerik:ListBoxDragDrop.DragVisualProvider>
Any idea to Restrict the Dragging-Visual within the parent windows bounds.
Thanks In Advance
Hello,
I want to drag multiple items in RadTreeView and drop to Grid (NOT GridView).
Is there any previous threads about it or code samples?
Hi.
I'm creating a UI to drag items from a RadListBox into a RadDiagramContainerShape. When dragging over the container shape a huge red border is generated, but it doesn't mix well with my app look and feel, is is possible to style it or remove it?
You can see an example here.
Hello.
I want to load a desktop files in grid view using MVVM. Is there a way? (I'm not use MVVM Light kit.)
It is easy to add and remove files by using buttons, but Drag and Drop is difficult to implement because there are not many examples.
I want to add it using the file model using drag and drop and add it to the column by customizing it.
See the image for details.
<This is a simple .xaml>
<
telerik:RadGridView
ItemsSource
=
"{Binding MultiFiles}"
rad:GridViewSelectionUtilities.SelectedItems
=
"{Binding MultiFileItems}"
GroupRenderMode
=
"Flat"
HorizontalAlignment
=
"Stretch"
AutoGenerateColumns
=
"False"
ShowColumnHeaders
=
"True"
ShowGroupFooters
=
"False"
ShowGroupPanel
=
"False"
RowIndicatorVisibility
=
"Collapsed"
EnableColumnVirtualization
=
"True"
EnableRowVirtualization
=
"True"
VirtualizingPanel.IsVirtualizing
=
"True"
ScrollViewer.HorizontalScrollBarVisibility
=
"Auto"
ScrollViewer.VerticalScrollBarVisibility
=
"Auto"
FrozenColumnsSplitterVisibility
=
"Collapsed"
IsFilteringAllowed
=
"False"
AutoExpandGroups
=
"False"
ShowSearchPanel
=
"False"
SearchPanelCloseButtonVisibility
=
"Collapsed"
SelectionMode
=
"Extended"
SelectionUnit
=
"FullRow"
>
<
telerik:RadGridView.Resources
>
<
Style
x:Key
=
"CheckboxCellStyle"
TargetType
=
"telerik:GridViewCell"
BasedOn
=
"{StaticResource GridViewCellStyle}"
>
<
Setter
Property
=
"HorizontalContentAlignment"
Value
=
"Center"
/>
</
Style
>
</
telerik:RadGridView.Resources
>
<
telerik:RadGridView.Columns
>
<
telerik:GridViewSelectColumn
/>
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding Name}"
ToolTip
=
"{Binding Name}"
IsReadOnly
=
"True"
Width
=
"300"
Header
=
"File Name"
/>
<
telerik:GridViewComboBoxColumn
ItemsSourceBinding
=
"{Binding WorkTypes}"
DataMemberBinding
=
"{Binding WorkType}"
DisplayMemberPath
=
"Name"
SelectedValueMemberPath
=
"Name"
IsReadOnly
=
"False"
Width
=
"80"
Header
=
"WorkType"
>
</
telerik:GridViewComboBoxColumn
>
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding Status}"
ToolTip
=
"{Binding Status}"
IsReadOnly
=
"True"
Width
=
"60"
Header
=
"Status"
/>
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding EtcText}"
ToolTip
=
"{Binding EtcText}"
IsReadOnly
=
"True"
Width
=
"auto"
Header
=
"ETC"
/>
</
telerik:RadGridView.Columns
>
</
telerik:RadGridView
>
<Model>
public class MultiFileModel
{
public string Name { get; set; } = string.Empty;
public string WorkTypes { get; set; } = string.Empty;
public string Status { get; set; } = $"X";
public string EtcText { get; set; } = string.Empty;
}
<ViewModel>
?
Thanks.