Where would I set default values that I want to use throughout a project and only define once?
An example would be a default margin, or a color that I want to use in multiple places.
In pure C, one way to do this would be with a "defaults.h" header file with "#define"s.
...
Hi!
In my WPF application, I have a boolean property which I would like to show to the user (for example with a read-only checkbox). Normally I would implement INotifyPropertyChanged so WPF can act on that and change the checkbox accordingly.
The problem I am having right now is that this property value is retrieved from a closed frame...
I've subclassed Canvas so that I can override its Render function. I need to know how I can load a bitmap in WPF and render that to the canvas. I'm completely new to WPF and I haven't found any tutorials that show you how to do something so seemingly trivial. Step-by-step instructions with examples would be great.
...
I have a WPF app, where one of the fields has a numeric input box for length of a phone call, called ActivityDuration.
Previously this has been saved as an Integer value that respresents minutes. However, the client now wishes to record meetings using the same table, but meetings can last for 4-5 hours so entering 240 minutes doesn't se...
I'm writing a WPF app that has a canvas in it. This canvas will be custom rendered at runtime. It's sort of like a game in that it needs to be measured in pixels. I need to be able to set my Canvas to 478x478 pixels (client rectangle size). I don't want any scaling or other resolution-independent steps to take place on my Canvas.
I'm no...
I have a special ControlTemplate for some of my Buttons.
<ControlTemplate TargetType="{x:Type Button}">
<Path Name="ThePath" Fill="White" Stretch="UniformToFill"
Width="12" Height="12" Stroke="White"
StrokeThickness="4"
Data="M1.5,1.5 L10.5,10.5 M1.5,10.5 L10.5,1.5"/>
<ControlTemplate.Triggers>
...
For a testing usage of not very complex WPF applications I often don't make installer - just, after building project, copy Bin>Debug folder content of a VS2008 project folder to a hard drive of a user computer and put an icon to a desktop. No records to windows registry.
Are there any drawbacks of such a way of using windows application...
I was doing some .NET programming in WPF which involved reading .png and .txt files, placing images on a canvas, moving them around and then removing them and all of a sudden I get a bluescreen. I didn't think my little tinkering could cause a driver issue until I restarted and did the exact same thing with my program and I got another d...
Say I have a binary tree, where the root of the data structure is just a tree node. For each node, the children are accessible through the Children property. Here's what I tried. The TreeRoot is a property of the inherited data context, but it's a single node (not a collection).
<UserControl.Resources>
<HierarchicalDataTemplate x:Ke...
What is the procedure for disabling hardware acceleration in WPF? What is it exactly? Is it a windows setting, a visual studio setting or something you alter in the code of your wpf project? Will it affect only the program you're running or will it by system-wide?
...
I have created a custom button by using a Style and a Control template. I would like to define some custom properties for this button such as ButtonBorderColour and RotateButtonText.
How do i go about this? Can it be done just using XAML or does it require some C# code behind work?
...
Is there a way to launch an Explorer window and highlight a file in that folder with WPF ? I've already tried the following :
Process ExplorerWindowProcess = new Process();
ExplorerWindowProcess.StartInfo.FileName = "explorer.exe";
ExplorerWindowProcess.StartInfo.Arguments = ConfigFile.File.FullName;
ExplorerWindowProcess.Start();
....
I am writing an application that uses a GridView. I am dynamically creating GridViewColumns and setting their CellTemplate.VisualTree property to a FrameworkElementFactory that creates a StackPanel containing some other elements. The DataContext of the StackPanel is being bound to an item contained in a collection in the dataitem. Basica...
Hi Friends,
Iam new to this forums. by the suggestion of my friend i came to know that this forum is very very good and we get a very good responses. iam new to .NET 3.5 , WPF, infragistics and MVVM.
I have two calender controls and button control ( when clicking the button user see a list of events between the date range. We follow M...
I am trying to prepare myself for being challenged with the question:
"Why cant we just implement the presentation model in the code behind?"
In fact I have worked on a project where we used a Presentation Model that was implemented in the code behind. It worked fairly well, we were even able to run unit tests on it. Yes you have a dep...
Hi
What is the generic way to maintain state in multi-players game over internet, which can be played on GUI of WPF or Silverlight? One player might be on WPF gui and others might be on Silverlight GUI.
P2P, HTTP server or some other technique? please advise.
thanks, AJ
...
I am Using Visual Studio 2008 sp1 for a WPF application with Visual Basic. I am trying to use the line "Imports System.Deployment.Application" so I can use ApplicationDeployment to create a button to manual check and install updates to my application. However, I get a message that "Application is not a member of deployment". I have co...
I am new to WPF, I am using VS2010 beta2, .NET 4.0.
Throw new Exception("test") in my code simply swallows exception and application does not crash.
This is not what I expect, I want the application to crash if unhandled exception occurs.
Is there a simple way to achieve this?
Also, neither Application.DispatcherUnhandledException no...
I apologize for the poor title, I don't know how else to explain it.
I have an interface like this (sorry can't post an image directly as I'm new).
And I want to have the right side display controls based on the tree selection on the left. What's the easiest way to do this in a WPF project? Is there a better way to go about this?
Than...
Hello,
I have a little problem and I don't know how can I fix it ...
I created a CustomControl called "StandardKeyView" from a Button. This control has a dependency property "DownImage" which is used to define a Background Image to my control during the mouse over.
Here's the definition of the DownImage property :
public SolidColorBr...