I need to draw gridlines on the background of a canvas that will have other controls placed on it.
I tried creating a StreamGeometry, using that to draw lines, and getting that assigned to a DrawingBrush. However I find that if the StreamGeometry has too many lines, the program becomes sluggish after the DrawingBrush is assigned to the...
I want to implement a docking library in wpf with behavior similar to Adobe Photoshops CS3.
You can attach floating Panels to other Panels or Docks by mouse dragging. Docks have a fixed location.
Would you use a central Docking Manager class? How would the message flow look like? I was thinking of using 2 interfaces, called IDock and I...
I am making an app that scrolls information on the desktop. The window is transparent. I am starting out simple, trying to find the lowest CPU use for animating things and I am starting with a simple TextBlock.
On my development machine, I get a very smooth animation across the screen setting the Canvas.Left property with a DoubleAnim...
How do I expose the ActaulWidth property of one of the components of my user control to users?
I have found plenty of examples of how to expose a normal property by creating a new dependency property and binding, but none on how to expose a read-only property like ActualWidth.
cheers.
...
We have a large MS Access project that requires GUI functionality that is difficult / impossible to do in the VBA / access forms environment.
Over time, we wish to re-write / migrate to a managed C# environment with WPF as the presentation layer.
The only practical way for us to do this is over a longer period of time - converting som...
Is it possible to migrate a VB.NET Winform solution to a 3.5 WPF solution. If so, any suggestions how to do it?
Thanks in advance!
JFV
...
Hello, I´m trying to separate a gridViewColumn into two rows. Im using default style for the listView. Its no problem to separate the column header into two rows, but it seems like the content is placed over the original style with the border etc hidden under my customized gridViewHeader content. The code looks like:
<GridViewColumnHead...
WPF stores all its data in double precision. I just want to confirm that all transforms, etc., run in double precision.
I'm working on a WPF canvas, which is very large (40,000,000 x 40,000,000), translating and scaling to zoom into it - placing tiles on to it that contain satellite imagery. To scale and translate I'm using a Transfor...
I'm trying to use the FolderBrowserDialog from my WPF application - nothing fancy. I don't much care that it has the Windows Forms look to it.
However, when I call ShowDialog, I want to pass the owner window which is an IWin32Window. How do I get this from my WPF control?
Actually, does it matter? If I run this code and use the ShowDia...
I am implementing MVP/M-V-VM in WPF and I'm having good luck with it so far. However, I don't see how this model supports implementing Modal dialog boxes. I've derived my work from Crack.NET (http://www.codeplex.com/cracknetproject) to learn how this stuff works.
I have a ShellView view (which is just XAML) that has a menu on it. The...
LearnWPF.com posted this article about converting bitmap images to XAML and using them in your applications.
The outer element of the XAML image is a Canvas. However, the Window.Icon property only accepts an ImageSource object. Does anyone know how I can 'wrap' the Canvas in an ImageSource so I can use it as a window icon?
Alternativ...
C#:
public partial class MainWindow : Window
{
Storyboard a = new Storyboard();
int i;
public MainWindow()
{
InitializeComponent();
a.Completed += new EventHandler(a_Completed);
a.Duration = TimeSpan.FromMilliseconds(10);
a.Begin();
}
void a_Completed(object sender, EventArgs e)
...
I am currently coding a program with a WPF UI and I have a button which is either close or cancel, depending on if there were any changes made on the page. To achieve this I want to use a trigger (wrapped in a style) on the button so that when the dependency property HasChanges is true the button will change from "Close" to "Cancel". S...
Hi
I have written a WPF app with .Net 3.5 and want to load it with a shortcut key.
But it does not work.
I created shortcut for the app and went into properties.
It works if I try a .NEt winforms app
I am using Vista.
Malcolm
...
I'm working on a windows client written in WPF with C# on .Net 3.5 Sp1, where a requirement is that data from emails received by clients can be stored in the database. Right now the easiest way to handle this is to copy and paste the text, subject, contact information and time received manually using an arthritis-inducing amount of ctrl-...
hi,
i`m currently playing around with WPF and now i wonder what would be the layout for a typical dataentry window (20+ textboxes and stuff).
atm i`m using a grid object like this (basic sample)
<Grid Margin="2,2,2,2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"></ColumnDefinition>
<Colu...
Why not use partial class to build the ViewModel?
Since the definition of viewmodel classes have some definition of the data classes of datamodel, why not try to reduce some work, extending or making partial classes of the datamodel, completing them with command and etc.
...
Hi,
I need to create ListBox with WrapPanel ItemsTemplate.
My item is displayed as a card with small top "toolbar" that is displaying dynamically on mouse over.
[ dyn. toolbar ]
[ card ]
Everything is running well except the first line.
I need to have cards very close each other. Hence the Height of the item is set to he...
Hi,
I have just realized I've been coercing binding/dependency properties and not really fundamentally understanding the concept.
Heres the dependency property:
public string Problem
{
get { return (string)GetValue(ProblemProperty); }
set { SetValue(ProblemProperty, value); }
}
public static readonly DependencyProperty Proble...
Strange happenings in WPF... When I set the event to MouseUp I can get it to fire when I right-click the button. But this won't fire with either click!
<Button MouseLeftButtonUp="btnNewConfig_MouseUp" Name="btnNewConfig">
<StackPanel Orientation="Horizontal">
<Image Source="Ico...