I have a 2 converter.
Boolean to Visibility(Bool2Visible) - This converter convert Boolean value to Visibility enum
Invert Boolean(InvertBool) - this converter invert Boolean value
My xaml is here
<stackpanel Name="A"
visibility="{Binding isTrue,Converter={StaticResource Bool2Visible}}"/>
<stackpanel Name="B"
vi...
Let's say I have a collection of objects of different classes. Each class has its UserControl DataTemplated in a resource file.
Now I want to use ItemsControl to display the collection, but I want an Border or Expander around each item.
I would expect something like this to work:
<ItemsControl ItemsSource="{Binding MyObjects}">
<I...
I've created a listbox which contain filenames. I want to give user a option to move up and down file name using up/down button and using drag and drop.
Anyone has an idea how to achieve this functionality.
XAML Code:
<ListBox
Grid.Column="0"
Name="listBox1"
AllowDrop="True"
Drop="listBox1_Drop"
/>
<StackPanel
Grid...
Hi,
I have WPF 4 desktop-based application. In one of the windows of this application I have DataGrid with data, binded with SQL Server database (via ADO.NET Entity Framework). In order to manipulate with data I have delete button, that deletes selected row from DataGrid and call SaveChanges() method.
Now I want to add support for keyb...
I'm working on a simple mark management system for a school department (let's assume it's the Maths department). They want a simple system for users to enter marks for each student as they progress, entering marks for each term, getting yearly averages, sorting by teacher, etc.
Speaking to the person in-charge of the department, he said...
hi guys, say I have this Button markup:
<Button Visibility={Binding Path=Mode, Converter{StaticResource VisibilityConverter}, ConverterParameter=<i want Button.Content here>}
Where the Button.Content is something I want to put at the expression for ConverterParameter. It refers to the current Button's Content property. Thanks, any hel...
When I execute a routed command, let's say:
ApplicationCommands.Undo.Execute(null, this);
WPF does some magic to find the proper CommandBinding on which it executes the ExecutedRoutedEventHandler.
Is there a way to get a reference to the CommandBinding (or at least to the handler) that would be executed?
It would sometimes be nice...
Hi All,
I am trying to do something that should be simple, but think I am just not seeing the answer.
I have a List with several strings.
I would like to bind it to a DevExpress DXGrid.
It appears that the grid is showing the correct number of row, but not displaying my text.
I am using the MVVm patern and have seperated my ViewMode...
HI am interested in obtaining getting the Enviroment.UserName in a Wpf Browser application.
But I have run into a SecurityException. What changes should I make obtain the enviroment variables.
Update:
the application is run on my company intranet.
...
I've seen several methods for handling this across several libraries but I wanted to know what is the best way to do this, specifically, with MVVM Foundation. I'm trying to capture double click for list item. Thanks!
...
Here is my scenario...I have a WPF app that talks to a WCF service.
The connection string settings are in the WCF service. The WCF service can be deployed to two different web sites, one for QA and one for PROD (each with its own URI).
I want my WPF app to be able to be run using QA data or PROD data. Basically, I would pass a pa...
Hi,
I have a DataGrid with data in my WPF 4 desktop-based application.
When user click twice on row DataGrid switches to edit mode, where user can change values of cell. Now I want that on specific cell user could only choose values from combobox, e.g. sex — mail/female and not to type something else.
How can I show comboox on edit mod...
I am getting a bit frustrated with prism. Something that should be so easy is really getting me stuck!
I am trying to load my ModuleCatalog from a file. I created the ModuleCatalog.xaml file in my shell project. In the file's properties I have removed the Custom Tool action and I have set Build Action to Resource (I also tried Conten...
I'm not sure what I'm doing wrong here...
I have a custom HashTable that has a method that allows someone to delete a "partNumber" (a value) from the HashTable.
The delete method is as follows:
class COSC202HashTable : INotifyPropertyChanged
{
public event PropertyChangedEventHandler PropertyChanged;
//....
private List<i...
Hi,
I develop WPF4 application and in my app I need to let user to select a folder where aplication will store something (files, generated reports etc.).
My requirements:
— Ability to see standard folder tree
— Ability to select folder
— WPF look & feel, thid dialog must looks like part of modern application designed for Windows Vis...
What is the best way to allow a user to insert photos for an image viewer? The end result I am looking for would be thumbnails in a listbox that when selected would open in a viewbox. I understand the binding, but I don't know how to get the photos to a folder or whatever from the user.
...
In WPF's DataGrid control, if you set a column to one of the default column types (like DataGridTextColumn or DataGridCheckBoxColumn), sort on that column, and then change its value, the grid will automatically be re-sorted.
However, if you use a DataGridTemplateColumn (and allow the column to be sorted), it can be sorted, but changing ...
Hi Guys,
I'm trying to display the Title of an Tabitem in his contentpresenter. Is there a possibility to get this name?
For example in the Tabcontrol Template something like
<Label>
<ContentPresenter ContentSource="SelectedContentHeader" Grid.Row="1" />
</Label>
to display the name of the current tab in label.
Thanks in advanc...
Which is the best third party tool available for wpf application localization.
...
How can I make columns coloring in DataGrid if I also want use AlternatingRowBackground property?
I have some ideas, but it doesn't work :(.
<de:DataGrid Name="dataGrid1"
AlternationCount="2"
AlternatingRowBackground="Salmon"
>
<de...