WPF Attach VisualState to the Object Property

I am working on expression Blend for VS2015, I have aListBox binded to an ObservableCollection of custom objects. Those objects expose Properties that arise the NotifyPropertyChanged, and everything works nice. I can bind parts if the ItemTemplate to

How to disable the Expander extension based on a property

I am having an issue with telerik expander IsExpanded bit Scenario - I want if the bound property is False, user should not be able to expand the expander and if the expander was Expanded it should close it self. Implementation - I made a simple styl

Scroll to the first item in the list in the view

I maintain a legacy application and have a request to add a feature.I have a listbox showing some items. When the Itemssource is changed, I want the listbox to scroll to the top. To do this I have subscriped to the event: private bool handlerAdded =

How to set the busy cursor for slow WPF controls

There appears to be a lot of resources on showing the busy cursor. But all the solutions I've managed to find relies on setting the cursor via the view model. (i.e, IsBusy property, disposable WaitCursor). These methods work well when I know when my

Playing Windows system sounds with System.Media.SoundPlayer

Is it possible that the System.Media.SoundPlayer can not play Windows System Sounds found in c:\Windows\Media?? I have the code: using (var soundPlayer = new SoundPlayer(@"c:\Windows\Media\Landscape\Windows Notify.wav")) { soundPlayer.Play(); }

CefSharp problem in Windows7

I am working on an WPF-application where I am using CefSharp as webbrowser. I have integrated it successfully in my application, but its only working in Windows 8. I am using Visual Studio 2010 and CefSharp 1.25.0.Try again with CefSharp 1.25.5, and

WPF data binding does not work

I've read the online document about data binding but still couldn't make it work. I simply want to understand data binding and do things the way it should. Here is my code in my UI.xaml.cs namespace mynamespace { class Customer { private string _name

Build an error summary in WPF

My form is bound to an object that implements IDataErrorInfo and it validates correctly on a field by field basis. I would like to have some way to summarize the results based on the fields on the form, and not the Error property of IDataErrorInfo. I

WPF MVVM New Editable Combobox Value Is Null

Tried all the solutions for similar issues around here, still no go. I have a ComboBox that should work for selection of existing items and/or for adding new ones. Only the selected item part works. Category is just an object with a Name and Id. Than

Determining the CustomPopupPlacement used for WPF Popup

Am trying to figure out which of the passed in array of CustomPopupPlacement positions have been used when the popup actually renders. Is there any event to detect this? This msdn thread from 2009 seems to be exactly my issue however there does not s

wpf merge multiple styles into one style

I have a UserControl that consists of a listview it looks like: <UserControl .... <UserControl.Resources> <Style TargetType="Thumb"> <!-- Style Content --> </Style> <Style TargetType="GridViewColumnHeader"

Separate code in DLL away from exe

We update our WPF app multiple times a week, this is a pain point as Customers are repeatedly asked to let the exe through their firewall. To get around this, I will try taking most of the code (including xaml) out of the exe, so the exe never change

How to analyze and shift the data output

I have a question. How would I build a method (dataCapture()) to collect the data I output from a PowerShell command within my application, and then parse the data and decipher the comma delimitation so it can input the data using the Oledb into Exce

Multicolumn user control autosearch in wpf

I need to create an Auto search control which will show the results as rows as this one http://www.devexpress.com/Products/NET/Controls/WPF/Editors/lookup-editor.xml. However, I dont need the graphics and checkboxes here. A simple listview like appea

More DispatcherTimers in an application

I have an application behaving like autorefresh. It checks emails, new videos, jokes, etc. My client wants these single elements check in different intervals. For example emails every minute, videos every hour, etc. So there should be option for him

add programmatically add items from the resource dictionary

I'm just new in wpf and am planning to use a listbox to generate recently opened or closed items. Everytime a file is opened, it gets added permanently added into a resource dictionary of type listbox item. On the other hand, besides the listbox item

Field Selection in WPF Designer - No drop-down list?

Coming from a WinForms background, I'm a little surprised to see that most (if not all) of the field-related properties for things like ItemsControls in WPF lack any sort of dropdown list for selecting fields. For example, when using a ComboBox, if I

wpf scrollviewer scrolltoverticaloffset

The events scrolltoVerticalOffset or the scrolltoHorizontalOffset do not change the values of the scrollviewer. Please tell me at which event does the values HorizontalOffset and the VerticalOffset get changed? I have tried LayoutUpdated() method but

ColumnDefinition MinWidth does not work correctly

I'm using a Grid in WPF (xaml) and I'm have some strange effect when using the MinWidth property in a ColumnDefinition. For example, when I use 9 ColumnDefinition and every ColumnDefinition has the 'Width="*"' property and one of the middle colu

C # - Yield gives an unusable type

I have a class and a set of IEnumerables that are using this class to give me a list in a list. (See this question's answer for details.) Here is the code: public IEnumerable<IEnumerable<WorkItemColumn>> EnumerateResultSet(WorkItemCollection q

WPF data link performance

I am building an wpf app using MVVM. I have viewModels the employ lazy loading like below: public class AssignmentsViewModel { List<AssignmentViewModel> _Assignments; public List<AssignmentViewModel> Assignments { get { if (_Assignments == nul

WPF - Dynamic tooltip

I have a class ToolTipProvider which has a method string GetToolTip(UIElement element) which will return a specific tooltip for the UIElement specified, based on various factors including properties of the UIElement itself and also looking up into do