I needed to build a custom treeview as a user control. I called it for the sake of the example TreeViewEx :
<UserControl x:Class="WpfApplication4.TreeViewEx"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:Name="root">
<...
I have a window with the following:
Background="{x:Null}" AllowsTransparency="True" WindowStyle="None"
Dragging the window by hand beyond the left, right and bottom limits of the screen results in a predictably cropped window. However this behaviour is not the same for dragging it above the top limit. Instead of cropping, it pushes it...
I have a WPF 4 application where I have implemented Drag and Drop using the standard DragDrop.DoDragDrop approach, but Im doing it using touch instead of Mouse events.
My XAML for my Grid (that Im dragging) is as follows:
<Grid x:Name="LayoutRoot"
ManipulationStarting="ManipulationStarting"
ManipulationDelta="Manipulation...
I have a multiple windows in an application, for instance, window1, window2 and window3.
one RoutedCommand (with KeyGesture F11) was binded in window1.
How to launch that routed command by pressing F11, while window2 had input focus ?
In WinForm application, i use MessageFilter to detect F11, but in WPF, how to do that ?
...
I've got a tab control, and when the user wants to add to it, then I want to copy a couple of elements that already exist (not just reference them). Now, so far I've just hard-copied the variables I want. But I've come a cropper in the automatic sizing code- that is, the copied element noticeably lags behind the original when resizing th...
I am hosting an ocx control ( a graph control for plotting) in my wpf application. The problem is that it is not getting resized when the main window is resized. The control tends to maintain its original size and when mainwindow is resized, the ocx control gets clipped and not resized. Is there any solution for this problem.
...
For some reason my scrollviewer does not process the mousewheel events (or at least scroll when you mouse wheel) when the mouse is over any child. I want it so that either when the mouse wheel is over the entire scrollviewer area, mousewheel scrolls. Either that or when you click on something contained in the scroller, it processes mou...
In a WPF UI I have nodes connected by bezier paths, like so:
When the user drags a node around, the connecting paths need to be updated in real-time. However, I've noticed some slowdown (especially if one node is connected to many others, or multiple nodes are being dragged at once). I profiled it, and the main problem appears to be h...
I'm developing a PowerPoint plugin with VSTO now,
I use WPF as a PowerPoint's panel,
like this:
http://www.freeimagehosting.net/uploads/th.5a91c11d17.png
of curse,that's a built-in panel in PowerPoint.
but in my custom panel,
If I click at A, the mouse event can be captured,
but click at B, the mouse event can not be captured.
any...
1-Is it possible to move the listbox items instead of the "selector bar".
In that way, the selector bar has a static position but the items will move.
what Im trying to achieve is something like the scrollbar at the bottom of this image:
http://i.afterdawn.com/storage/pictures/plex_netflix_addon_3.png
2-is Listbox with horizontal or...
How to clear all usercontrols in the wpf window. in runtime i added dynamic usercontrols in my wpf window, when i refresh, i want to clear all those and need to load again. so how i can clear all usercontrols in my page.??
...
My WPF application is reading a text file and populating a listbox.
Whenever I have text surrounded by a dash symbol i.e. "-", the line in notepad will look like this for e.g. "SAMPLE - TEXT"
When it displays it in the application, the dash turns into a question mark !?!?!?
I then have an Export button, which writes these back to a text...
I'm working with WPF and often have the need to get the namespace and assembly name of a given class. But I don't know how to do this.
So, how can we get the names when browsing the classes in the Solution Explorer or/and when editing the class's codes? Please help!
...
Hi,
I am having a lot of trouble finding a good example of how to programatically create, fill and style a ListView. Every example I find tends to use a lot of XAML markup and a minimum amount of C# to switch which bit of markup is being run. This is impossible for me as I do not know the composition of the columns, nor the intended sty...
Is it a good practice to find the workarea measurement and set some properties in code so that it could be bound to Control's margin or height/Width properties in xaml?
I do this so that my window would resize according to the available workarea.
const int w = SystemParameters.WorkArea.Width;
const int h = SystemParameters.WorkArea.Hei...
I'm writing a little WPF utility to manage entries in the hosts file for dev purposes. As you might know the hosts file is protected by the newer OSs (Win 7/2008/Vista).
I've added a manifest to my application to set the requestedExecutionLevel to "requireAdministrator", as detailed here (using "the easy way") and in the related questio...
Can anyone please help how to programatically add the following style:
<style>
<style.Triggers>
<Trigger Binding="{Binding CustomerId}" Value ="1"/>
<setter Property="Background" Value="Red"/>
</style.Triggers>
</style>
...
Hi All,
I want to display the list of songs in the listbox.
Example.
Song count 20. initially the listbox has to show 10
like
song1
< song2 >
song3
...
If we click the right arrow it has to show the next 10.
Is it possible to achieve this.
Geetha.
...
Hi,
this time, I have a rather short question: I want to Have a single char (which is a bracket) to display in a given Rectangular area without having spaces between the char an the border of the Rectangle. Is this possible?
//EDIT: What im trying to do is placing brackets around a mathematical term which might be of different height.
...
I have tabcontrol.
At first tabitem I have coordinates in decimal type.
At second tabitem I have coordinates in DMS type.
When user change something one of them I want that this change will affecting second type
Now it only works that when I run application controls for cartesian coordinates are filled. But when I change something af...