Hello:
Background
I have a TreeView that follows the MVVM design pattern and supports multiple selection by recording TreeViewItem selections in a List. As it stands there are several types of TreeViewItems available for the user to select.
They are:
Two Root nodes of type WorldFolder and MyDataFodler which can contain child Folder...
I have a UserControl that contains a TextBox. The TextBox.Text property is data-bound and validated. When a Validation.Error occurs, I would like to edit the Validation.ErrorTemplate. Specifically, I would like adorn it with a Polyline.
The end goal is to have a UserControl that has a red squiggly line under the text when it fails a va...
I have a canvas which contains a few textblocks and I need to find the top, left corner points that I assigned them in xaml. How can I get those two properties? When I loop through the framework elements on the canvas I can't seem to find those to properties listed.
...
In my projects (WPF) I use System.Windows.MessageBox to show the user a confirmation dialog for operations that are critical, such as a delete-operation.
My problem is that if I specify as button value MessageBoxButton.YesNo, the user cannot use the escape-key to cancel the operation. IMO this is one of the most annoying things, a progr...
Hi,
I have about 30 views and corresponding VMs in my application. I have a help button next to most user controls which gives some description of what the field is for. When the user clicks on that button, a popup opens and gives the description. What will be the best way to make this functionality reusable in all the views?
I have cre...
I have written a small implementation to filter a listbox based on keyboard input. For an example if the listbox has values "Peter", "Ann" and "Andrew", typing character "A" will filter the list down to "Ann" and "Andrew". I have used the ICollectionView.Filter approach for filtering. However, now I need to highlight the matching charact...
My actual scenario is this: I have a ListView and a custom UserControl setup in a master-detail. It is possible, through a menu item, to add multiple items that are initially invalid.
What I'd like to do is, eventually, prevent submission if any items in the list are invalid. Short term, I'm trying to give a visual clue to the item tha...
The pre-release wpf ribbon control uses commands as resources, and the commands aren't dps so you can't bind directly to them. With an attached property and subclass of the RibbonCommand, as described here, I wound up with a pattern similar to this:
// as resources
<ab:CommandReference x:Key="AddCommandRef" Command="{Binding AddComma...
Hi,
Problem:
I have a set of items which have 3 elements:
Image
Description
Numeric Value
I want to display these in a ListBox (similar to the way Excel displays emails in the summary view) however, i do not know the width of the description field. If i dont set a hard coded value for the width in the ItemTemplate im using for the...
This seems like it would be pretty common task, but I'm not having any luck searching for an answer.
I have a WPF/C# application that relies heavily on a dll for database routines. I would like the dll to update some GUI elements, i.e. a progress bar.
So far, it seems that the answer lies somewhere in System.ComponentModel and creating...
Is there a way of automatically tells all children items (e.g. labels, textboxes etc) to have a margin of 5, within a panel (e.g. dockpanel)?
i.e. as opposed to having to set the margin for each element separately - also noting setting the margin on the panel itself is no good as then the panel has the margin not the elements.
by the w...
I need to serialize a color used in a WPF application to a database. I'd like to use the sRGB values, because they're more familiar to those of us that have spent the last few years doing web development.
How can a get an ARGB string (like #FFFFFFFF) from a System.Windows.Media.Color object?
UPDATE: I was misled by the documentation on...
Hi,
I have a listbox which has a datatemplate applied to the items. Each item id to display 3 text fields. The listbox is bound to an observablecollection. Everything is working fine, but when i try to load more than ~100 items into the collection, it starts chewing up all my CPU and takes ages to load.
Any suggestions?
...
Is there any way whether we can stretch Element placed inside a Convas if we give the Horizotal and Vertical Alignment properties to Stretch?
...
Hello may be you can help me. I'm wondering about the fastest way to send and receive information between a WPF app (client) and a PHP (web hosting server).
Is tcp with sockets the way to go? or it'll have problems with the firewalls and IT related stuff?
Do you recommend me to go for a rest php version?
Webservices?
I would like to...
Hi guys i'm very very very new to Rx and trying to put together a simple test app. It basically subscribes to the window click event using Rx and sets the text on a textbox to "Clicked". It's a wpf app. Here's the xaml:
<Window x:Class="Reactive.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
...
Hi every body!
I have a style for a ListViewItem control:
<EventTrigger RoutedEvent="ListViewItem.MouseEnter">
<BeginStoryboard>
<Storyboard>
<DoubleAnimation Storyboard.TargetProperty="BitmapEffect.Opacity"
...
Hi, I would like to know if there is a way to resize a button Width using the mouse, like when you are in the design mode, I'd like to change the cursor to the resize cursor when the mouse pass over the edge of the button, and with a sutained click resize the button.
thanks !!
...
Hi,
If you have several radiobuttons in a group, and you have Checked event handlers in your code behind, if a radiobutton is checked how do you cancel this event handling so that the new radiobutton clicked does not get selected and your original checked button stays checked? The code in the event handler in the code behind distinguish...
I'm new to WPF and the MVVM pattern so I have some problems with my bindings.
In a details view of a customer, I want to list some statuses in a combobox.
In my ViewModel the customer is at the root level, and so is the list of statuses.
When using a static resource, I can use:
ItemsSource="{Binding RelativeSource={RelativeSource Fi...