Hi,
in WPF I draw an image with an Image Control:
<Image x:Name="Image1" Width="150" Height="180" VerticalAlignment="Bottom" HorizontalAlignment="Center" Stretch="None"/>
Sometimes, the image is smaller than the control. So, what would be the best solution to show an Hand cursor (and get Click-Events) only if the mouse is on the imag...
Let's say I have a Window with a property returning a Command (in fact, it's a UserControl with a Command in a ViewModel class, but let's keep things as simple as possible to reproduce the problem).
The following works:
<Window x:Class="Window1" ... x:Name="myWindow">
<Menu>
<MenuItem Command="{Binding MyCommand, ElementNam...
I asked the following a while ago, but only got back to the problem today. Further investigation has revealed that the problem is that the mouse enter event for the button isn't always firing. Most of the time it does, but either initially or after the button has been hidden (or collapses) the event doesn't fire. If I change to another c...
Hello.
How can I store custom object in WPF DataGrid cell? For example, I want to store something like this:
http://yfrog.com/0583557380j.
I have no ideas :(. Thanks.
...
Hi guys,
I am trying to animate the main window, changing the width and the height. I use a DataTrigger in the main window style to change it but when I run it first triggers the width change and then the height change, I want both of them changing at the same time.
<Storyboard x:Key="TransitToExecution">
<!-- This animation hides ...
I am trying to display tool tip to a stack panel based on property HasValidationError.
<Style TargetType="StackPanel" x:Key="stackstyle">
<Style.Triggers>
<DataTrigger Binding="{Binding HasValidationError}" Value="True">
<Setter Property="ToolTip">
<Setter.V...
Some good controls and examples to chart functions
I am looking for some examples of plotting functions with some code and seeing that on a chart
so If I had a function like
y=x^2+2
I want to see that plotted from say 0 to some really high number.
C# (WPF in VS 2010 maybe) would be ideal or if their is some other library that work...
How to disable all the properties or some of the properties PropertyChanged event for some time when we are using INotifypropertyChanged?
...
I have a weird problem with a ListBox in Wpf, where I have a binding to the ListBox SelectedIndex to a property in the viewModel object.
If the SelectedIndex is less that zero, none of the listbox items are selected. However, if the SelectedIndex is set to a larger number than the actual size of the list, the last item is still selected...
Hello:
I have several HierarchicalDataTemplates in my TreeView. In one of them I would like to display an image to the right of the label if a property in this case HasMissingFit is true, otherwise the image should not be displayed at all.
If I wanted the image to always be present I know I could do this using just an Image tag with a ...
I have a listview that contains two types of objects, single and multiple.
The single is a ordinary textblock while the multiple is a combobox with items.
I'm trying to group the items in the combobox without success. Is it possible? Or should i go for a different approach?
What i'm trying to achieve:
[Combobox v]
[Header ]
[...
I created a Sidebar in Excel using WPF, and trying to drag some some objects from the WPF Pane to the spreadsheet. The Application object in WPF is null. Please guide me how to Achieve this Drag-Drop simple text from WPF Excel Addin to The spreadsheet.
Thanks in Advance
...
I had to prevent the user from selecting a tabitem in a WPF TabControl,
1)unless and untill the user checks a check box in one condition the user should be shown a message box and if he checks the check box he can navigate to any other tab
2)Checking a particular condition the user shouldnt be able to get into a particular tab on selec...
I have a collection of objects that I would like to represent as a Grid with each object represented as a Rectangle (or a Button - haven't settled on this yet). Each object has an X and a Y property which represent its location in the Grid.
For example, I might have four objects:
var one = new MyClass(){X=0, Y=0}
var two = new MyClass(...
hi
Does anyone know of good tutorial how to switch what module is viewed in main region if i would have a win client that consist of 5 regions, Toolbar, Sidebar (with menu), footer and main regions.
I would want to have menu and when i pressed menuitem1 or menuitem1 it would load ModuleA og ModuleB in the main region.
this would be ha...
A TextBox template now contains only 1 named part, PART_ContentHost, that buries the text element and selection element to where it is no longer customizable. Our previous versions of this template had many more named parts and allowed us to explicitly define the selection border element.
We want our selection to be underneath the text...
I have a WPF form which has many controls on it. Many (but not all) of these controls are databound to an underlying object. At certain times, such as when the Save button is pressed, I need to check all the validation rules of my controls. Is there a way to do this programatically, WITHOUT hard-coding a list of the controls to be val...
Does anyone know if it's even possible to enter a line break into a WPF Wrap panel? It goes against what the wrap panel is for, so I'm not sure if it's possible.
And if it's not, is there any other WPF control that actually allows me to enter a line break into it and supports adding childern (my own custom controls?)
...
I have a datagrid with 4 columns. Build Defintion, command, arguments, and a delete button.
I am building a ObservableCollection of a class called monitor which is the dynamicresource for the datagrid. The monitor contains the build definition, command, and arguments. All are string types. The command and arguments are simple as they are...
Hi
I have a strange problem with reference and object cloning, which I'm not able to solve.
I have a class MyClass which consist of property Name. I also have my custon user control, which have a property of type MyClass - myclassproperty. These controls are placed on form. If I click one of control a new form apperas. I pass one argume...