wpf

Special symbols in WPF binding - what does "{Binding Path=.}" mean?

I see some people use it, but couldn't find any explanation on the net... Any other special symbols (other than Binding /) that you know of? ...

WPF and VSM - List of States?

I'm using VSM (Visual State Manager, from the WPF Toolkit) in WPF and I'm trying to find a list of States. Basically, I understand that there are certain "magic" states - like the MouseOver state is automatically applied when the control is moused over, or the Focused state that is applied when ... focused. Is there a list of these so...

Stopping ItemsControls from sharing filters

I have two ItemsControls, one a ListView, and one a custom control I am developing. I have set the ItemsControl.ItemsSource property of both controls to the same IEnumerable object, in this case, a List. I apply a filter to the ItemsControl.Items property of my custom control (this.Items.Filter = myFilter) and my control refreshes as...

Example of a winforms app implemented as a wpf app?

I'm trying to learn more about WPF and I've read a bit about Model-View-ViewModel (MVVM) but if I were to create a WPF app I think I would still do things, out of habit, the same way I did in winforms. Which from my understand is going to eventually code me into a corner. So to one way for me to learn the 'right' way is to compare and ...

Setting Command Bindings via XAML on PageFunction forms

If you are creating a WPF window or a WPF page, you can bind commands to functions within the XAML. <Page x:Class="WpfPageApplication.Page1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:WpfPageApplication="clr-namespace:WpfPageApplication" Title="Page1" ...

WPF Databinding Calculated Value sometimes minutes sometimes hours

I have a WPF window with a textbox, using standard WPF Databinding to an object. This all works fine, the issue is this: The user is entering a time estimate, I would like to give the user the option to enter the data in hours or minutes (through a drop down list). I'd like to keep the data in minutes, and if the user selects hours, mul...

Does anybody write desktop apps using .NET?

I honsetly can't say that I have ever seen a commercial app that uses .NET (other then controls for devs/open source). With it being so easy to 'decompile' a .NET application using RedGates .NET Reflector, I was wondering if .NET was geared toward ASP.NET (since you can't 'decompile' because the code runs on a server and is not stored on...

WPF Custom Controls Deriving from ListView unable to override default style

I am making a simple display grid that derives from ListView, and uses GridView. I want to create it in its own assembly, so i thought of using a CustomControl library and making my ListView there. the problem i have is that when i use the line in the static constructor DefaultStyleKeyProperty.OverrideMetadata(typeof(ExtendedGridView), ...

"Intercept" the opening of any tooltip appwide

I want to show the text of a tooltip of any control in my wpf app inside a status bar, when a tooltip is about to be opened. Of course I could try to loop recursively through all child controls of the main window and set their ToolTipOpening event to always the same method. But is there an easier way ? Something like a Application.Curr...

How can I bind an ObservableCollection of ViewModels to a MenuItem?

When I bind Menu Items with an ObservableCollection, only the "inner" area of the MenuItem is clickable: In my View I have this menu: <Menu> <MenuItem Header="Options" ItemsSource="{Binding ManageMenuPageItemViewModels}" ItemTemplate="{StaticResource MainMenuTemplate}"/> </Menu> Then I bind it with this D...

How to modules in Prism (CAL) communicate with each other?

I've got a WPF application which uses the MVVM pattern throughout, no code-behind, the ViewModels communicate with each other through the MainViewModel which gets injected into each of them. Eventually, this application needs to be incorporated into an application which uses Composite Application Library, Unity, etc. Looking through the...

Event firing in WPF.

I have a tab contol with two tabs. Each one containing listviews. When the selection change event of listview is fired, the selection change of tabcontrol is also fired. How can I prevent this? ...

BInding for Listbox In WPF

Hi, I have a Main window with textbox. I enter some text and click enter it popups a window with listbox and displays the items matching the text entered in the Mainwindow. On selecting the item from the ListBox the text gets set in my textbox of Mainwindow. I am following the MVVM Pattern. I am not able to set the binding for my lis...

WPF Rectangle does not have a Click event

It seems that the WPF Rectangle shape does not have the Click event defined. What am I supposed to use instead? It does have MouseUp, but it's not quite the same behavior. ...

WPF ToolKit DataGrid Performance

I got a DataGrid with 6 column, each column is a RadioButton so that user can select 1 in 6 option. There are about 100 row. I make a custom class with 6 bool datamember, then bind the datagrid with a list of about 100 custom class object. There are 2 problem: The binding time is very slow When I scroll the data grid, sometime the chec...

How to use EPS files in a WPF or Silverlight application?

I have a few images in EPS format which I would like to use in my WPF application. Is this possible? If not, is there a way to convert them to XAML so I can use them directly in WPF? I don't have a budget for Expression Design or Adobe Illustrator, and there are only a few images to convert. ...

Border in ControlTemplate causing odd selection behavior with DataGrid

I've retemplated the DataGridRow in the Microsoft WPF DataGrid to the below, the problem I'm having is if the user clicks on the border elements of the template the Row(s) don't get selected. Is there a way to make the click on the border cause a row selection. <Grid x:Name="LayoutRoot" Margin="0,0,0,-1"> <Border x:Name="DGR_Bor...

Change behaviour of editable ComboBox

Hi all, I want to change the behaviour of the editable ComboBox. This is the behaviour I want: Make the TextBox (PART_EditableTextBox) only visible when IsEditable is true and when the ComboBox is open. I've worked this out in the ControlTemplate.Triggers part: <MultiTrigger> <MultiTrigger.Conditions> <Condition Property="IsEditabl...

How are ListView's ItemCollections related?

If I create multiple ListViews with the same ItemsSource they become strangely linked. In the following example, the two ListViews display a common list of strings. The assertions show that the two ItemCollections and SortDescriptionCollections are distinct, but if I attempt to sort the ListViews differently, the second sort order is a...

WPF Validation on Binding - ComboBox SelectedItem won't validate

Hi, I tried to write my own Validation rule for a ComboBox, the rule is attached to the binding for SelectedItem - However it dosn't work. I've got similar rules working on the Text property ... <ComboBox VerticalAlignment="Top" ItemsSource="{Binding Animals}" DisplayMemberPath="Name" > <ComboBox.SelectedItem> <Bin...