I want to get notified when I click a window in WPF (I use the GotFocus event), but it only triggers when I click on a Combobox in the window. What I want is to get notified when the the window or any of the controls in the window is clicked. Any ideas of how to do this?
...
I'm binding an ItemsControl to an EntitySet in a WPF application. Its not acting as expected, however. The ItemsControl is behaving as if it is caching the contents of the EntitySet between binds!
Here's the stripped down code:
The entity:
public partial class Item : INotifyPropertyChanging, INotifyPropertyChanged
{
private Enti...
Hi!
I want to add a drop shadow to an image file. What's the best way to do that?
I thought about creating a WPF Image control and adding a bitmap effect.. But how can I save the result to a file?
Thanks, Eric
...
I have seen many examples of creating a WPF Toolkit DataGrid in XAML and it is possible to write certain tags and there will be some columns, rows, etc depending on what you wrote.
Lets say I have an empty (it has no columns, no rows, nothing) WPF Toolkit DataGrid that has been created in XAML how do I add columns in C# programmatically...
I'm having some trouble getting this to work in a WPF app I'm working on. Basically, what I'm after is something like the Task pane in an MMC:
The app has three columns in the main part of the display. I need a column on the right side which is resizable. I presume this means using a Grid with a GridSplitter but anything that works ...
I'd like the main menu in my WPF app to behave like the main menu in IE8:
it's not visible when the app starts
pressing and releasing Alt makes it visible
pressing and releasing Alt again makes it invisible again
repeat until bored
How can I do this? Does it have to be code?
Added in response to answers submitted, because I'm stil...
I started a hobby project to learn about WPF and in my reasearch i stumpled upon this WPF PropertyGrid http://www.codeplex.com/wpg
I downloaded the source from http://wpg.codeplex.com/SourceControl/ListDownloadableCommits.aspx
, And started browsing through it, looks cool, and works. But for the life of me, I can't figure out HOW it wor...
Hi I am trying to create a reusable XAML Window in a DLL.
I have placed in the Themes folder a new ResourceDictionary (I even merged it in the Generic.xaml), but when I try to use its styles in the window, I get an error message that the style doesn't exist:
<Window Style="{StaticResource ModalWindowStyle}" >
<!-- I have also the f...
Hi All,
I'm new to WPF, and I need some help.
I have a slow-loading WPF app, so I am displaying a splash screen as a stopgap solution. However, I'd like to be able to have the screen change on each run, and display a different quote in a text area (it's a productivity app, so I'll be using non-sappy yet motivating quotes).
I wouldn't p...
I've run into a problem with WPF when I try to use DataBinding with an image as a background to a border. I have no problem rendering the image this way:
<Image Name="imgPlayer" Width="100" Height="100"
Source="{Binding Converter={StaticResource ImageConverter}, Path=Image}"
/>
My DefaultImageConverter just checks if the image is...
I have been going crazy with binding a combobox to an enum typed property of a class, where the enum itself is declared in that same class.
I am trying to follow the answer provided here (wpf combobox binding to enum what i did wrong?) Specifically I am using the suggested MarkupExtension code and the matching xaml code.
My working c...
Hi all,
I'm currently working on a WPF (with C# behind the scenes) system which requires rendering of data from many different files. Most of those files are AutoCAD documents. Each file comes with a set of data that we need to draw on screen essentially on the same canvas. Think of each file as a potential "layer" or overlay that needs...
I am creating and with content 'Save & Add'. I write it in XAML, but the symbol '&' is not accepting. What is the reason for that. How can I do that?
...
Hi!
i have created tree view demo in Visual Studio 2008 C# in WPF but i want to give header and when header is clicked it sort data. i want to create demo like this
header1………….header2……….header3
-parent1…………..parent2………..parent3
…-child1……………-child1………….child1
……child1……………-child1…………child1
-parent2…………..parent2………..parent2
…-ch...
Hi,
I would like to make a TreeView that displays servers and folders. According to my needs, I made 2 classes :
-- Folder
class Folder
{
// Hidden attributes
public String ElementID { get; set; }
// Attributes displayed in the treeview
public String ElementName { get; set; }
// This collection is binded with the...
I am working an a sortable WPF ListView and I made a lot of progress already. It's not so hard since there is a lot of stuff on the internet already. But there is a little bit of information I am still missing.
With a Colum like that:
<GridViewColumn Width="200" Header="Fahrzeugname" DisplayMemberBinding="{Binding Name}">
I can sort ...
Hi all,
I have created 3 storyboards in a usercontrol resources which animates controls inside the usercontrol. But the problem is that i have to start each animation on textbox's gotfocus events. I cant able to synchronize these 3 storyboards on each textbox's events. All works fine if i waited for 1 animation to complete and then focu...
I have a list containing objects that follow this structure. This is not the real classes I am working with, but should explain the concept.
CLASSES
public class BaseType{}
public class TypeA : BaseType{}
public class TypeB: BaseType
{
public List<TypeA> TypeAList { get; private set; }
}
The List that the ItemsControl binds to is...
How can I different design the text within the TextBox-Element in XAML
Example: I need the first word normal fontweight and the second word bold...
...
Hi,
Is there a way to make the treeview show lines connecting items when we expand them?
Thanks!
...