I have a drag/drop operation on a Canvas that is supposed to do something when an object gets dragged into and out of it. My problem is that the DragEnter/DragLeave events keeps firing as the mouse moves the object over it, not just on enter/exit. The faster the mouse is moving, the more frequently the events fire.
The Canvas DragOver E...
How do I extract the parent container of a ListBoxItem?
In the following example I can go till the ListBoxItem, higher than that I get Nothing:
<ListBox Name="lbAddress">
<ListBox.ItemTemplate>
<DataTemplate>
<Button Click="Button_Click"/>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
Private Sub Button_Click(...
Using WPF .NET 4.0 in VS2010 RTM: I can't create a fullscreen WPF popup.
If I create a popup that is sized 50% width and 100% height everything works fine, but if I try to create a "full screen" popup sized to 100% width and height it ends up displaying at 100% width and 75% height... the bottom is truncated.
Note: The width and height...
I restore coordinates of Window on application startup. In good-old-Windows-Forms I used System.Windows.Forms.Screen collection. Is there anything similar in WPF world?
I did notice PrimaryScreen*, VirtualScreen* parameters in System.Windows.SystemParameters. However they left me hanging since it seems to be impossible to detect whether...
I have a custom button control that does not derive from Button. Is it possible for me to implement the equivalent of IsDefault so that the command associated with my control will be invoked. I was hoping that this was an attached property that I could add to any control but as far as I can tell it doesn't seem to be. Am I out of luck if...
Or do I need a Silverlight client?
...
I have a legacy delphi program and want to add some content implemented with WPF. So I encapsulate the WPF control with a .NET/ActiveX interop technology. That means something like:
[ComRegisterFunction()]
public static void RegisterClass(string key);
[ComUnregisterFunction()]
public static void UnregisterClass(string key);
The active...
I am making a custom control I need to add some default keybindings, microsoft has already done with copy and paste in a textbox. However one of the keybindings needs to pass a parameter to the command which it is bound to. It is simple to do this in xaml, is there any way to do this in code?
this.InputBindings.Add(new KeyBinding(Change...
I have a wpf data grid,where there are two data template columns
One of which ahs check box as the data template adn teh other has combo box as the data template.
Now my requirement is,i need to disable few of the options in the combo boxes depending on the check box checked or unchecked for each individual rows...
With the cod etaht i...
I seem to have a problem with TwoWay DataBinding - my application has a window with a bunch of textboxes that allow to edit values of the properties they are bound to. Everything works well except for textboxes that also have a validation rule defined, in which case no text is displayed in the textbox when the window opens (binding back-...
Hi
I want Image button with two state(normal , mouse over). that button must change image with Mouse Over event trigger automatically.
this image button must be a user control. Also i want to set image for each state form code in which form i use that user control.
Solution is using a template with "Value Converter" but i don't know h...
I've got a Datagrid with a column defined as this:
<Custom:DataGridTextColumn HeaderStyle="{StaticResource ComboBoxHeader}" Width="Auto" Header="Type" Binding="{Binding Path=Type}" IsReadOnly="True" />
The ComboBoxHeader style is defined in a resource dictionary as this:
<Style x:Key="ComboBoxHeader" TargetType="{x:Type my:DataGridCo...
I think I have found an issue with the DatePicker in the toolkit, perhaps some of you gurus can check it out.
The issue is when setting the IsEnabled property of the DatePicker. If set in XAML, it stays grey even if you set the IsEnabled to true at run time. The same goes for the other way around should it start off being enabled.
Th...
Is there a way to expand the adornerlayer beyond the window boundaries?
I need to create an adorner for a control that will be shown outside of the window edge.
...
I have to develop a customized tab control and decided to create it with WPF/XAML, because I planned to learn it anyway. It should look like this when it's finished:
I made good progress so far, but there are two issues left:
Only the first/last tab item should have a rounded upper-left/bottom-left corner. Is it possible to modify t...
Hi,
Background:
I have a WPF UserControl (MainControl - not shown in code below) that contains another one (called MyControl in the code below).
MainControl has it's DataContext set to an object, that has a Project-property.
When MainControl loads, the Project-property is always null.
The problem:
When MainControl loads, I want to f...
I am developing a Database File System.
I am using -
.Net framework 3.5
Entity Framework 3.5
WPF with MVVM pattern
The project spans across multiple assemblies each using same model.
One assembly,let's call it a "server", only adds data to the database using EF i.e. same model.Other assemblies (including the UI) both reads and wri...
Hi have an listbox and i want external buttons to scroll the listbox. How can i achive this. thanks for help and examples.
...
I have several grids in my window. I have created a storyboard that moves them left by x pixels when a button is clicked. I want to make it so that when the button is clicked again those grids move another x pixels, however I'm unable to find out how to do this as it's not a common task on tutorials.
I have tried creating a second story...
I'm writing code to present the user with a simplified network map. At any given time, the map is focused on a specific item... say a router or a server. Based on the focused item, other network entities are grouped into sets (i.e. subnets or domains) and then rendered around the focused item. Lines would represent connections and gro...