I haven't tried it yet, but this answer looks promising. http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/0cb73e76-b7dd-4a47-af27-cd05da2f305e[^]
Steve The Plant
Posts
-
Binding Commands to Events? -
Binding Commands to Events?Hi Pete, Those events were just examples. It can be any type of event that I might need to handle. In our application we can change XAML files dynamically, so we're trying to avoid solutions that involve code-behind files. Thanks!
-
Binding Commands to Events?Hi, What's a good method to bind Commands to Events? In my WPF app, there are events that I'd like to capture and process by my ViewModel but I'm not sure how. Things like losing focus, mouseover, mousemove, etc. Since I'm trying to adhere to the MVVM pattern, I'm wondering if there's a XAML solution for that. Thanks!
-
How to make a TreeView’s and ListBox’s SelectedItem stay in sync? (in an MVVM app)Hi, I'm certain this has come up before, but I haven't been able to find the answer. I made a basic ViewModel that contains a list of People (an array of Person) with a property called SelectedPerson, which naturally points to the currently selected Person in the list of People. I also have a ListBox and a TreeView that are databound to the ViewModel's People list. What I'd like to do is to keep the ListBox's SelectedValue and TreeView's SelectedItem in sync with with the ViewModel's SelectedPerson. The idea is that no matter how the SelectedPerson is modified (through a control, through code, etc), all the controls should update themselves properly by selecting the correct item. I can get it to work with two ListBoxes, which is nice, but I can't get it to work with a ListBox and a TreeView because the TreeView's SelectedItem is readonly and apparently unavailable through XAML. Where should I look to get ideas on making this work? Also note that I'm trying to make this work in pure XAML. No code-behind as XAML files in my application can be loaded and changed dynamically. Thanks!
-
Building a MVVM 3D Editor Application -> Getting Mouse Position?Hi, In my 3d editor application, I want to be able to click on and move a scene's entities (meshes, lights, cameras, etc). To do that, I imagine that I need to get the current mouse position relative to my Direct3d view and somehow give it to my ViewModel. How would I go about doing that, considering that my app is built with the Model-View-ViewModel pattern? Thanks!
-
WPF "Skinning"I'll check that out, Thanks!
-
WPF "Skinning"WPF Noob question: Can WPF applications can have their appearance change at runtime? I understand, through styles, that one can change the appearance of controls and UI elements, but I was envisoning something more along the lines of having two applications: one "editor" application and a "game" application, both running essentially the same code but having a totally different UI layout (the latter having fewer buttons, simpler controls, menu items, etc). The layout of the "game" UI could be designed by an artist, generally someone who doesn't have access to the underlying code. How do I go about doing something like that? I'd just need a starting point. Thanks!
-
TreeView vertical scrollbar bugI fiddled a bit with my code and found the cause, even though I don't really understand why. My application uses a directx renderer from a DLL that's written in C++. To init the renderer, I pass it the WPF window's hwnd by using WindowInteropHelper. Now the interesting bit: If I init the renderer before creating and showing my modeless dialogs (the ones with the scrollbar problem), the scrollbars don't appear correctly. But if I init the renderer *after* creating the dialogs, the scrollbars are fine. If anyone has an idea of why this happens, I'd be happy to hear it! :)
-
TreeView vertical scrollbar bugAs I mentioned, there are no styles or anything applied to my tree view. Here's an example as basic as I can make it. I'm absolutely stumped. And it occurs on my collegues' computers as well.
-
TreeView vertical scrollbar bugHello, I have a problem with my TreeView not showing the vertical scrollbar correctly. I have plain old TreeView without any kind of style, item template or anything. If I add so many items that they start to appear past the TreeView window, I get a vertical scroll bar. This is pretty standard stuff, I know. But the problem is that the scrollbar itself is strange. Both the up/down scroll bar buttons, which are usually located at the top and bottom of the scrollbar, both appear at the top. Plus, there's no scroll bar thumb between them. I don't know why this is happening. In the design window, the scrollbar is normal. I just find it strange since my tree view is so basic. Any ideas? Thanks!
-
TreeItem with right-aligned delete buttonHi, I'm new to WPF, so please bear with me. I have a tree of objects. For every item on the tree, I'd like to have a delete button that is right-aligned. Here's my best text-based representation: [----------------------------] scene entity 1 x entity 2 x child entity 1 x child entity 2 x entity 3 x [----------------------------] The 'x' represents a delete button, or a small x icon. What's the best way to do this? Thanks!
-
TreeView With Arbitrary Number of Child ItemsHi there, I'm new to WPF, so bear with me. I'm trying to make something like a class browser. I have a tree of objects, but each child in the tree is based on whether the object has variables of a certain type. For example, say I have an Entity class for my game engine. I can have any number of variables in the class, or any derived classes, but I'm only interested in all the variables of type Vector. So for a hypothetical scene, I'd like to show a tree like: scene entity 1 vector worldposition entity 2 vector worldposition vector lookat vector orientation (I hope that was clear enough) [Edit] An additional challenge is if an entity has a variable of type Entity. So another hypothetical scene might look like: entity 1 vector worldposition entity 2 vector worldposition vector lookat vector orientation entity 3 vector worldposition entity child vector worldposition vector lookat The scene could theoretically keep going like this, covering every child entity. What's the best way to display this in a TreeView? Thanks!
-
VS.Net2k3 prob: links, but doesn't create .libThe real problem I have with this is that when I start changing classes around (adding/removing methods), whenever I stop to and continue from a breakpoint, I get "runtime check failure #0" errors. If I rebuild, which updates the .lib file, I don't get these errors. DJCC
-
VS.Net2k3 prob: links, but doesn't create .libHi, I have a weird linking error happening in my C++ DLL project. In VS.Net 2003, when I compile my dll in release mode, I get the normal "linking... Creating library c:\some_path\blah.lib", but if I do the same in debug, I get "linking..." but the .lib doesn't get created/updated. Other than that, it seems to compile file. No errors get generated. I've checked the settings between both modes, and I can't see anything different between them. If I do a "rebuild all" it does update the .lib, but not if I just modify a file and compile the project. I don't want to "rebuild all" everytime I want to test a change. Any ideas? Thanks! DJCC
-
Memory Mapped Files and Performance StrategiesHi! Are memory mapped files typically used for loading/saving speed, or is it just to handle incredibly large files? I'm currently in a situation where I need to load and parse large files (~20 MB) and I'm wondering about the different strategies for doing that as fast as possible. Thanks Shawn
-
Application that handles 200 000+ Lines?Here's some more information about what I want to do: Typically, the data (per line in the file) is going to look like: ... so, in the file, it'll be very much something like 00:00:00 FireCommandOne 1 2 3 00:00:15 FireCommandTwo 0 0 00:00:30 FireCommandOne 1 2 3 ... and so on. I just have hundreds of thousands of them :) The app needs to be able to mainly search by the command name, and then have it possible to refine the search by specifying things like "oh, I want only the FireEventOne commands whose parameter one is 2 and over"
-
Application that handles 200 000+ Lines?Could you explain the technique a little bit? Shawn
-
Application that handles 200 000+ Lines?Hi, I need to build an application that loads a 200, 000 line (or more) text file and lets the user interactively search through it in memory, generating sub-lists of those 200, 000 lines with various search criteria. I'm just wondering if it's wishful thinking to hope that a standard list box can handle that many lines, and be fast enough to traverse. If not, I wonder what other solutions or suggestions might there be. Has anyone seen any applications that sound similar in functionality to this? All the string searching going on makes me think to use Perl, but I don't know Perl at all. Also, I'm probably wrong, but it's a command line only tool, isn't it? Thanks for your time, Shawn
-
Visible Client Area questionHi, How do I determine if the client area of my window has been totally covered up by other windows? In my OpenGl program, I still want to render when the user switches away to another program, but not when the rendering/client area is not visible. Thanks! Shawn
-
MFC app + lib that includes STL linking probsLooks like that works. Thanks :) Shawn