I am developing a windows universal app with XAML / C# and i want to drag an rectangle in order to dop it anywhere else.
In former projects (e.g. for Windows 7 applications) i have been able to initiate drag n drop by using the DragDrop Class and doDragDrop. This class is not available in my universal app.
How can i dragdrop in universal apps? How can i reference the DragDrop class?
Finaly i found help at this site: link
Related
It seems that a relatively new class: SvgImageSource can only be used in UWP. Is there any way to use it in a WPF project and how?
Please take a look at this framework:
SharpVectors
The other way is to convert your SVG files to XAML path geometry and using them easily.
It will be possible to use any UWP XAML UI in WPF using XAML Islands. This is currently available as a preview using the WindowsXamlHost control which is part of the Windows Community Toolkit. Also note, that when using UWP controls in WPF apps, the app will then work only on Windows 10 client PCs.
I (appear to) have successfully created a UWP package for my WPF application using the following guide:
https://learn.microsoft.com/en-us/windows/uwp/porting/desktop-to-uwp-packaging-dot-net
Now I would like to take advantage of the AdControl class to display banner ads in my project, as detailed here:
https://learn.microsoft.com/en-us/windows/uwp/monetize/adcontrol-in-xaml-and--net
Is this possible? I don't see the "Universal Windows" section under References for my WPF project, which I can guess is because it’s not an original Universal Windows project. I do see it under References for the UWP package wrapper project I created using the guide above, but that doesn't help me show ads in the WPF project.
Any help appreciated.
You can add Universal Windows reference and use the API in your project as described here but you cannot use AdControl since XAML/UI in WPF is not the same as XAML in UWP and the AdControl is a UWP XAML control:
As mentioned above, there are exceptions to the rule that Windows 10
APIs are accessible from PC software. The first big exception concerns
XAML UI APIs. The XAML framework in UWP is different from the one in
WPF and you really don’t want to be mixing them up, anyways.
I have old app creted in Windows Phone Silverlight 8.0. I use RadDataBoundListBox (Telerik Controls) for list in app. I need add drag&drop function in my app.But it was not easy.
RadDataBoundListBox do not support drag&drop.
In Silverlight 8.0 work with drag&drop difficult and complex.It is only example drag&drop for list in WP Silverlight. But it does not suit me.
I can upgrade app to Wimndows Phone Silverlight 8.1. But ListView is not available for WP Silverlight 8.1. Which control should I choose for drag&drop and reorder?
I have a time limit. Please tell me the fast way to solve this problem.
I would recommend ListBox, reorder can easily be done using linq extension.
If you have an extremely large list you should be careful with listbox.
for drag and drop look at Drag and drop from list to canvas on windows phone with MVVM
Look at drag and drop in windows phone and https://blogs.msdn.microsoft.com/pakistan/2013/07/10/drag-drop-in-silverlight-for-windows-phone/
I searched for information about it for two days. Add full drag&drop for items in windows phone silverligth - It is inpossible. May be used reorder. It is a great control for wp silverligth(only reorder). I will update the project to windows phone 8.1.
I have been looking but have been unable to find as yet a nice comparison of the differences in touch / gesture support between the Windows Store app API's and WPF.
I have seen that WPF includes some basic touch events but do the WPF controls handle gestures such as swipe, hold and tap or would we need to implement our own identification of these getsures using the basic touch events?
Thanks
Gavin
Here is the full list of Windows Store App controls:
wpf controls
When developing a Windows Store App, you will use there controls. They have (where applicable) built in gesture support.
I have one silverlight application hosted in WPF environment.
i have created one static eventaggregrator class.
which is used between multiple modules hosted using prism.
but for the event which need to be publish from a module developed in WPF and subscribe in the module developed in *silverlight*.
is it possible? if yes then can anybody give me some ref article or solutions?
WPF and Silverlight use different execution environments, so code cannot be shared at runtime.
If you are hosting the Silverlight control inside a WebBrowser control in WPF then you will have to insert a Javascript layer inbetween your Silverlight control and the WPF host.
So you will subscribe in the .NET world, and then use the InvokeScript() method on your WebBrowser control to invoke a Javascript script which can communicate with the Silverlight control (see ScriptableMember).