wpf

Inheriting System.Windows.Controls.Panel

I use the Panel to provide custom layout of UIElements. For this, I override MeasureOverride and ArrangeOverride. In ArrangeOverride proper locations are given to Children. In my application, there is a bunch of rather heavy (by number of visuals) children inside the panel, but only 2 of them are located inside the visible region at a t...

Adding a button to a combobox in wpf

Pretty much I have an Editable Combobox and I want to add a button to the right of the drop down button which clears the selected item. So... |TextBox |X|v| I was thinking something like... <Style...> <Setter Property="Template"> <Setter.Value> <ControlTemplate> <ControlTemplate.Resources> ...

RelayCommand sender from ItemsControl item

I've been using MVVM's RelayCommand with success to bind actions to XAML, but I'm having a small problem with my ItemsControl. <ItemsControl ItemsSource="{Binding Devices}" > <ItemsControl.ItemTemplate> <DataTemplate> <Grid Width="100" Margin="4" > <Button Command="{Binding Pat...

Equivalent of Path.BitmapEffect in Silverlight

Hi, While I copied the XAML code from a WPF Pageto my SilverlightPage I found out that few of the prpoorties are not supported in Silverlight , mentioned bwlow: <Path.BitmapEffect> <BlurBitmapEffect Radius="2"/> </Path.BitmapEffect ClipToBounds="False" SnapsToDevicePixels="False" Can any one please help with the Silverlight Equi...

How to listen changes in Observable collection in WPF?

I have user control in which I have placed a Listview and Richtext box control. ListView is binded to my custom collection. Below the listview I placed a richtext box in which I want to display my custom text. The custom text is created from the custom collection. I want to recreate the custom text whenever any thing change in my cus...

How to save the IsExpanded state in group headers of a listview

Hi, I have quite a tricky problem: I am using a ListView control with the ItemsSource set to a CollectionViewSource including a PropertyGroupDescription to group the ListView elements. The CollectionViewSource looks like this: <CollectionViewSource x:Key="ListViewObjects"> <CollectionViewSource.Source> <Binding Path="CurrentL...

Adding a textblock to a custom wpf control (piepiece control from codeplex)

Hi Stackoverflow! I'm currently building a Surface application where the main navigation is a circular menu. For each menu item I'm using a custom control that I found on codeproject.com: http://www.codeproject.com/KB/WPF/PieChartDataBinding.aspx (PiePiece control) The number of submenu items (which is also piepiece controls) comes fr...

Validation errors prevent the property setter being called

Hi, I am looking for a simple solution to the following problem: I am using a simple TextBox control with the Text property bound to a property in the code behind. Additionally I am using a validation rule to notify the user of malformed input. ... error display style h...

WPF - Custom sorting logic for groups using CollectionViewSource

I have a list of "stuff" which needs to be filtered then displayed in a grouped and sorted manner. The data needed to calculate the grouping and sorting order is not available as simple properties - there needs to be some work done in code to calculate the order and groups. CollectionViewSource lets me define custom filter and sort logi...

Can I have two different Styles in a CustomControl

Hi, Can we have two different styles in generic.xaml setter template Property Something like: <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="local:customLocalFolderButton"> **<----Style 1---->** </ControlTemplate TargetType="local:customLocalFold...

WPF Listview - Select items outside 'field of view'

Hi there, I'm using a ListView to show Items in a List. The user can select the items himself, or use some 'preselect keys' to select items with specified attributes. To check the items I use something like that: for(int i;i<MyListView.Items.Count;++i) { if( /*... Check if the items should be selected ...*/ ) (MyListView.It...

How to use 2 or more columns with FlowDocumentScrollReader (WPF) ?

Hi, I would like to use at the same time multiple columns and scrollbar with FlowDocument. Is that possible ? Actually, I can only have multiple column in page mode but no scrollbar. Thanks !! ...

Graphics framework choice for Mono compatible application.

I have an application that has some controls that use GDI+, mostly simple stuff with low graphics rendering requirements although I do have a couple of animated GDI+ windows that are borederline usable because of poor GDI+ performance. Moving forward I would like to start using WPF (for performance and to learn WPF) but I also like to k...

Unable to Edit the Style of MediaElement

Hi, I am trying to create a Custom Media Element , but While trying to do so , I am not able create the media Element. ...

Will mdi applications die ?

I'm just curoius, Has mdi applications a bright future ? Edit: I mean mdi applications = free floating child windows (thanks to Guffa) not tabbed-interface application. ...

WPF Theming: not applied to TextBox, why?

Hi there. I must say I am quite new at WPF. I am building my first real application and I am facing some issues, at the moment with themes. This is the reason of my post. In order to use a theme, such as ExpressionDark.xaml, I thought it was sufficient to include it at an application level. Therefore, in my App.xaml I added: <Applicat...

WPF Infragistics gallery issue

I am trying to dynamically add items to the Infragistics WPF gallery (at runtime). First i tried to solve this with data binding, but since it didn't work, I tried something like this: //gallery - the gallery. //group - the group in which i want to add an item. string key = "1234"; group.ItemKeys.Add(key); GalleryItem gi = new Galle...

Keep TabItems in a TabControl from repositioning?

Hi everyone, In WPF, Is there a simple way to stop TabItems in a TabControl from being repositioned when the selected TabItem changes? So that clicking on a TabItem would simply display its contents, but not reposition the TabItems as it usually does (by moving the selected TabItem to the bottom row of tabs if it wasn't there already). ...

What commercial WPF suite is better? Please suggest

Im working on a middle size project, using WPF. Need DataGrid, suitable for the client: fast, customizable, beautiful. Which component suite do you suggest from your practice?(for example Devexpress's, telerik's, Infragistics's and etc) ...

Why do I get a DependencyProperty.UnsetValue when converting a value in a MultiBinding?

I have an extremely simple IMultiValueConverter that simply OR's two values. In the example below, I want to invert the first value using an equally simple boolean inverter. <MultiBinding Converter="{StaticResource multiBoolToVis}"> <Binding Path="ConditionA" Converter="{StaticResource boolInverter}"/> <Binding Path="ConditionB"...