I am writing an applicaton that will be a standalone WPF application and also a cut down version that will work as Silverlight and so be hosted in browsers. I want the Silverlight application to access data from the cloud. The WPF application needs to work against a local database but then be able to sync with the same cloud storage.
So...
I have a 2-dimensional array of objects and I basically want to databind each one to a cell in a WPF grid. Currently I have this working but I am doing most of it procedurally. I create the correct number of row and column definitions, then I loop through the cells and create the controls and set up the correct bindings for each one. ...
When a user clicks in certain places in my control, I want to change the color of some rows and columns in my grid, then fade it back to the normal color, within say 500ms or so. I haven't decided whether to use Winforms or WPF yet, so advice in either of those technologies would work. Thank you.
Edit: I understand I could do this by ...
I'm looking at using CompositeWPF (http://www.codeplex.com/CompositeWPF) - aka Prism, to build an application I am working on.
The application isn't a traditional LOB application, however it does present data and state information to the user.
One thing which I am unsure of is if CompositeWPF supports more than one Window or Shell. I w...
How do you get 2 unrelated controls to raise the same custom event? All examples I have seen so far have an event defined inside a single control, should I be taking a different approach?
Eg. I'd like to raise a custom bubbling event from an OnFocus handler for a button and a textbox.
...
I place the following statements in the second row of my grid in the xaml:
<ScrollViewer VerticalScrollBarVisibility="Auto" Grid.Row="1">
<ListView Name="listView" Margin="5" Grid.Row="1">
<ListView.View>
<GridView AllowsColumnReorder="True">
<GridViewColumn DisplayMember...
Is it possible to set up a Grid or other container control to be sort of an event dam? So that when any events, specifically a left click, that start within it are working their way up that they stop at that control and go no further?
...
Its my understanding that the recommended approach to localization in WPF is to use the LocBaml tool to extract the localizable items into e.g. a csv file, translate the items into the desired language and regenerate a new sattelite assembly from this csv file. However from my experiments this seems to conflict with the generation of sat...
I've got a simple little WPF app with a TextBox and a WebBrowser control. As I type into the TextBox the WebBrowser updates with its content.
But on each keystroke, when the WebBrowser updates, it makes a click sound. How can I disable the WebBrowser control's refresh click sound?
My XAML...
<TextBox Name="MyTextBox"
...
...
What is the best way to stop a user from resizing the top-level window of an application written in WPF?
...
I have a C++ assembly with both managed and umanaged code compiled to
a DLL. It is correctly imported into the project references as I can
see all my classes and their members with the Object Browser.
The problem is with the XAML Design view. In my XAML code I want to
make a data bind with my C++ assembly so I have the namespace like s...
I know how to create a custom user control in WPF but how can I make it so that someone can provide an ItemTemplate?
I have a user control that is a mixture of several other WPF controls, one of them being a ListBox. I'd like to let the user of the control specify the content of the list box but I'm not sure how to pass that information...
I am trying to do this...
<Image x:Name="imgGroupImage" Source="Images\unlock.png" Margin="0,0,5,0" />
But I get this error...
Cannot convert string 'Images\unlock.png' in attribute 'Source' to object of type 'System.Windows.Media.ImageSource'. Cannot locate resource 'forms/images/unlock.png'. Error at object 'System.Windows.Hierarc...
Let's take a very simple example:
In my window1.xaml, i have a label
control named 'lblProduct'.
In my window1.xaml.cs, i have a
public method called
CalculateProduct(Int Var1, Int
Var2). CalculateProduct will, as
you may have guessed, calculate the
product of the variables passed in.
I'd like to simply bind the results of 'Calculat...
I would like to add some icons to my treeview. Is there a way to do it within the XAML?
<TreeView Height="200" Name="treeView1" Width="120">
<TreeViewItem Header="Topic1" IsExpanded="True">
<TreeViewItem Header="Subtopic2" />
<TreeViewItem Header="Subtopic3" />
</TreeViewItem>
</TreeView>
...
WPF GridSplitter makes my Grid wider than my Window!
I've got a WPF Grid with a GridSplitter. If I resize my columns, then I can make my grid wider than my window and non-viewable.
It starts like this:
But after widening the left column, I can no longer see the right column (green):
What am I doing wrong? How do I keep the ...
I have written a WPF application that I want to port to Silverlight 2.
My business logic and model (for the M-V-VM design pattern) are packaged into a separate assembly which I am trying to recast as a Silverlight class library.
Unfortunately, the XmlNode class which I use to parse an XML file with model data is not supported by Silve...
I am searching for a DateTimePicker control which can be used as a textbox so user can enter date/time data at will (ie; type in the string "11/09/2008 12:30:00") or can select date/time from a drop down list that contains a calendar/time box (what i meant is that this control can provide both options as mentioned). If you have found suc...
I am creating menus in WPF programatically using vb.net. Can someone show me how I can add separator bar to a menu in code? No xaml please.
...
This seems like it should be easy but I'm stumped. In WPF, I'd like a TextBox that stretches to the width of it's parent, but only to a maximum width. The problem is that I want it to be left justified within its parent. To get it to stretch you have to use HorizontalAlignment="Stretch", but then the result is centered. I've experimented...