The following code binds a GradientStop to the TemplatedParents Background.Color property.
Everything works but I get a binding error in the output window:
System.Windows.Data Error: 2 : Cannot find governing FrameworkElement or FrameworkContentElement for target element. BindingExpression:Path=Background.Color; DataItem=null; target el...
I have the following code inside my ControlTemplate:
<EventTrigger RoutedEvent="ControlTemplate.Loaded">
<EventTrigger.EnterActions>
<BeginStoryboard>
And I want to start Storyboard which I have defined in ControlTemplate, when control is loaded. So my question is: what in ControlTemplate rises Loaded event...
I'd like to highlight to the user anything that has been modified, so that they know what they have changed or what has been programatically changed behind the scenes for them.
I want to use styles to apply this logic to all my controls, but i'm not sure how. I know I need to create a trigger but not sure what to trigger on exactly or h...
I have a TextBox that gets hidden depending on whether an item is selected in a ComboBox.
This part works fine.
However, it also has ValidatesOnDataErrors set and if the TextBox has an error present, then when the TextBox gets hidden, the ErrorTemplate (in the Adorner layer) remains.
I think I understand that because the ErrorTemplat...
In Visual Studios 2005 and 2008 one can see a short sentence or two describing each property in the Forms Designer. This doesn't seem to be there with Visual Studio 2010. Is this an option that I have yet to turn on? Or is there something I just don't understand about the Help system? I would like quick access to information about th...
How do I add a Column to a DataGrid in WPF?
...
Hi All
I'm just getting started in the exciting world of WPF development, having been a C++ developer for many years.
Testing applications with rich user interfaces has of course, always been hard. One of the problems compounding this has traditionally been that in most Windows apps, the UI, the UI logic and the App logic are all comp...
I have a huge issue with the WPF TreeView. I have setup a tree that is similar to this.
<TreeView DataContext="{Binding Projects}">
<Style TargetType="TreeViewItem">
<Setter Property="IsExpanded" Value="True" />
</Style>
<TreeView.Resources>
<HierarchicalDataTemplate x:Key="LoadTemplate">
<Grid>
...
This is the first time I've posted a pic, so hopefully it turns out well (a picture is worth a thousand words, and I don't want to type a thousand words). But, the image below is what I'm trying to accomplish.
I have a collection of objects that I'm needing grouped by property "Group". I'm using a CollectionViewSource that is bound to m...
How to integrate with OUTLOOK calendar in bidirection way?. I should send task to the outlook as well retrieve calendar task from outlook calendar?
...
Hello everyone, my problem is the following :
I have defined a TextBox as a child of a ToolBar in a ResourceDictionary (x:Key MyToolbar). When my application loads, it places the ToolBar correctly inside the Window frame, along with its TextBox. So far, so good.
Of course, I'd like that very TextBox to be two-way databound to some obj...
Hello...
I have a 2 collumn grid for my application. The one has some minimum width and has width = * and the other has width=auto..
The problem is that when i resize the window ,when the grid has its minimum width the window shouldnt resize....
I can set min width but i should guess the width of the auto collumn and this is not good i ...
I'm trying to do this as MVVM as possible:
My Model (InterestTypeEntity) implements INotifyPropertyChanged.
My ViewModel (InterestTypeAllViewModel) has an ObservableCollection that binds to a DataGrid. When changes are made to it, it sends those changes (add/remove) to the Database.
the problem is, I want to also be able to update the d...
I have a Frame element displaying an html page in my WPF application, and would like to save a screenshot of the Frame as an image.
With the help of the google, I have this code:
Size size = new Size(PreviewFrame.ActualWidth, PreviewFrame.ActualHeight);
PreviewFrame.Measure(size);
PreviewFrame.Arrange(new Rect(size));
var renderBitmap...
I'm putting a WPF application together in which I have an image control which I want to bind a custom command object to from my view model that will execute when the image is clicked. I have exposed the command object from my view model and just need to bind it to the image control.
Is it possible to bind this command object to an image...
I have a model dialog consisting of a datagrid, and OK button, and a Cancel button. It probably should be resizable.
What settings for WindowStyle, etc., would you recommend?
...
I have two listboxes that are very close together, one on top and one on bottom. Is it possible to have one of the listbox items on the top listbox overlap the listbox below?
...
My checkbox is rendered without a check mark. If I use only one checkbox (instance object) to render then I can get the check mark to show, but I cannot use this solution. I need be able to render it using the local checkbox. This checkbox has the Aero theme applied to it via "/PresentationFramework.Aero;component/themes/Aero.NormalC...
I've got a situation which I want to fetch data from a database, and assign it to the tooltips of each row in a ListView control in WPF. (I'm using C# 4.0.) Since I've not done this sort of thing before, I've started a smaller, simpler app to get the ideas down before I attempt to use them in my main WPF app.
One of my concerns is the...
I have a simple WPF window. I intend to set it's background to be one of the images I added to project as Embedded Resource. This is what I tried:
<Window x:Class="A_Boggle.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="A-Boggle" Height="300" Width...