Background:
I'm working on a silverlight (1.0) application that dynamically builds a map of the United States with icons and text overlayed at specific locations. The map works great in the browser and now I need to get a static (printable and insertable into documents/powerpoints) copy of a displayed map.
Objective:
In order to get a p...
I have a WPF window for editing database information, which is represented using an entity framwork object. When the user closes the window, I'd like to notice in the Closing event whether the information has changed and show a message box offering to save the changes to the database.
Unfortunately, changes to the currently focused edi...
Is there anyway in XAML only to have a linebreak in a TextBox?
I know I can set myTextBox.Text = "something\r\nsomething2" in Code, but I can't do this:
<TextBox x:Name="myTextBox">
<TextBox.Text>
Something
<Linebreak/>
Something2
</TextBox.Text>
</TextBox>
or this
<TextBox x:Name="myTextBox" Text="so...
I have something here that is really catching me off guard.
I have an ObservableCollection of T that is filled with items. I also have an event handler attached to the CollectionChanged event.
When you Clear the collection it causes an CollectionChanged event with e.Action set to NotifyCollectionChangedAction.Reset. Ok, that's normal. ...
I'm working on a WPF application and is using the Model-View-ViewModel pattern.
The application consists of two modules at the moment:
Left Panel to browse a tree and select a node
Main Panel to show the content of the selected tree node.
I want to keep these two modules seperated, but when I select a node in the Left Panel I need t...
I am trying to create a user interface using XAML. However, the file is quickly becoming very large and difficult to work with. What is the best way for splitting it across several files.
I would like to be able to set the content of an element such as a ComboBox to an element that is defined in a different xaml file (but in the same VS...
I'm wondering if there are any simple ways to get a list of all fixed-width (monospaced) fonts installed on a user's system in C#?
I'm using .net 3.5 so have access to the WPF System.Windows.Media namespace and LINQ to get font information, but I'm not sure what I'm looking for.
I want to be able to provide a filtered list of monospace...
I am having trouble understanding how the System Registry can help me convert a DateTime object into the a corresponding TimeZone. I have an example that I've been trying to reverse engineer but I just can't follow the one critical step in which the UTCtime is offset depending on Daylight Savings Time.
I am using .NET 3.5 (thank god) b...
You can use XPath if you're binding the XML document in the XAML, but what if you're loading the XML document dynamically in the code behind? Is there any XPath methods available in the C# code behind?
(using .NET 3.5 SP1)
...
I'm writing a class that renders some content in WPF, and I want to give the user control over how the content is rendered. The rendering is mostly stroking lines, so I decided to look to the System.Windows.Forms.Shapes.Line class to get an idea of what properties I might want to implement. This led me to implement most of the StrokeXX...
Hi All,
I have ListView with Grouping Items. Grouping uses custom GroupStyle (Expander). I would like to have check box which will Expand and collapse all groups when. It works fine untill I click manually on the group header and expand or collapse that group. After clicking that particular group stops to respond on check box select...
I'm considering either a ListBox or a ListView for a WPF application. It seems either supports data binding and item templates. My application has a simple list of items that I intend to be able to search/sort/filter based on user input. The data binding demo (http://msdn.microsoft.com/en-us/library/ms771319.aspx) uses a ListBox with ...
I have a WPF app that makes use of a Winforms User Control that I have created using C++/CLI. When my app goes to parse the XAML for my main window, it throws an exception. The information appears to be somewhat abbreviated, but it says:
A first chance exception of type 'System.Windows.Markup.XamlParseException' occurred in Presentation...
I have a page where a few textboxes cannot be empty before clicking a Save button.
<TextBox...
<TextBox.Text>
<Binding Path ="LastName" UpdateSourceTrigger="PropertyChanged">
<Binding.ValidationRules>
<local:StringRequiredValidationRule />
...
I cant' figure out how to reference the current instance object defined by the xaml file in the xaml file.
I have a converter that I want to send in the current instance as the parameter object.
{Binding Path=<bindingObject>, Converter={x:Static namespace:Converter.Instance}, ConverterParameter=this}
In this code this is converted to...
I'm trying to make an item on ToolBar (specifically a Label, TextBlock, or a TextBox) That will fill all available horizontal space. I've gotten the ToolBar itself to stretch out by taking it out of its ToolBarTray, but I can't figure out how to make items stretch.
I tried setting Width to Percenatage or Star values, but it doesn't acc...
I'm starting a hobby project in which I would like to have a graphical, touchscreen interface for interacting with a kiosk-like device running on top of Windows XP Embedded. For development of a rich UI experience, I was considering using WPF. However, a number of demonstration videos that I have come across have used Silverlight, whil...
Using data binding, how do you bind a new object that uses value types?
Simple example:
public class Person() {
private string _firstName;
private DateTime _birthdate;
private int _favoriteNumber;
//Properties
}
If I create a new Person() and bind it to a form with text boxes. Birth Date displays as 01/01/0001 and ...
I have a "Login" button that I want to be disabled until 3 text boxes on the same WPF form are populated with text (user, password, server).
I have a backing object with a boolean property called IsLoginEnabled which returns True if and only if all 3 controls have data. However, when should I be checking this property? Should it be ...
I am trying to create a databound WPF GridView whose rows can either be read-only or editable (by double-clicking or through a context menu). I would like for the row to return to a read-only state if any of its editable controls loses focus. The functionality I am looking for is very similar to this example but with an entire row being ...