Java key links using Groovy Swing Builder

I am trying to write in Groovy application, using "Calculator like" keys functionality. So I would like swing action to be invoked, when I: press JButton press corresponding keyboard key, no matther whether there is focus on JButton or not. Prob

How to link a property to a false value

I would like to bind the IsEnabled property of a ComboBox to the IsChecked property of a checkbox, while I want the ComboBox to be ENABLED only when the checkbox value is FALSE. IsEnabled="{Binding ElementName=RegexCbx, Path=IsChecked}" What's t

MVVM ViewModel and Property Type (PresentationCore.dll)

Can we use classes from the assemblies targeted for UI /UI framework in my ViewModel? Today I had a discussion over a question where one person is very persistent about that classes from PresentationCore.dll can't be used in a ViewModel.(seems like h

ListControl.DataSource in ToolStipControlHost not function

I use a ToolStripControlHost to wrap a ListBox control for adding it into a ToolStripDropDown, but found items I assign to ListBox.DataSource not shown up, and ComboBox.DataSource not work as well, I don't understand why ListContorl.DataSource not fu

Binding problem - Value not updated on View

What i am trying to achieve is, when the check box is checked, the textbox will display True, when the checkbox is unchecked, text box will display False. The issue at the moment is that initially it works, the box will be checked, and textbox will d

Connect the datagrid to viewmodel

What am I doing wrong in the mvvm pattern below wrt data-binding? What I see is a DataGrid showing an extra column and an extra row (both empty), why is that? And: how must I proceed to get my view to select the first item by default? view-model: pub

WPF Linking the image source from the project resources

Ok i have in my project Resources about 5 Images. What i want to do is to Bind an Image.Source from my Project Resources. Im C# code its pretty easy, i just do : ImageHolder.Source = Propetries.Resources.Image1.png. How can this be done in XAML? Some

Connect the key in TextBox (MVVM)

Have a little problem with hooking up the keydown event without codebehind! So, we have the combobox <ComboBox Height="20" Width="auto" ItemsSource="{Binding AlignComboItems}" SelectedValue="{Binding SelectedComboItem

WPF Relating DataTable Row Column to Text Box

NARROWED DOWN SOLUTION I'm much closer, but don't know how to apply XAML to change datacontext value. Please review context of original question below as may be needed. My issue is that I have a ViewModel class as the datacontext to a window. On this

Validation bind on first load

I'm still struggling with validation in WPF. I've got a custom validation rule which requires text to appear in a textbox i.e. it enforces a mandatory field constraint. <TextBox local:Masking.Mask="^[a-zA-Z0-9]*$" x:Name="CameraIdCodeTex

Observe Collection (Bind To Datagid) - Error Threading

I have the following setup: public class Monitor { public ObservableCollection<People> listOfPeople = new ObservableCollection<People>(); public dosomework() { Thread t = new ThreadStart(longwork); t.Start(); } public longwork() { listOfPeople

How to delete SLF4J Warning about multiple connections?

My java project has dependencies with different SLF4J versions. How do I suppress the annoying warnings? SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [jar:file:xyz234/lib/slf4j- log4j12-1.5.8.jar!/org/slf4j/impl/StaticL

Link does not update

I have class deriving from TextBox to which I attach a dependency property of type point called position and in its set section I set the Canvas.Top and Canvas.Left property. Just to clarify, whenever the source property changes it calls the set sect

WPF Listbox commands

Ok, my program in a nutshell has a list of customers. Those customers are all listed in a listbox so when one is clicked on all of their information appears on the form. This works through databinding, all of the controls on the page are bound to the

WPF Binding Error Datagrid Converter SelectedItems

I seem to be getting a binding error with a binding of the SelectedItems collection on a datgrid to a generic list in my ViewModel. <DataGrid ItemsSource="{Binding Path=ListOfObjects}" SelectionMode="Extended" SelectionUnit="Fu

ItemsControl shows only the first item

I suspect the answer to my problem is pretty simple but I have had a good look around the forum and can't seem to find anything quite the same. I have a reasonably complex binding structure with a ItemsControl at the far end but it only shows the fir

Linking an IP address works just for the first time

I want to make a web request from one of available IP addresses on server so I use this class: public class UseIP { public string IP { get; private set; } public UseIP(string IP) { this.IP = IP; } public HttpWebRequest CreateWebRequest(Uri uri) { Ser

Link to ActualHeight of Item ItemsControl

I have two separate ItemsControls that appear side by side. The ItemsControls bind to the same ItemsSource, but they display the data differently. Each item displayed on the left will most likely be smaller than the same item on the right. This cause

Unable to get property value when using styles

I have a custom control that I apply the template to. Inside custom control I have defined properties that are binded to the templated control inside the style. If I'm subscribed to the Loaded event and trying to get the properties they are null. If

Edit mode WPF ObservableCollection

I am using observable collections all around my applications. My problem is that when i use a popup window for editing those entities, my bound lists are getting changed when the user changes those corresponding fields in the window. How could i simp

WinForms binding

I have some controls bound to a BindingSource control. I want to do a calculation when the value changes in one control and set the result on another control. Do I update the textbox the property is bound to or do I update the underlying entity which

WPF - Connect in XAML to an object created in the code behind

Can an object created in the code (ie C#) be used for binding in the XAML? For example: public class MyForm { private MyComplexObject complexObject; public MyForm() { InitializeComponent(); } public OnButtonClick(object sender, RoutedEventArgs e) { c