wpf

Displaying multidimensional data in WPF

What is the best way to display multidimensional data in WPF? I won't know the size/shape of the data until runtime. Ideally I would like to use databinding but that is not a strict requirement. I was thinking some sort of grid but I don't know how to dynamically bind to the data and have it figure out the number of rows and columns. Sug...

Is there a WPF show/hide panel component?

Hi, I'm looking for a show/hide component, much like the toolbox from VS2010 and eclipse's panels when something is maximized. Could anybody please point me out? Thanks in advance ...

If Visual Studio 2010 based on WPF, why I cannot open it with reflector?

If Visual Studio 2010 based on WPF, why I cannot open it with reflector? In other words, devenv.exe seems to be native assembly, so where is the WPF UI code? ...

How to make a live stream redirector?

So I have a local URL like http://localhost:port/ with live video stream in it. I need to send it over TCP to http://any_address:AnyPort/ how to do such thing in WPF, C#? CODE WANTED!) ...

WPF Horizontal Scrollbar is not visible

Hi All,      I have a Grid inside ScrollViewer. Grid has only one columns and many rows. I add controls into grid rows. The problem is I can see VerticalScrollBar when I am adding controls but I cannot see HorizontalScrollBar although I add very wide controls. My xaml looks like the following <ScrollViewer> <Grid> row...

WPF View/ViewModels using Generics- how?

New to WPF, so please bear with me... Suppose I have 2 tables in SQL Thing OtherThing Both have the exact same fields: ID (int) Name (string) Description (string) IsActive (bit/bool) DateModified (DateTime) So, I want to create one Model (not two) and do something like this: BaseModel<T>() { public int ID {get;set;} ... } et...

WPF 4 VisualStateManager Problem

Testing to see if our 3.5 WPF application can be upgraded to 4.0. We make use of the WPF Toolkit - in particular the visual state manager. We have some custom controls that extend existing controls and have styling for the Invalid state. We also have a control template that we use for Validation.ErrorTemplate. In 3.5 both the Invalid...

Getting avalondock and wpf ribbon to work on vs2010

Hi all, I'm trying to make Avalon work with WPF Ribbon on VS2010 .NET 4, but all I got is a blank screen overriding even the titlebar. I think this problem is caused by some incompatibility with the RibbonWindow tag, instead of Window. I looked at these posts: http://avalondock.codeplex.com/Thread/View.aspx?ThreadId=62562 http://avalo...

WPF: IEditableCollectionView and CanAddNew and empty collections

We were having some issues with the wpf datagrid and IEditableCollectionView (although this question applies to using IEditableCollectionView and ItemsControl) When you have a collection with no items in it, the IEditableCollectionView cannot determine what items should be inserted so it sets CanAddNew=false we found a solution here (bur...

Changing the path a property is bound to at runtime

Hi, I have a ComboBox with a list of objects bound to it. Currently i have the items templated so they show only the property Class.Name. so the ComboBox is full of Class.Name However i am required to give the user the option to display the property Class.Description instead. If it were just that easy i would be fine, but they want the ...

How to change the style of a combobox to a label or hyperlink in WPF?

I want to change the style of a combo box control to look like a hyperlink. When user clicks on the hyperlink ( combo box) it show options in the combobox to select. The idea is that I want combo box control to display as a plain text ( more readable form). If anybody created this type of sytle please let me know. ...

How to make non-blurry image in WPF 3d

I used Viewport3D and ModelVisual3D to create a simple ImageBrush with an image (I tried it with JPG, PNG), but it shows the image blurry, but the original image is very sharp and clear. I don't know how to make it with the original quality in 3D... I also tried some 2D solutions like RenderOptions.BitmapScalingMode and SnapsToDevicePi...

WPF Custom TextBox ContextMenuOpening Problem

I've got an issue with a custom control that I've written not firing it's ContextMenuOpening event when I hook it up programatically. The control is basically a wrapper for the standard TextBox: public class MyTextBox : TextBox { public MyTextBox() { this.ContextMenuOpening += new ContextMenuEventHandler(MyTextBox_Contex...

backgroundworker+wpf -> frozen window

-progressbar always 0% -the window is froozen (while DoWork r.) -if System.threading.thread.sleep(1) on - works perfectly whats the problem? private void btnNext_Click(object sender, RoutedEventArgs e) { this._worker = new BackgroundWorker(); this._worker.DoWork += delegate(object s, DoWorkEventArgs args) { ...

How Can I Add a New Command to a Control's Event

Hi, thanks for taking a look at this question. I have been building an application (VB/WPF) following Josh Smith's example of an MVVM pattern: Click here to view My Views have Controls which trigger a Command upon an event, such as a button click and these are bound to properties in the ViewModel. My ViewModel exposes properties of ty...

Is it possible to bind a name property of an element ?

I have a grid with repeated columns with same style but different names the name are important for me in code behind so i decided to create a template to repeat the element and read the names from an XML file but i found out i can not use binding for name property please kindly help me sooooooooooooooooooooooooooon here is a part of my ...

System.Timers.Timer leaking due to "direct delegate roots"

Apologies for the rather verbose and long-winded post, but this problem's been perplexing me for a few weeks now so I'm posting as much information as I can in order to get this resolved quickly. We have a WPF UserControl which is being loaded by a 3rd party app. The 3rd party app is a presentation application which loads and unloads co...

Unable to Inherit from MediaElement Class

Hi, I am trying to create a custom MediaElement , and the 1st thing I need is to inherit it from the MediaElement . But this is simply not happneing when I try to inherit like following: CustomMediaControl : MediaElement { } ...

How to work out when WPF Storyboard has completed a Seek and has been drawn onscreen?

I have a WPF storyboard that I want to step through frame-by-frame (for a variable framerate). At each frame my intention is to story a bitmap of the drawn storyboard state. To this end I am trying to employ the following method: this.CurrentStoryboard.Begin(this); this.CurrentStoryboard.Pause(this); //call a function (SEEKFUNC) which ...

Dispatcher.CheckAccess() isn't working from my console application, is there a better way.

I wrote an application in WPF / VB and separated the business logic and UI into different projects. The business layer uses a serial port which runs on a different thread, Now that I'm trying to write a command line interface for the same business layer, it seems to fail when .Invoke() is called. (no error, just doesn't work) I'm pre...