I am trying to load an image in the background and then update the UI. I have been playing with this all day and I don't know what I am missing. I keep getting the following error:
"The calling thread cannot access this object because a different thread owns it."
I've hunted around following example after example, but I cannot se...
My question is simple. What is the best way to achieve what you see the pic below in WPF?
At the moment this is a horizontal StackPanel, with the right padding of the checkbox set to 90. This works okay, but if you resize the window it's no good anymore, unless maybe you re-adjust the padding in the window's resize event, but that seems...
Say I want a TextBlock to have its Width equal to it's Parent container's Width (ie, stretch from side to side) or a percentage of it's Parent Container Width, how can I accomplish this in XAML without specifying absolute values?
I want to do this so that if the Parent Container container is later on expanded (its' Width increased), it...
To understand how the binding works, I implemented MyContainer derived from FrameworkElement. This container allowes to set Children and adds them into the logical tree. But the binding by ElementName does not work. What can I do with MyContainer to make it work, leaving the parent as FrameworkElement?
C#:
public class MyContainer : Fr...
I'm developing a WPF application and I wonder if it's possible for the main window to have a Vista look. Some applications like MS Live Messenger and Google's Chrome already do that.
Any ideas?
Thanks.
...
To store an object (say, an instance of a class) in a TreeViewItem, I am currently storing the object in the TreeViewItem's Header and then overriding the ToString method of that class, so that it displays the correct string header; I then cast the object back during an event.
Is this the correct way to achieve this sort of thing, or ...
I am developing for a MS Surface unit and am using a ScatterView to display some data. The scenario below probably fits a normal ListBox (and ListBoxItems) too.
When I databind the ScatterView, WPF automatically wraps the contents of the DataTemplate with ScatterViewItems. I want to attach some event handers for the ScatterManipulationC...
When I worked on web pages I used these a lot. While building a page out for WPF project the other day I ended up building a page that looked like it had an in-page dialog on it but it was the only thing on the page.
My question here is. Has any one created such component that allows for easy creation of these kinds of dialogs.
...
There are two "layers" (Image control with PNG bitmap) inside Grid (or Canvas): one image directly positioned on top of other one. Is there a way to display combined image created by multiplying images colors (the Photoshop/GIMP layer effect)?
...
I have an application that generates a replay of Air Traffic and I need to allow the user to capture parts of the canvas so it can be exported as a BMP of GIF. I did this in VB6, but not sure how to do it in WPF. I plan on drawing a rectangle around the intended capture area following the mouse till the user triggers the capture.
Tha...
With regards to a question I posted earlier on (WPF: Correctly storing an object in a TreeViewItem)
Is it possible to have nested HierarchicalDataTemplates in a TreeView?
Take the following example:
Code:
public class Artist
{
private readonly ICollection<Album> _children = new ObservableCollection<Album>();
public...
In my program I have three distinct UI states (Normal, Success, and Error) and in each one the controls are visible/hidden, enabled/disabled, the colors change, labels say different things...etc. and in my code-behind I basically want to be able to say ChangeWindowState(UI.Normal);
So my question is how best to implement the control cha...
I am currently writing an application that will allow a user to install some form of an application (maybe a Windows Service) that will open a port on it's PC and given a particular destination on the hard disk, will then be able to stream mp3 files.
I will then have another application that will connect to the server (being the user's ...
I'm writing a WPF application and I'm trying to figure out the best binding approach but have been coming up only "hack" solutions and I'm hoping there's a better way.
I have a Border object (which derives from FrameworkElement) inside a Grid. The Border's size may change because of a child TextBlock's text changing. The Border's posi...
I have a problem regarding GridSplitter visiblity.
In this, whatever I am hosting a Winform DataGridView. The GridSplitter, when dragged is properly visible on other controls. But not on this grid. In fact, whatever I host instead of Datagridview, becomes the topmost control,which makes the GridSplitter hide behind it.
<Grid>
<Grid...
Hi,
I am working in a WPF application. And my problem is regarding the GridSplitter visiblity.
In my xaml code,I am maitaining a Grid. In the 3rd row of Grid, I am hosting a Winform DataGridView. In the same row, the GridSplitter is written.
When GridSplitter is dragged to adjust Grid Row sizes, for other controls like Buttons etc it...
I am intending on learning WPF and Silverlight to the extent of its advanced details.
What book is good for taking a practical approach to Silverlight? IE one which walks the reader through creating sample apps. I am particularly keen on writing a graphing system as graphs are a common requirement throughout various projects. I am on .N...
Hi all,
I'm using WPF datagrid which is bundled in WPF toolkit... the problem is I'm not able to align some column data to center
Please help me guys
...
I'm looking for code of full applications that (1) use the MVVM pattern and (2) are approachable for WPF/Silverlight/MVVM beginners. So far I have only found:
Crack.NET - A runtime debugging and scripting tool (useful but quite complicated)
CipherText - WPF Password Manager (perfect but written in VB.NET)
What are some others?
prefe...
How do I format a string to display date and time as
06-Apr-2009 04:25 PM
Can any One help?
Thanks
...