Telerik Forums
UI for WPF Forum
2 answers
353 views
I'm hoping somewhere here on the forums can help me as I've searched all over (on the forums) and in the documentation and examples and are coming up dry. Right now I'm building a system in where the end-user can take a product (or products) from a RadGridView and drag them over to a RadTreeView which contains Categories and onto a RadTreeViewItem. 

The entire system as it stands works perfectly for a single GridViewItem but I need to be able to support multiple items. Unfortunately I have not been able to find any solution in the demos or on the forums (most posts are either WinForm related or use the deprecated RadDragDropManager). If anyone can shed some line on how I can handle multiple items with the newer DragDropManager that would be great.

Current code is attached.

private void CatalogManageCategoriesProductsDataGrid_OnDragInitialize(object sender, DragInitializeEventArgs e)
{
    ViewModels.DropIndicationDetails details = new ViewModels.DropIndicationDetails();
 
    var GridViewItem = e.OriginalSource as GridViewRow ?? (e.OriginalSource as FrameworkElement).ParentOfType<GridViewRow>();
    var data = GridViewItem != null ? GridViewItem.Item : (sender as RadGridView).SelectedItem;
    var payload = DragDropPayloadManager.GeneratePayload(null);
 
    details.CurrentDraggedItem = data;
 
    payload.SetData("DraggedData", data);
    payload.SetData("DropDetails", details);
 
    e.Data = payload;
 
    e.DragVisual = new DragVisual()
    {
        Content = details,
        ContentTemplate = CatalogManageCategoriesProductsDataGrid.Resources["ProductDragTemplate"] as DataTemplate
    };
 
    e.DragVisualOffset = e.RelativeStartPoint;
}
Alan
Top achievements
Rank 1
 answered on 08 Aug 2013
1 answer
147 views

I am trying to create a DependencyProperty to persist the layout of my docking panes.  I am running into an issue when I float the docking pane, close the window and then call LoadLayout when opening the window again.  I have narrowed the issue down to which event I catch to save the layout.  If I catch the RadDocking unloaded event the xml produced in the save layout doesn't work like I would like it too.  If I catch the closed event on the Window then life is good and the floating window restores correctly (because this is an attached property this is not a valid work around).  The difference in the xml is the IsInOpenWindow attribute, when I save from the window closed this value is false and when I save from the RadDocking unloaded event the value is true.  I understand why this occurs, the closed event occurs before the RadDocking unloaded event.  My question is when is the best time(what is the best event to catch) to save the layout of the docking windows without requiring intervention from the user?

Thanks.

I am willing to provide code if that would help.
Kalin
Telerik team
 answered on 08 Aug 2013
4 answers
140 views

Hi,

I followed the instructions on the Telerik web page 'http://www.telerik.com/help/wpf/coded-ui-support.html' and copied the assembly Telerik.VisualStudio.TestTools.UITest.Extension.ExtensionsCore into the folder C:\Program Files (x86)\Common Files\Microsoft Shared\VSTT\11.0\UITestExtensionPackages. Then installed the assembley into GAC.

I am using VS 2012. When I try to use Coded UI Test Builder, it terminates with the following exception.

Application: CodedUITestBuilder.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: Microsoft.VisualStudio.TestTools.UITest.Extension.InvalidUITestExtensionPackageException
Stack:
   at Microsoft.VisualStudio.TestTools.UITest.Framework.UITestExtensionPackageManager.LoadAssemblies(System.String[])
   at Microsoft.VisualStudio.TestTools.UITest.Framework.UITestExtensionPackageManager..ctor()
   at Microsoft.VisualStudio.TestTools.UITest.Framework.UITestService.Initialize()
   at Microsoft.VisualStudio.TestTools.CodedUITest.Controls.CodedUITestBuilder.UITestBuilder.InitializeExtensions()
   at Microsoft.VisualStudio.TestTools.CodedUITest.Controls.CodedUITestBuilder.UITestBuilder.WindowActivated(System.Object, System.EventArgs)
   at System.Windows.Window.OnActivated(System.EventArgs)
   at System.Windows.Window.HandleActivate(Boolean)
   at System.Windows.Window.WmActivate(IntPtr)
   at System.Windows.Window.WindowFilterMessage(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
   at System.Windows.Interop.HwndSource.PublicHooksFilterMessage(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
   at MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)
   at MS.Win32.UnsafeNativeMethods.ShowWindow(System.Runtime.InteropServices.HandleRef, Int32)
   at System.Windows.Window.ShowHelper(System.Object)
   at System.Windows.Window.Show()
   at System.Windows.Application.<RunInternal>b__f(System.Object)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
   at System.Windows.Threading.DispatcherOperation.InvokeImpl()
   at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(System.Object)
   at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
   at System.Windows.Threading.DispatcherOperation.Invoke()
   at System.Windows.Threading.Dispatcher.ProcessQueue()
   at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
   at MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)
   at MS.Win32.UnsafeNativeMethods.DispatchMessage(System.Windows.Interop.MSG ByRef)
   at System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame)
   at System.Windows.Threading.Dispatcher.PushFrame(System.Windows.Threading.DispatcherFrame)
   at System.Windows.Threading.Dispatcher.Run()
   at System.Windows.Application.RunDispatcher(System.Object)
   at System.Windows.Application.RunInternal(System.Windows.Window)
   at System.Windows.Application.Run(System.Windows.Window)
   at Microsoft.VisualStudio.TestTools.UITest.CodedUITest.CodedUITestBuilder.Program.Main(System.String[])

If I remove the assembly from the folder, Coded UI Test Builder lauches without error but it does not record actions on Telerik controls as expected.

Is there anything I can do to avoid this error?

Thank you,

Gajan
 

Gajan
Top achievements
Rank 1
 answered on 08 Aug 2013
3 answers
242 views
Hi,

I'm using the DragDropManager to allow dragging from one RadListBox to another RadListBox. But I need to identify the exact RadListBoxItem on the target list box where the item was dropped onto.

I was hoping to achieve this by using this style for the target list box:
<Style x:Key="DroppableListBoxItem" TargeType="telerik:RadListBoxItem">
   <Setter Property="AllowDrop" Value="true" />
</Style>

And applied this to the list box:
<telerik:RadListBox ItemContainerStyle="{StaticResource DroppableListBoxItem}"
              ItemTemplate="{StaticResource ItemTemplate}"
              ItemsSource="{Binding Path=MyItems}"/>

Note: I did not set AllowDrop=true on the list box itself (I tried it, but I made no difference).

But my DropHandler never returned the list box item, instead I was getting the list box itself.

BTW
Is there a way to highlight the list box item below the the mouse while dragging an item over it?

Thanks,
Thorsten

(I'm using RadControls for WPF Q2 2013)
Vladi
Telerik team
 answered on 08 Aug 2013
1 answer
86 views
Hi Team,

            I want to change the validation image shown in the rowindicator column(Refer attached image). Please provide the solution for this. If possible send me the sample project.

            Thanks in Advance.
Vanya Pavlova
Telerik team
 answered on 08 Aug 2013
3 answers
112 views
I would like to replace the default "error" image that is used to denote and invalid column (see attached image).  What's the best way to do so?
Vanya Pavlova
Telerik team
 answered on 08 Aug 2013
1 answer
147 views
Hello.
Please help...
How can i add wrappanel into  RadRibbonGroup with HierarchicalDataTemplate?
I have a xaml code and it works fine:
<telerik:RadRibbonView DockPanel.Dock="Top">
            <telerik:RadRibbonTab Header="RadRibbonTab">
                <telerik:RadRibbonGroup Header="RadRibbonGroup" VerticalContentAlignment="Top">
                    <WrapPanel Orientation="Vertical">
                        <telerik:RadRibbonButton Text="RadRibbonButton" Height="5" VerticalAlignment="Top"/>
                        <telerik:RadRibbonDropDownButton Text="RadRibbonDropDownButton" Height="5" VerticalAlignment="Top"/>
                        <telerik:RadRibbonButton Text="RadRibbonButton" Height="5" VerticalAlignment="Top"/>
                        <telerik:RadRibbonDropDownButton Text="RadRibbonDropDownButton" Height="5" VerticalAlignment="Top"/>
                        <telerik:RadRibbonButton Text="RadRibbonButton" Height="5" VerticalAlignment="Top"/>
                        <telerik:RadRibbonDropDownButton Text="RadRibbonDropDownButton" Height="5" VerticalAlignment="Top"/>
                    </WrapPanel>
                </telerik:RadRibbonGroup>
            </telerik:RadRibbonTab>
        </telerik:RadRibbonView>

How can I do the same with the ItemsSource and HierarchicalDataTemplate?
Thank you.
Kiril Vandov
Telerik team
 answered on 08 Aug 2013
3 answers
64 views
Hi,
I am using RadTreeList View, when i set EnableRowVirtualization= "False" every time i am getting one extra row after clicking the Expandar.
I am not understanding why RowVirtulization is adding an Extra Row and how to get Rid of this Issue. 
Yordanka
Telerik team
 answered on 08 Aug 2013
2 answers
169 views
Hi,

First of all, thank you for the wonderful products and controls. I am getting familiarized with the code and everything has been going smoothly so far.

My question is, is it possible to add elements to RadChart ChartArea DataSeries in an asynchronous way, so that the main UI would not be blocked during setting the variable?

Thank you!
EM
Top achievements
Rank 1
 answered on 07 Aug 2013
7 answers
111 views

Hello, 

I need to update te value of a cell in my radgrid view. When I try to change it the grid does not uptate its value until I reagroup or manipulate the grid in any other way

This is my code:

selectedItem = TryCast(Me.rgv_attributes.Items.Item(0), c_accionAtributo)
Me.rgv_attributes.Items.EditItem(selectedItem)
selectedItem.Value = "algo"
Me.rgv_attributes.Items.CommitEdit()


The itemsource is an ObservableCollection(Of c_accionAtributo) 
Me.rgv_attributes.ItemsSource = atributes


Any help?

Thanks!





Daniel
Top achievements
Rank 1
 answered on 07 Aug 2013
Narrow your results
Selected tags
Tags
GridView
General Discussions
Chart
RichTextBox
Docking
ScheduleView
ChartView
TreeView
Diagram
Map
ComboBox
TreeListView
Window
RibbonView and RibbonWindow
PropertyGrid
DragAndDrop
TabControl
TileView
Carousel
DataForm
PDFViewer
MaskedInput (Numeric, DateTime, Text, Currency)
AutoCompleteBox
DatePicker
Buttons
ListBox
GanttView
PivotGrid
Spreadsheet
Gauges
NumericUpDown
PanelBar
DateTimePicker
DataFilter
Menu
ContextMenu
TimeLine
Calendar
Installer and Visual Studio Extensions
ImageEditor
BusyIndicator
Expander
Slider
TileList
PersistenceFramework
DataPager
Styling
TimeBar
OutlookBar
TransitionControl
Book
FileDialogs
ToolBar
ColorPicker
TimePicker
SyntaxEditor
MultiColumnComboBox
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
DesktopAlert
WatermarkTextBox
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
ProgressBar
Sparkline
LayoutControl
TabbedWindow
ToolTip
CloudUpload
ColorEditor
TreeMap and PivotMap
EntityFrameworkCoreDataSource (.Net Core)
HeatMap
Chat (Conversational UI)
VirtualizingWrapPanel
Calculator
NotifyIcon
TaskBoard
TimeSpanPicker
BulletGraph
Licensing
WebCam
CardView
DataBar
FilePathPicker
PasswordBox
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
VirtualKeyboard
HighlightTextBlock
Security
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Ambisoft
Top achievements
Rank 2
Iron
Pascal
Top achievements
Rank 2
Iron
Matthew
Top achievements
Rank 1
Sergii
Top achievements
Rank 1
Iron
Iron
Andrey
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?