wpf

How to implement smart parts Prism

Hi, I am unable to find a way to implement Smart Parts like SCSF, in wpf prism, can any one suggest a way how to do it, links, articles, appriciated. Thank you in advance, :) ...

WPF WYSIWYG editor using webbrowser

How do I suppress the "This document has changed, do you want to save the changes" when I use NavigateToString on the WebBrowser control? The solution in question 1073366 doesn't work with the WPF WebBrowser. ...

WPF Toolkit - Deactivate Chart Animation

When a new Chart is created and a Series (ColumnSeries for example) is added along with data the columns are rendered as a type of FadeIn animation and appear a split second after the Chart is drawn on screen. Is there anyway to stop this animation happening? Alternatively, is there anyway of forcing the chart to complete the animations...

Delete / Kill / Remove UserControl and its events handlers

Hello, I dynamically create UserControls using Reflection: UserControl myConmtrol = (UserControl)Activator.CreateInstance(t); The UserControl may handle a Closing event but I do not know the name of the handler. When the Window hosting the UserControl closes I remove the UserControl from its parent Window and it disappears from the Wi...

Expand the combobox and its items when it gets focus

Hi, I want to expand the height of the combobox whenever the combobox gets the Focus. I have used the following code to expand the combobox height. <Style TargetType="{x:Type ComboBox}"> <Style.Triggers> <Trigger Property="IsKeyboardFocusWithin" Value="True"> <Setter Property="RenderTransform"> <...

Datagrid Multiselection of same object

Hi , wpf datagrid in which will bind to an observable collection of employee details. Grid will loaded from another screen upon selection of employees by user.If user selecting employee A multiple times same record will loaded in to this grid. But my problem is when i select employee A and then selecting the same employee A of another...

Remove select all from combobox WPF

I have combobox in WPF application that when the user clicks on it, it selects all the text. How can I change the behavior of this to when the user clicks it just set the typing cursor like a normal textbox? ...

Using xaml resources, but keeping unique content per reference

I have several ListBoxes and have set up the group style to make the groups expanders. I want all of the ListBoxes to use the same style information to make them all expanders, but i want to be able to change the content of the header to be custom for each use of the style. Is there any way i can take the out of the but still edit the...

WPF Drawing arrow heads along a path

Just wondering how I might go about drawing arrow heads along a path. The path will change direction and go through several different points. The arrow heads are designed to show the user which direction along the path they need to travel. I've tried to use a brush but it didn't work as I need the arrow heads to orientate them selfs al...

Wpf: IDataErrorInfo not working with CollectionViewSource?

I have a ListBox bound to a CollectionView which again is bound to a property on a viewmodel. <ListBox ItemsSource="{Binding Source={StaticResource pumpCurvesViewSource}, ValidatesOnDataErrors=true}" /> Now, the viewmodel implements IDataErrorInfo, but the validation of the property on the viewmodel is never triggered. If I skip the C...

WPF 4 FixedDocument multiple pages

What is the best way to print a complex layout spanning multiple pages in WPF? (for example an invoice layout spanning multiple pages because of many invoice items) I'm guessing one of these methods would do: Dynamically inserting pages in a FixedDocument? how? Convert a FlowDocument to a FixedDocment. How? The solutions found do not...

Why isn't my dependency property set when binding to it?

I have two collections displayed in my WPF application, and I'd like to have elements from one of them disabled in the other. Doing this I'm creating a custom control FilteringListBox that inherits ListBox, and I want to add some handling inside it to disable elements that are set in a collection set through a property on the FilteringLi...

WPF / Silverlight - selected row style on DataGrid

What is the best way to get a row-by-row selection feel to a DataGrid in Silverlight rather than a selected row and an active cell? For my current application I just don't need the UI effect of an active cell. ...

WPF Popup event handling - How to get triggered when Popup opens

Hi, I created a WPF Popup which contains a grid with border. There is some animation associated with the border which I want to be triggered every time the Popup opens. Currently the code is like this <Popup x:Name="myPopUp" > <Border x:Name="myBorder" > <Border.Triggers> <EventTrigger RoutedEvent="Popup.Loaded"> ...

How can I capture the MouseLeftButtonDown event for any child in the form even the children captured this event?

How can I capture the MouseLeftButtonDown event for any child in the form even the children captured this event? ...

RelativeSource binding from a ToolTip or ContextMenu

What am I doing wrong here?: <GridViewColumn> <GridViewColumn.CellTemplate> <DataTemplate> <Button> <Button.ToolTip> <TextBlock Text="{Binding Path=Title, RelativeSource={RelativeSource AncestorType=Window}}" /> That's just a simplified example, that doesn't work anyway :) Actually I ne...

Equivalent of WinForms ComboBox.DroppedDown in WPF

Hi all, I have some simple example WinForms code which I am trying to translate into WPF. The idea is to change the items within a ComboBox if a certain item is picked and drop down the ComboBox again if this happened. The WinForms code is: if (list.Text.Equals("C>>")) { comboBox1.Items.Clear(); comboB...

How to create custom WPF ribbon tab for COM AddIn

Hello, I have a shared COM AddIn (not VSTO) for excel 2003, now I want to add a ribbon tab to support excel 2007. I did some research online. know that I need reference 2007 PIA, implement IDTExtensibility2, IRibbonExtensibility in my connection and IRibbonExtensibility has only one method string GetCustomUI() string IRibbonExten...

WPF: Putting focus back on textbox recursively calling Lost focus event.How to solve ?

I have a WPF form where a text box and label is present.In the "Lost Focus" event of text box, i am doing some validation and if the validation fails i will show an error message in the label and put focus back on the textbox. The problem is since i put the focus back on the text bos,the "Lost_Focus event s again fired and my validation ...

Nested TreeView with additional properties

This problem has been solved before, but I'm just not getting it with examples I'm finding online. I have a class, lets say 'ClassA', this class has 2 string properties, 'Property1' and 'Property2' as well as an IEnumerable where 'ClassB' also has 2 properties. The list of ClassB will all be displayed in a nested treeview I want these ...