wpf

WPF Performance Issue

We have quite some performance issue in our wpf application. The application itself is a WinForms app that is using ElementHost to host smaller wpf-applications. In one of the smaller apps we have a listbox that are using UserControls as items. When we do some performance-testing on this app feeding it with 1000 items and filtering the i...

How to access ItemsSource property of a DataGrid defined in UserControl from main xaml file ?

I have declared a DataGrid in UserControl. Now I have included the UserControl in my main xaml file. I am trying to set the ItemsSource property of DataGrid from main.xaml; but I am getting an error "The property ItemsSource doesnot exist in the namespace". I am able to set the other properties like Background,Foreground, etc. My Us...

WPF usercontrol dynamic itemsSource

I've got a UserControl with a ObservableCollection member. In the UserControl i have a ListBox and i want the ListBox ItemsSource to be the the UserControls ObservableCollection. UserControl: public partial class Timeline : UserControl { public ObservableCollection<TwitterStatus> Tweets = new ObservableCollection<TwitterStatus>();...

ListBox.ScrollIntoView() does not seem to work in WP7

Hey guys, I want to move the listbox scrollbar to the bottom whenever a new item is added to the itemssource, but ScrollIntoView() doesn't seem to do anything if I pass it either a reference to the newly added item, or the index of it. Has anyone gotten this to work, or have any other suggestions as to how I could scroll the listbox down...

wpf: How do I layout items horizontally and uniformly sized?

What sort of control can layout child items horizontally and also uniformly resize the items to fit the available horizontal space? I'm replacing the "ItemsPanelTemplate" within a treeview template and a stackpanel will lay the items out in the correct orientation, but not resize them. A grid will only show the first child item in the tr...

Coerce a WPF TextBox not working anymore in .NET 4.0

In my WPF application I have a TextBox where the user can enter a percentage (as int, between 1 and 100). The Text property is databound to a property in a ViewModel, where I coerce the value to be in the given range in the setter. However, in .NET 3.5, the data is not shown properly in the UI after being coerced. In this post on MSDN, ...

How should I access multiple ItemsSources from filtered collections when the objects get unwieldy?

I have the equivalent of a clothing store. I put in standing orders for clothes to be delivered each month, but some things can be flexible each month - for instance, I know that I am more likely to sell black clothes during the winter and tighter sizes during the summer. There are some elements of the order which don't change, and some...

WPF and DWM for redirecting output over the network

Im writing a large WPF app (large as in screen res), running with some basic controls, basic video playing, etc... I have been researching how to broadcast/redirect the WPF window to other monitors over a local network. In essence, trying to show a select region of the WPF app on seperate monitors in real time. I have been reading abou...

Combo box with a tree view

Hello all, I have a combobox which when clicked will show a treeview in the drop down. In the displayed tree view you can check and uncheck treeview items. But when I double click on treeview items I am getting a part of tree view displayed in the editable text box of the combobox. I dont want anything to be displayed there? How to get r...

Grid row height binding stop binds after splitter was moved

I got a grid (2 rows) with grid splitter, the splitter is at the second row. I want to bind the second row height to a member, so I can control the view by a button click: At the begining the view shows only first row, when button clicked the view show both rows and the splitter is in the middle, after another click the second row and t...

WPF inside WinForms, why is a Child instance created?

Hello, Question: I have a WPF control hosted in a WinForms application with the use of the ElementHost. I’m hosting the WPF DatePicker control. Everything works great, except when I resize any control in design mode a Child instance is created by the “designer generated code” in the InitializeComponent method. Child = new MyControls....

The most significant certification in WPF?

Good afternoon. I want to give myself a goal to learn WPF. Tell a certificate that must pass to be sure that I know WPF. I'm interested in both free and paid certificates. ...

WPF textbox usercontrol containing items, not simple text (for adding email recipients)

Hi, does anybody know of any usercontrol that would function well as a textbox for entering email recipients. The control would appear as a simple textbox. When a user would enter some text a drop down list of matches would be displayed. When he would select an item from the list, this item would be added to the textbox. If the user wo...

Max element count in WPF application for performance

Hi, In a WPF line of business application, at which point should I consider that the count of Elements, as seen in snoop, will noticebly hit performance. In Advanced WPF Application Performance, the speaker looks at an application with ~6400 elements and says : fairly heavy but not necessarly unusual. On my part I have an application ...

how to bind multiple fields to same column in ListView/GridView?

hello, in a GridView column i need to display a string composed from a set of fields on my view model. how do i bind multiple fields to same column and how do i specify the format string to use for this column? thanks for any help konstantin ...

WPF threading for monitoring Process.Start and showing progress bar

Hello: I am trying to execute a Process.Start() that is a long running process, and show a circular progress bar on the screen while the process is executing. I have the following lines of code: Process p = Process.Start(longRunningProcess); // show the circular progress bar; ShowHideCirProgBar(true); // wait till the p...

wpf problem with setting focus

Hi I'm not able to set focus on parent of control. I have a control which is placed on canvas. If I click that control I need to set focus on canvas in order to handle some keyboard events. However despite the fact that I was trying to set focus like that protected override void OnPreviewMouseDown(MouseButtonEventArgs e) { ...

How to write ListViewItem that contain image , text and button ?

I need to write some listViewItem ( using WPF ) - that contain image, text and button. I want to inherit from the simple listViewItem class and add to the listview item that contain the three items ( image, text, button ). I don't understand how the listView control will arrange the 3 items ( image , text, button ) in the right order...

WPF Popup UI showing black

I am using a WPF Popup control, and it is showing the background as black. I put a StackPanel inside it with Background="Transparent", but that does not help. <Popup PlacementTarget="{Binding ElementName=parentStackPanel}" Placement="Center" IsOpen="False" Name="m_popWaitNotifier" PopupAnimation="None" AllowsTransparency="False"> ...

WPF DataGriod has RowEditEnding but no RowEditEnded

Hi, I've bound an ObservableCollection to a DataGrid. When I change values in the DataGrid, the RowEditEnding event is raised. But the e.Row.Item is the object before editing, so you don't see the new values. I understand that because of the EditEnding. In Silverlight you have an EditEnded event, how can I get the object with the new va...