wpf

What is simplest way to draw 3d plot (with 30000 points) in WinForms or WPF?

What is simplest way to draw 3d plot in WinForms or WPF? I have an array with 30000 points (from external 3D Scanner). Now I need to connect this points and make something as 3D Picture (topography). Any suggestions? ...

What is the reason for adding MediaElement to VisualTree?

Hello, I'm trying to find out why the last commented command is necessary in order to play a sound: private void Window_ContentRendered(object sender, EventArgs e) { MediaElement MediaElement1 = new MediaElement(); MediaElement1.Source = new Uri(@"My-absolute-path"); //myGrid.Children.Add(MediaElement1); } Does anybody know? T...

WPF: Adorning a ViewModel?

I have these ViewModels: RecordViewModel, ComponentViewModel where RecordViewModel essentially is a container for several ComponentViewModels. The display of these ViewModels is currently handled by DataTemplates that look something like this: <DataTemplate DataType="{x:Type vm:RecordViewModel}" > <ItemsControl ItemsSource={Binding...

Access Derived class properties from base class collection

Hi, I have created a derived class from a base class and have added the derived class objects to the base class collection.Later when i try to cast the collection objects to derived class,it is throwing error and i am not able to get my override methods and properties.How could i get around this.? I am trying to override the stroke clas...

Embedding Rich Text Editor with mathematical symbols in WPF

Hi, I need to embed a rich text editor into my WPF application. There are many 3rd party controls like those from DevExpress, Telerik. VecorLight etc. But none of them support mathematical symbols like Square root, integration symbol etc. Other than this limitation, these 3rd party controls are fine. But my application needs to enter dat...

WPF-MVVM: Custom Control/User Control/POCO for Paint-like Application?

So I am currently creating a Paint-like application for sports. You will some "shapes" for each type of sport (balls/baskets in basketball, pucks/goals in hockey etc.). Now my main problem is how I should go about designing these shapes. As I understand it there are mainly 3 options: Custom Control with ControlTemplate UserControl POC...

VT100 Terminal Emulation in Windows WPF or Silverlight

I'm pondering creating a WPF or Silverlight app that acts just like a terminal window. Except, since it is in WPF/Silverlight, it will be able to 'enhance' the terminal experience with effects, images, etc. I'm trying to figure out the best way to emulate a terminal. I know how to handle the VT100 emulation as far as parsing, etc. But ...

Forcing the creation of a WPF Window's native Win32 handle

I need to access the Win32 window handles of some of my WPF windows so I can handle Win32 activation messages. I know I can use PresentationSource.FromVisual or WindowInteropHelper to get the Win32 window handle, but I am running into problems if the WPF window has not been created yet. If I use PresentationSource.FromVisual and the wi...

WPF, VB , and the Application object

Scenario: The VB 6 form has a InteropControl (WinForms). The InteropControl has a ElementHost The ElementHost has my WPF control Everything seems to be working except that Application.Current seems to be null when I need it. All I really want to do is hook into the unhandled exception event before the first form is fully displayed. ...

How to databind Click= to a function on the object and not the page

I'm using Silverlight, but I'd be interested in a WPF answer as well I have a list that is databound to an linked list of “Favorites”. Each favorite contains a name and a phone number. The list is bound to a DataTemplate that describes the graphical aspects. In the this template is a button – Dial. When you click on that button I wa...

A 3D scene within a 3D scene

Hi, Consider a camera (on a plane) viewing a 3D model of terrain. Imagine now that it takes a photograph of what it sees. I would like to view the terrain from a different camera (even move that camera around) and I would like to see the picture taken by the plane projected on the terrain. My current approach has been as follows: Creat...

Converting WPF width/heigth into VB 6 width/heigth

My WPF controls need to expose a MinWidth and MinHeigth for the hosting VB 6 application to consume and honor. What's the most reliable way to convert from one to the other. (If it will help, I can change the ScaleMode property in VB 6 to whatever.) ...

Access DataGridCell's children from another DataGridCell?

Hello! I have a DataGridCell that contains a ComboBox. I want, that when I fire 'SelectionChanged' event of it, a CollectionViewSource of a different column (eventually - at runtime, cell) CellEditingTemplate's Resources should be populated with data according to the selected value for this row. Maybe DataTrigger, ActionTrigger, Event...

WPF - DataBinding ImageSource

How can I DataBind my Image control to automatically get the player.PlayerImage updates? As you can see from my code, I have tried to setup databinding, however it's not working. Below is my current setup: I have a CLR class called CDGPlayer that implements INotifyPropertyChanged. The CDGPlayer class has a property called PlayerImage ...

I want to be able to access the routed events for mouse events in a Form.

If you want to get mousemove events over a group of controls in a window, it seems there are a couple of ways to do this, but none are very clean. The hacks I've seen: Application.AddMessageFilter; Blatantly check all events coming to the window. (difficult to limit to a specific part of the program.) Recursively hook up handlers to e...

Border on hover, Button, WPF

Possible Duplicates: wpf flat button Setting Button FlatStyle in WPF I'm trying to do what Microsoft does allways for their apps that button are like images/labels before hover. Ex: hovered normal view ...

How to create wpf custom Button without building style xaml ?

When building custom control, I found that the custom control did not inherit the style from base class (say Button). Is there a simple ways by hardcode without building another style resources ? ...

Click event in UserControl- WPF

Hi. I have a UserControl in my WPF application. I want to call a click event and do some things when the user clicked the UserControl. The problem is- the UserControl doesn't have a click event. I searched on the web and found that you can use the MouseLeftButtonUp event. I tried it- but it doesn't respond to my clicks. Any ideas? Thanks...

How to combine the RibbonControlLibrary Ribbon event mechanism to work with a TabControl?

Hi there. I'm using the Microsofts RibbonControlLibrary for a Ribbonmenu with several RibbonCommands. I have a TabControl that should contain tabs for each ribbon button pressed. E.g. I click on RibbonCommand 2, I want a tab called "Tab2" be created, if it is not already present in the TabControl, otherwise it should be focused. I've al...

Mole for VS 2010?

Does anyone know about Karl Shifflett's Mole for VS 2010? ...