wpf

Control a TabControl with a TreeView?

I'm looking for a way to control which Tab of a TabView is shown based on which item of a TreeView is selected. Does anyone know of a way to do this? ...

WPF and Silverlight dead ?

There is a lot of talk in the twitterverse today that WPF is dead and Silverlight has a bleak future, and that HTML5 is crowned new UI king. One such article here with further links. The problem I have with this, is that's all very well for WEB Dev but what about Windows Applications, what next for us? Do we go back to (or stay with) W...

C# WPF MediaElement Not opening video in XP

Hi everyone. I have a strange problem. I have a project that I have that simply opens up an mp4 video file and plays it. I have an event handler which I set a breakpoint in, and it gets into the Media_Opened handler I have and play it under Windows 7/64bit, but it does not even enter the handler when I play the same thing in WindowsXP ...

WPF using CINCH SelectedItem COMBOBOX

I am using cinch framework v1. I have exposed a public property ( CurrentSuppier )and binded that property to the selecteditem of my combo box .. after I update the , the combobox display doesn't change to the current value of the supplier .. below is some code snippets.. /// <summary> /// Current Supplier Record /// </summary>...

dynamically adding control in async mode

I am using Wpf 4.0. i have a situation where i need to generate dynamic control on a tab control where around 20 tab are generated on run time. These controls are a lots so the control adding process take time around 1 minutes. is there any what to add control asynchronously. thanks ...

WPFToolkit Charting - How to remove markers or change marker size?

Hi, I can't quite see how to remove the markers in a WPFToolkit graph. I can see they are the ellipses in the XAML below, but I can't seem to successfully change any of the parameters to get the size of them to change, OR to remove them. Any ideas? Here is the XAML (which stills need the WPFToolkit) I've been using as a test. <Windo...

How to display selected item / value in twoway binding combobox ?

I have one combobox which have Mode twoway binding. I binded combobox to list of family members(MemberId,MemberType) table. I want to display selected Item (MemberType) from list.. ...

Neead a sample for WPF TreeView search with Virtualization and Load On Demand

Hi, I need to implement search feature in WPF treeview(basically I need to remember the last user selection). I have tried various approches suggested but nothing works as virtualization is enabled in my treeview and child nodes are loaded only when parent node is expanded(lazy loading). Anyone knows of a sample having these three thi...

Stretching the items in a WPF ListView within a ViewBox

Hi, I have a frustrating problem that I would much appreciate some help with. I have a ListView within a ViewBox and I can't get the items within the ListView to stretch horizontally. Here is the XAML: <Window x:Class="WpfApplication3.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://s...

How to know If an element is going to be render out of bounds?

Hello all, I am currently developing a control that shows a "linked label" everytime the user adds a visual item to another UI component. When that happens, I link the label in the control to the item added and by clicking over the label the item in the list will be shown. Well, the problem is that this control can be included in a Fi...

How to stop ComboBox SelectionChange from SelectionChanged Event

Hi, I have a ComboBox which is binded with a List. Consider I have 10 Items in the List, so in the combobox also. Currently 2nd Item is selected in the ComboBox. Now I am selecting the 3rd item in the ComboBox. In the Combobox SelectionChanged event, I am doing some validation and validation fails so I don want my Selection is change...

Refresh CollectionViewSource (Entity Framework) bound control

I can't believe I can't find an answer to this... I've created Entity Framework models generated from DB (SQL Server CE) I dragged an Entity from Data Sources to my MainWindow, automagically creating this XAML: <Window.Resources> <CollectionViewSource x:Key="contentItemsViewSource" d:DesignSource="{d:DesignInstance my:ContentItem, Cre...

ItemsControl "Overflow to Popup"

Hi, I have an ItemsControl that I want to fit into a small space. Typically it will display less than 3 items, however, I would like the it to indicate when it has more items than it can display and have a popup on the indicator to show all items (which will still be aa small amount). The current ItemsContainerPanel is a WrapPanel, wh...

WPF Listview Columnheader Click Event

I have a ListView (GridView) in WPF and I'm trying to implement sorting according to http://msdn.microsoft.com/en-us/library/ms745786.aspx. In my case, the celltemplate for one of the columns contains an Expander. Now when I click the expander header, the GridViewColumnHeader.Click event fires. How do I prevent this from happening? ...

Problem with animated GIF in WPF

Hello I try to show animated GIFs in WPF application using custom classes found at http://stackoverflow.com/questions/210922/how-do-i-get-an-animated-gif-to-work-in-wpf First I used AnimatedImage class, after that - GifImage class. Both classes failed during animation initialization (while resoving Uri to the GIF file, saved as app. res...

Hide control within a WPF User Control Library

Hi, I've a project made from the "WPF User Control Library" Template in Visual Studio. This project contains one main usercontrol plus additional Windows/Usercontrols. How can I "hide" these additional Windows/Usercontrols, so that the user can only import the main usercontrol from the assembly (I wanted to put a screen-shot to illustr...

InvalidCastException when selection changes in a WPF TreeView

To handle the TreeView.SelectedItemChanged event, I have an attached behavior that binds to a command. Ordinarily, the RoutedPropertyChangedEventArgs.NewValue property contains a reference to one of my view-model objects, and I can then pass this on as the argument to ICommand.CanExecute and ICommand.Execute. I'm using RelayCommand from...

Show progress bar when sending pages to the printer (WPF)

Hello, I am creating printouts in WPF using flow documents. These printouts are set in separate window where DocumentViewer is placed. When user clicks print I would like to show a progress bar that informs about current page that is sending to the printer. How can I do this? ...

DataGrid in a StackPanel leads to OutOfMemoryException

I have grid in a WPF window and a DataGrid control inside: <Grid> <DataGrid ItemsSource="{Binding AllAuthors}" /> </Grid> AllAuthors is an ObservableCollection<Author> and Author a simple class with only a few string properties. The collection is populated with around 40000 objects in code behind. The DataGrid opens quite quickly ...

Collapse/expandable columns

I have two tables on a scrollviewer and each table resides in it's own flowdocument and each flowdocument resides in it's own flowdocumentscrollviewer.first table displays header and the bottom/second table displays the contents of a datatable. I am able to disable the vertical scrolling of the header and horizontal scrolling the bottom...