I'm aware, and use, the xxx.Dispatcher.Invoke() method to get the background thread to manipulate GUI elements. I think I'm bumping up against something similar, but slightly different, where I want a long running background task to construct a tree of objects and when done hand it to the GUI for display.
Attempting to do that results i...
I have a WPF with content in it, and would like to print it. Using
PrintDialog pd = new PrintDialog();
if (pd.ShowDialog() == true)
pd.PrintVisual(textStack, "Chinese Pinyin Text");
to print however, means that if I resize my window, some stuff will get cut off. How can I print it and ensure a standard 8.5x11 piece of paper with a...
Just trying to drag my first Menu control onto a WPF application in VS2010.
Is there a way to (via the VS2010 UI) setup the menu items etc? Or does one have to jump into the XAML to do this?
Also it seems like the Menu control, after I drag it onto the window, exists at the top of the Window. However I was expecting it to be rend...
Is it possible to create a bitmap of a window that hasn't been shown without using screenshots?
What I want to do is start my application, and have a main window that displays other windows. I use visual brush to display them after they've been shown, and the image stays after the window is closed, but how do I show an image of the wind...
Hi All,
I have a little issue.
I have a a ListBox that is bound to a list of object. These Objects have a property that can be set. I have in the LIstBox ItemTemplate (a datatemplate) a combobox that is about to the objects property and the combobox has some hardcoded values.
My problem is that when the list box is displayed and I cl...
Any advice or links or sample application (for VS2010) re how to develop a "windowless" WPF application?
That is the ones that look quite modern and don't seem to have the historical window chrome around the edges - they seem to have rounded edges etc...
...
When are WPF and Silverlight going to support Xaml 2009 in Visual Studio?
...
I am trying to do something similar to what the person in this question wanted to do.
Is there any, more elegant, way to do this than the work-around suggested there?
(As a last resort) Is there a different mvvm framework that would have better support for doing this?
Right now I'm trying to make a custom control that inherits from t...
Hi,
I want to add Controls dynamically from ViewModel. I have to add Button and Textbox dynamically to the Grid. In the ViewModel constructor call I need to add the controls. I am not getting how to get the Grid control reference in my ViewModel. Can anybody help me on this?
Thanks in advance
...
I need to get the byte array from my ColorConvertedBitmap representing the bitmap. I was trying to use CopyPixels method but with no success.
How to complete this task and what is the best approach?
Thank you in advance for the replies and hints!
...
Hi I would like to design a system interface where I have different controls(rectangles) animated(light up or glow) one by one and send a message to a Queue as they animate - I am new to c# and wpf so not quite sure how to appoach this - any starting points?
Thanks,
Richard
...
Hi, I'm trying to learn WPF but I find it very difficult to understand bindings, the "resources" thing, and object creation.
My background is in C++/MFC and C#-Winforms.
My questions:
Most of the examples I see in XAML (in MSDN and in two other WPF books I've read) use StaticResource in the binding expression. Are these related in an...
this is my xmal mainwindow :
<Window x:Class="HR1.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width="525">
<Grid>
<StackPanel HorizontalAlignment="Left" Width="162">
<ListView ItemsSource="{Binding...
Hi,
I need an irregularly shaped button in WPF. I am doing it in this way using XAML:
<Button Name="toggleButton" Click="toggleButton_Click" Canvas.Left="177" Canvas.Top="0">
<Button.Template>
<ControlTemplate>
<Image Source="ball.png" />
</ControlTemplate>
</Button.Template>
</Button>
My ball.png image is a PNG ima...
I am writing a note-taking application in WPF, using a FlowDocument for each individual note. The app searches and filters notes by tags. I want to print all notes in the current filtered list as separate documents, and I only want to show a single Print Dialog at the beginning of the job.
I found a good print example in this thread, bu...
I am currently working on an application for the health care industry for my firm. This application is geared towards the smaller end of the spectrum (as in 50 or less users). The application will offer both a windows forms (wpf) app and a Silver Light app. This application will be used in the insurance side of the health care equation (...
Hi,
I need a button for two purposes:
- Users can drag the application's window using the button
- Users can simply click the button to toggle visibility of some other element in the window.
The button is a PNG image.
I am trying to do it in the following way:
XAML:
<Button Name="toggleButton" Click="toggleButton_Click" Canvas.Left=...
I don't quite like a few things in a regular .net 4.0 WPF DatePicker.
I don't like the default calendar icon that always shows '15'. Is it possible to change that, so it could show the actual selected day?
Is it possible to choose several days instead of a one, so when you click and calendar opens you could see all those days, and labe...
Hi,
I have a UserControl that I've added a Dependency Property to:
public partial class WordControl : UserControl
{
// Using a DependencyProperty as the backing store for WordProperty. This enables animation, styling, binding, etc...
public static readonly DependencyProperty WordProperty =
DependencyProperty.Register(...
Continuing from my last question, I'd like to know how can I bind when a button is clicked (can this be done through pure XAML?) - or more simply, how can I do XAML-like binding through C# code?
EDIT: The previous question containing info:
I want to create a listbox that'll be bound to XPath, relative to the other listbox's currently s...