wpf

Displaying and editing a concatenated string enumerable in a bound WPF DataGrid

I'm using a WPF DataGrid with binding in order to display and edit various properties of a class. Many of these properties are IEnumerable<string>. I would like to display these concatenated, with each item of the enumerable separated by a newline character. The value must also be editable - after an edit, the concatenated string should ...

WPF ListView with "readonly" SelectedItems

Here's my situation: I've a many-to-many relationship I'm trying to model in a WPF app, while editing one side of the relationship. The situation is I've a set of users that belong to zero to many groups. While editing a user, I use a ListView with SelectionMode set to Many. Groups that the user belongs to are marked as selected items in...

Binding to ToggleButton

I have a xaml page with 30 togglebuttons on it and I need to bind 4 properties of each togglebutton to a class that I have. I'm able to do the binding, but I'm hoping to find a better solution. My class currently looks something like this: public int ToggleButton1Height; public int ToggleButton1Width; .. public int ToggleButton2Height...

incuding non data elements into a WPF databound combo box

I've been working with two different combo boxes within my solution ( Department and Name) these combo boxes are currently bound to a list collection that is being returned from an external service reference. Where I have a question is in that I need to insert other elements into the combo box other than what is being provided by the API...

How to get the last active url wpf

Hi All, How to create a back button to move to last visited page in wpf. I want hide the navigation bar and give back button option with parameters. Geetha ...

How Change Something in View from Presentation in Prism?

Hi I want to change something in view(user-control) class from itself Presentation class. For example i want to change button content from Presentation. @Extra Info: change something refer to make a change in Controls-visual or something like that. so How I do That? ...

How to get the list of images in the application folder wpf

Hi All, I want to get the image list in the image folder in the application folder. The following code will returns the Images in the Mypicture folder. string[] files = System.IO.Directory.GetFiles(Environment.GetFolderPath(Environment.SpecialFolder.MyPictures)); Geetha ...

Type.GetType returns null when using MEF

I'm currently using MEF for a project to import plugins, as the plugins are written in WPF they each have a view and a viewmodel. The plugins know about the viewmodel but the main shell UI will construct the view and bind the viewmodel using a convention over configuration type pattern. I have used some code from the Build-your-own-MVV...

WPF ListItem Zoom on Event

Let's say I haven a Listbox, or as I do right now a Wrap panel with items bound to it. The items use a custom data template utilizing a custom control if that matters. Now I want to react to a click (or any event in general) and zoom an item towards the user, overlapping surrounding items. Basically a more detailed view of a particular...

Using a ControlTemplate to display a "browse" button beside a textbox used for filenames

Hi, I am attempting to attach a "Browse" button to a number of textboxes that will contain filenames. I was aiming for something like this: <TextBox Text="c:\Filename.txt" Template="{StaticResource FileBrowser}"/> The control template I declared is as follows: <Window.Resources> <ControlTemplate x:Key="FileBrowser" TargetType="...

Grid lines in WPF ListView

How can we show grid lines in the WPFListView control? ...

How to check wpf window's state.

I want to check if a wpf windows is hidden then show it and if it is closed (by close button or by any other methods) then create new and show it. ...

Row Header in ListView In WPF

Can we show Row Header in ListView In WPF just like as spreadsheet. ...

WPF TextBox StringFormat not working with PropertyChanged

I have a problem. I need to have double formatted values in all TextBoxes. When you type something into this, after lost focus it will be formatted. <TextBox Text="{Binding ABC, StringFormat='{}{0:N}'}" /> Problem arises when you add this UpdateSourceTrigger with propertychanged. Then it will never be formatted. <TextBox Text="{Bi...

WPF binding number into different a datacolumn

Is it possible to binding a number to a datacolumn which has no number in it. For example I store the priority in the database as 1, 2, 3 and in the datagrid I want this represented as Love, Medium, High. How can I bind this to the datacolumn, and match it to the correct one? <dg:DataGridComboBoxColumn Header="Priority" SelectedItemBi...

WPF MultiBinding - UnsetValue Issue

I have a TextBlock. When its Text is bound as: <Binding Path="Applicant2.Surname"/> It works fine, however I want to include the Forenames so changed the binding to: <MultiBinding StringFormat="{}{0} {1}"> <Binding Path="Applicant2.Forenames"/> <Binding Path="Applicant2.Surname"/> </MultiBinding> This displays {DependencyPr...

WPF FlowDocument, Viewport3D, Adobe 3D PDF

Hello everybody, In my little test application i created a FlowDocument instance and added a simple Paragraph containing some text. In the second step i added a BlockUIContainer containing a Viewport3D to the FlowDocument and some more text. It all displays well. I can display the FlowDocument inside a FlowDocumentReader and see the t...

WPF ListView SelectionChanged inside style does not work. EventSetter either.

<Style x:Key="OrderGroupTemplateStyle" TargetType="{x:Type ContentControl}"> <Style.Triggers> <DataTrigger Binding="{Binding Path=Name.ShowDetailedInfo, UpdateSourceTrigger=PropertyChanged}" Value="False"> <Setter Property="ContentTemplate"> <Setter.Value> <DataTemplate> <Border BorderBrush="G...

How to use Silverlight SDK with WPF

as easy as it sounds, How can I use the themes provided in SL SDk 4.0 into WPF project?? It should be easy!! Am I missing something? ...

how to optimize the performance of a wpf application

hello all i make a wpf application its running well.but whenever the size of my xml is to big its running very slow every time we fetch data from xml as code below is any body suggest me it is because of this or may be other problem how can i reform this thanks shashank` DataSet xmlData = new DataSet(); Xml...