I need OnDragEnter event for every cell on my WPF Datagrid.
I tried this :
<ControlTemplate TargetType="{x:Type my:DataGridCell}" x:Key="RowTemplate">
<ContentPresenter DragEnter="ContentPresenter_DragEnter" >
</ContentPresenter>
</ControlTemplate>
But doesn't seem to work. Any ideas people?
Edit: Thanks for the responses...
I have created a custom style and template for MenuItem and ContextMenu, and for my first level, that works great, but whenever I add a SubMenu item, the style of that ContextMenu reverts back to the default style. How can I make sure that item uses my custom style? I've tried using the <;Style TargetType="ContextMenu" Key="{x:Type Conte...
Is there a way to use a collection of PathGeometry like these:
Path 1
F1 M 170.255,178.837L 170.255,221.158C 170.255,228.917 164.174,230.777 156.745,225.286L 136.003,209.973C 128.572,204.488 128.572,195.512 136.003,190.023L 156.745,174.706C 164.174,169.217 170.255,171.079 170.255,178.837 Z
Path 2
F1 M 152.29,174.464L 134.314,187.734C 1...
I want to have my own base TabItem class and use other classes that derive from it.
I define base class in MyNs namespace like this:
public class MyCustomTab : TabItem
{
static MyCustomTab()
{
DefaultStyleKeyProperty.OverrideMetadata(typeof(MyCustomTab), new FrameworkPropertyMetadata(typeof(TabItem)));
}
}
And ...
Hi,
I've got a user control that I'm loading into a Window dynamically - I wanted to set the Window so that it didn't have a size and then I thought the window to resize accordingly depending on the UserControl. However it dosn't - can anyone assist please?
I've made a very basic example - I've cut out the dynamic bits and just put a ...
Hi,
This is similar to the "Blinking Browser Application in taskbar".
It has been mentioned that "Title" ought to be changed to have a blinking effect. But there is nothing mentioned about color change.
Is it not window's own property to blink with the usual "orange" color if title or anything is changed?
Please help.
...
How to create Folder picker combobox using only xaml?
...
Is there a simple way to set the background brush of all inactive tabs in a WPF TabControl? I want to emulate the look of VS 2010 on a TabControl--the background color of the control's inactive tabs should match the background color of the window in which the TabControl is sited, so that you see only the text of the tab, and not the tab...
I would like to use ToggleButton in following way:
There are 5 different images and each of them should be displayed depending on current state:
button disabled
button enabled, unchecked
button enabled, unchecked, pointed by mouse cursor
button enabled, checked
button enabled, checked, pointed by mouse cursor
I've found a simple exam...
Dear all,
is it possible for a WPF Label to split itself automatically into several lines? In my following example, the text is cropped at the right.
<Window x:Class="..." xmlns="..." xmlns:x="..." Height="300" Width="300">
<Grid>
<Label>
`_Twas brillig, and the slithy toves did gyre and gimble in the wabe:
...
Hello
I have a simple class. When I use it in winforms binding, whenever I change a value of a cell and leave the cell, the property immediately get changed.
Using WPF Datagrid, whenever i change a value of a cell, the property gets set only after I leave the row. That is problematic for me. What am I doing wrong?
Here is my code:
p...
I have ListView control in my application which is binded to the collection of CustomObject List<CustomObject>. The CustomObject has seperate view. This ListView has seperate view model.
The collection List _customobject is containted in the ListView ViewModel class.
My Query:
I want to invoke a view that show properties of custom ob...
I have MVVM master /details like this:
<Window.Resources>
<DataTemplate DataType="{x:Type model:EveryDay}">
<views:EveryDayView/>
</DataTemplate>
<DataTemplate DataType="{x:Type model:EveryMonth}">
<views:EveryMonthView/>
</DataTemplate>
</Window.Resources>
<Grid>
<ListBox Margin="12,24,0,35" Name="schedules"
...
I have a custom panel for a listbox
<ItemsPanelTemplate x:Key="FloatPanelTemplate">
<Controls:FloatPanel x:Name="CardPanel" />
</ItemsPanelTemplate>
The panel lays out its children using its X and Y dependency properties.
This all works nicely when the FloatPanel is used by itself - I'm using FrameworkPropertyMetadataOptions.Affe...
I have a simple requirement as mentioned below:
A ListView or any control displays list of bitmaps/images. When user mouse hovers on any bitmap that bitmap zoomed to show that is currently selected.
Since I have to provide drag drop operations and click operation that why I taken the list view.
Pleas help!!
It will be great if any bo...
I have a custom control that displays a tryAgain button when the control is disabled.
This nesting is causing the button to become disabled, even if I explicitly enable the button in xaml or with a trigger. Is there a way to override a parent control's "IsEnabled"?
...
I have a model window that contains expander control.
This expander control when expanded shows the user control which allow user to enter input through textboxes.
When expander control is collapsed it hides the user control.
I want when expander is collapsed or expanded the window will resize its height accordingly at run time.
Plea...
Hi
we are trying to add ColumnDefinition to a Grid in WPF dynamically from code behind. The question is: when do you do that? In the Usercontrol's Loaded event? We have a ListView that utilizes a DataTemplate which in turn uses the Grid. How do you access that Grid instance (the one inside a DataTemplate) from code behind? It does have ...
I have several dialogs in the application. I want to pop up help related box when user clicks on the help button next to Main Heading.
The help box is activated by selecting the small blue icon next to the heading. When the help box appears it has the information that is required to understand the entry related to the dialog.
This hel...
Hai am using telerik wpf grid
in grid selection change event am getting the selected row values.
the problem is the values are as object.
object myData = radGridView.SelectedItem;
the object myData contains the row values. but i don know how to get values from the myData object
...