Search Results

Search found 5504 results on 221 pages for 'late binding'.

Page 12/221 | < Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • WPF binding and pointers

    - by Eran
    hey guys, I have a WPF application that contains windows with few user controls and Coordinator object. the window and all its user controls pointing to an object, which instace is in the Coordinator, by thier DataContext. the problem is that I want to change this object (e.g. create new object()) in the Coordinator but I want all the dataContexts to point to the new object. I tried to send the object by ref to the window constructor but it didn't help. any idea about how can I rewrite the memory location that all pointers are pointing to? (I don't want to repalce the properties in object since its a lot of work nor to use a middle object that points to the replaced object) Thanks Eran

    Read the article

  • Value of text box disapears - binding viewmodel to a tab (content control)

    - by Eli Perpinyal
    Based on the MVVM example by Josh Smith, I have implemented the multi tab option which binds to a different tab to a different view model using a simple datatemplate that binds a viewmodel to a view. <DataTemplate DataType="{x:Type fixtureVM:SearchViewModel}"> <SearchVw:SearchView/> </DataTemplate> The issue that I'm having, is when I switch tabs and then switch back again, the value in the textbox disappears. When I bind the Text in the textbox to a value in the ViewModel it does not disappear. This is fine, and I can overcome this but I am having another issue for example with the position of the scroll bar in a grid disappearing once the tab has lost focus. Why is the value disappearing? I'm assuming it is a WPF sub system task that cleans up resources!? how can I avoid this? I also feel it might be slowing down my app.

    Read the article

  • Wpf ListViewItem Background binding to enum

    - by Christian
    Hi Guys I´ve got a ListView which is bound to the ObservableCollection mPersonList. The Class Person got an enum Sex. What i want to do is to set the background of the ListViewItem to green if the person is male and to red if the person is female. Thanks for the answers!

    Read the article

  • WPF Binding Question - Change Label Text based on Modifier Key Control

    - by Chuck Savage
    I have a context menu, that I'd like to change the Header based on whether the Control Key is pressed or not. Right now I have, <MenuItem Header="Send To"> <MenuItem ... /> <MenuItem ... /> </MenuItem> I'd like based on the Control Key being down to be, <MenuItem Header="Move To"> <MenuItem ... /> <MenuItem ... /> </MenuItem> All I really need to do is change the Header text, because inside the code I know how to check for the Modifier key being Control.

    Read the article

  • Runtime binding of XML Schema to Java code

    - by Yaneeve
    Hi all, The situation is thus: I have an application which provides editing capabilities to XML an file. This file follows a certain Schema. The Schema belongs to a subset of Schemas which actually follow a line of evolution from one to another - so they are not so different from one another. The main difference between the schemas is an enumeration of string labels. I now have need to save "meta data" in XML format (This is a second type of XML file). This "meta data" contains a list of labels from the set enumerated in the schema. The application can accept a new schema at runtime and adjust itself. Therefore I have an XML file that must be validated by two schemas one static containing the basic structure of the "meta data" stored in the XML and one which contains the 'proper' label enumeration. The latter schema is determined at runtime. I have glanced over JAXB, XMLBeans and JiBX. I can't figure out what technology to choose that would allow for a runtime bind of code and schema in the way that would most benefit my use-case. Any suggestions? Thanks!

    Read the article

  • problem binding ListBox on ObservableCollection<T>

    - by Fabian
    Hello, I have a strange "problem". Could someone explain me why : If I have in an ObservableCollection, twice (or more time) an item with the same value, then the selections of those values in the ListBox won't work properly ? In fact, what the ListBox is doing when I click on an item(Even in single item selection) : It selects the first item from the ObservableCollection collection with a matching value. so in the case if multiple items with same value are in the collection, then only the first one will be selected !

    Read the article

  • WinForms binding

    - by Anthony
    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 would update the control anyway(i hope)? When i change textbox A...textbox B is updated with the new calculated result..this works fine...but i have noticed that when i Leave textbox A..textbox B reverts back to its original value...what is going on here!

    Read the article

  • Threadsafe binding with DispatcherObject.CheckAccess()

    - by maffe
    Hi, according to this, I can achieve threadsafety with large overhead. I wrote the following class and use it. It works fine. public abstract class BindingBase : DispatcherObject, INotifyPropertyChanged, INotifyPropertyChanging { private string _displayName; private const string NameDisplayName = "DisplayName"; /// /// The display name for the gui element which bound this instance. It can be used for localization. /// public string DisplayName { get { return _displayName; } set { NotifyPropertyChanging(NameDisplayName); _displayName = value; NotifyPropertyChanged(NameDisplayName); } } protected BindingBase() {} protected BindingBase(string displayName) { DisplayName = displayName; } public event PropertyChangedEventHandler PropertyChanged; public event PropertyChangingEventHandler PropertyChanging; protected void NotifyPropertyChanged(string name) { if (PropertyChanged == null) return; if (CheckAccess()) PropertyChanged.Invoke(this, new PropertyChangedEventArgs(name)); else Dispatcher.BeginInvoke(DispatcherPriority.Normal, (Action) (() = NotifyPropertyChanged(name))); } protected void NotifyPropertyChanging(string name) { if (PropertyChanging == null) return; if (CheckAccess()) PropertyChanging.Invoke(this, new PropertyChangingEventArgs(name)); else Dispatcher.BeginInvoke(DispatcherPriority.Normal, (Action) (() = NotifyPropertyChanging(name))); } } So is there a reason, why I've never found something like that? Are there any issues I should be aware off? Regards

    Read the article

  • WPF TreeView binding to a simple object

    - by esse
    I have a simple object as such: public class Info { public string Name {get; set;} public int Count {get; set;} public DateTime TimeStamp {get; set;} } I want to bind a collection of these objects to a WPF TreeView and have the properties on the Info objects show up as sub TreeViewItems, like so: Item 1 Name: Bill Count: 3 TimeStamp: 12/05/2010 09:06:00 AM Item 2 Name: Chris Count: 22 TimeStamp: 11/05/2010 11:34:00 AM Item 3 Name: Toby Count: 1 TimeStamp: 09/05/2010 05:55:00 PM How can I achieve this through XAML?

    Read the article

  • MVVM Binding Password

    - by LnDCobra
    I am re-factoring my application to implement the MVVM design and i came across my first problem... Compiler won't let me bind to the Password property of the PasswordBox control. Anyone have any ideas / suggestions.

    Read the article

  • Silverlight MVVM binding seems not to work

    - by Savvas Sopiadis
    Hi everybody! Building my first SL MVVM application (Silverlight4 RC) and have some issues i don't understand. Having a WPF background i don't know what is going on here: ViewModel has several properties, in which one is called SelectedRecord. This is a get only property and is defined like this: public Culture SelectedRecord { get { return culturesView.View.CurrentItem as Culture; } } As you can see it is gets the current value of a CollectionViewSource (called culturesView). So if i select a Culture, the SelectedRecord (gets a value directly from within the CollectionViewSource) as expected. (Actually there is a datagrid control bound to the CollectionViewSource, hence it is possible to change the selected item) OK. Now to the View . There are several views which access this ViewModel and in particular there is one which shows the values of the aforementioned property SelectedRecord (let's call it the EditView). To show this EditView there is a button (which has its Command property bound to an ICommand in the ViewModel) which functions (the first time) as expected. This means: 1st try : i select a record, switch to EditView, outcome: selected record values are shown (as expected!!). 2nd try: switch back to datagrid, select another record, switch to EditView, outcome: the values of the previous shown record are shown again!!! WHY?? First i thought that the SelectedRecord has not the correct value set, but i was mistaken: it HAS the correct value! So it should be shown!? What am i missing? In WPF this would work!! Thanks in advance

    Read the article

  • Refreshing a binding that uses a value converter

    - by Hadi Eskandari
    I have a WPF UI that is bound to an object. I'm using a ValueConverter to convert a property to a specific image by a business rule: public class ProposalStateImageConverter : IValueConverter { public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { var proposal = value as Proposal; var basePath = "pack://application:,,,/ePub.Content;component/Images/General/Flag_{0}.png"; string imagePath; if(proposal.Invoice != null) { imagePath = string.Format(basePath, "Good"); } else { imagePath = string.Format(basePath, "Warning"); } var uri = new Uri(imagePath); var src = uri.GetImageSource(); //Extention method return src; } } It is working fine, but later, when the object's state changes, I want to refresh the image and make the value converter reevaluate. How is this possible?

    Read the article

  • WPF Binding Between Controls

    - by David Ward
    I have a control on a page that contains a listbox. I also have another control which is a detail view. Both of the controls have their own ViewModel which their child controls bind to. Image Outlook. It has a list of folders and when you select a folder the detail control displays the contents of the folder. How can I bind the detail control to the selected item in the list control?

    Read the article

  • Binding dont refresh, even when explicitly calling UpdateTarget

    - by Erik
    My ListView does not refresh its bindings when i call OnPropertyChanged. I have tried to force it to refresh by: NestedArguments.GetBindingExpression(ItemsControl.ItemsSourceProperty).UpdateTarget(); But still, no luck! YES, it does get updated. I have set a breakpoint and checked. What is going on? Other bindings seem to work without a problem

    Read the article

  • Binding key/value pairs loaded from xml

    - by Hichem
    I want to load key/values configuration pairs stored in XML file. To bind a collection of data i know i need to use the ArrayList class, but the problem is that i want to be able to bind the loaded values using their corresponding keys and not by their indexes in the ArrayList object. For example i want to be able to do this : <mx:Text id="errorText" text="{Config.params['someKey']}" /> instead of : <mx:Text id="errorText" text="{Config.params[0]}" /> where Config.params is ArrayList (obviously i couldn't use ArrayList since it doesn't allow selecting a value by key) So the question is how to bind the key/value pairs loaded form XML. I don't want to go manually set variables, i want to bind them so when they are loaded the are set automatically. Did anyone had to do something like that ?

    Read the article

  • reactivating or binding a hover function in jquery??

    - by mathiregister
    hi guys, with the following three lines: $( ".thumb" ).bind( "mousedown", function() { $('.thumb').not(this).unbind('mouseenter mouseleave'); }); i'm unbinding this hover-function: $(".thumb").hover( function () { $(this).not('.text, .file, .video, .audio').stop().animate({"height": full}, "fast"); $(this).css('z-index', z); z++; }, function () { $(this).stop().animate({"height": small}, "fast"); } ); i wonder how i can re-bind the exact same hover function again on mouseup? the follwoing three lines arent't working! $( ".thumb" ).bind( "mouseup", function() { $('.thumb').bind('mouseenter mouseleave'); }); to get what i wanna do here's a small explanation. I want to kind of deactivate the hover function for ALL .thumbs-elements when i click on one. So all (but not this) should not have the hover function assigned while i'm clicking on an object. If i release the mouse again, the hover function should work again like before. Is that even possible to do? thank you for your help!

    Read the article

  • Model-binding an object from the repository by several keys

    - by Anton
    Suppose the following route: {region}/{storehouse}/{controller}/{action} These two parameters region and storehouse altogether identify a single entity - a Storehouse. Thus, a bunch of controllers are being called in the context of some storehouse. And I'd like to write actions like this: public ActionResult SomeAction(Storehouse storehouse, ...) Here I can read your thoughts: "Write custom model binder, man". I do. However, the question is How to avoid magic strings within custom model binder? Here is my current code: public class StorehouseModelBinder : IModelBinder { readonly IStorehouseRepository repository; public StorehouseModelBinder(IStorehouseRepository repository) { this.repository = repository; } public object BindModel(ControllerContext controllerContext, ModelBindingContext bindingContext) { var region = bindingContext.ValueProvider.GetValue("region").AttemptedValue; var storehouse = bindingContext.ValueProvider.GetValue("storehouse").AttemptedValue; return repository.GetByKey(region, storehouse); } } If there was a single key, bindingContext.ModelName could be used... Probably, there is another way to supply all the actions with a Storehouse object, i.e. declaring it as a property of the controller and populating it in the Controller.Initialize.

    Read the article

  • Jquery binding event on selected class

    - by Andrew
    Is it achievable in jquery to bind an event to a group of control that has certain class? It seems to me, it can't. I google a bit and all that came up are nothing to do with events. Here's how my code looks - $('.numonly').bind('keypress',function(event){ if (event.which > 31 && (event.which < 48 || event.which > 57)) return false; });

    Read the article

  • Simple Binding question, unable to bind to button command in a DataTemplate using MVVM Light Toolkit

    - by deliberative assembly
    I've been attempting to bind to buttons within a DataTemplate without much success. The button does not fire. Button Click works successfully outside of the DataTemplate. Yet if I create a Click="button_click" the click button is fired. The Button Content binds perfectly as well. Example to illustrate.. Why does the command not fire? Advice on how this should be handled this? The example is a simplified version of my real problem, I am currently not using a Listbox. I only recreated the same problem with a listbox..

    Read the article

  • Binding JBoss to IP Address

    - by Anand
    Hi, I am running a JBoss instance on a linux server I am using the ./run.sh -b This is not working what could be the reason. I am unable to share the error message details as of now will post it when I can, till then any alternatives or solutions ?

    Read the article

< Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >