binding

TextBlock Databinding

Hi When I run following code textblock is not changing. My guess is databinding is missing either in code or XMAL. XAML <Window.Resources> <ObjectDataProvider x:Key="PersonObj" ObjectType="{x:Type local:Person}" MethodName="GetFirstName" /> </Window.Resources> <Grid> <!--<TextBlock Margin="26,7,12,...

Understanding WPF data binding scope

I have a custom control embedded within a TabItem of the TabControl. TabControl is Content of main Usercontrol as follows: <UserControl x:Class="ControlsLibrary.wpf.Alerts.UserControl1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Height="300" Width...

ObservableCollection<T> binding through MVVM doesn't update the view

Hello, I have the following simplified ViewModel public class UserViewModel : IUserViewModel { public DelegateCommand<object> NewUser { get; private set; } public ObservableCollection<UserInfo> UserList { get; set; } public UserViewModel( ) { NewUser = new DelegateCommand<object>( OnNewUser ); this.UserLi...

How to access bound resource after sorting gridview WPF

Hi I am binding an observable collection to my gridview. public ObservableCollection<LibraryTrack> Biblio { get { return _Biblio; } } The gridview only contains the necessary values for the user to see. The secondary information like filelocation and file id isn't bound to the gridview, this info is in this case useless for ...

MVC Model Binding Limitation

I have a question regarding Model Binding in MVC Say I have a simple POCO like below. public class Person { public Title Title { get; set; } public string FirstName { get; set; } public string LastName { get; set; } public bool LeadPassenger { get; set; } } I have a controller that passes a collection of Persons to a ...

Bind WPF menu control to xml.

Hi, I have a WPF menu control. I am using MVVM model. I have an XMLDataProvider in resource file. Can I bind it to an XML file (similar to asp.net 2.0) ? Thanks in advance !!! ...

WPF. Find control that binds to specific property.

Any ideas on how to implement a method that given a propertyname, finds a control (perhaps from a visualtree) which is bound to the given property? ...

Silverlight binding in a DataGridRowGroupHeader doesn't update when DataSource changes

I have a Binding in a inline style for the DataGridRowGroupHeader like this. <sdk:DataGrid.RowGroupHeaderStyles> <Style TargetType="sdk:DataGridRowGroupHeader"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="sdk:DataGridRowGroupHeader"> <TextBlock Margin...

Special closure use-cases: Why do closures reference variables and not just values?

Update I am designing an experimental programming language and the question is wether to include closures or just use first-class-functions. To decide this i need realistic use-cases/examples that show the benefit of closures over first-class-functions. I know that you can achieve everything that you can achieve with one of the two with...

Do not add a event click

When you add a Click event throws System.NullReferenceException. <ListBox DockPanel.Dock="Top" DataContext="{Binding idPerson, Converter={StaticResource ConvertTrainersFromClientsKey}}" ItemsSource="{Binding}" > <ListBox.ItemTemplate> <DataTemplate> <DockPanel> <Button Content="{Binding name_trainer}" Tag="{Binding idPersonTra...

Binding evaluation after UI is visible.

Hi All, Here is my scenario. I have usercontrol, uc1. In uc1 i have listbox on which ItemTemplateSelector is defined and it is pointing to different DataTemplates having other usercontrols eg. uc2, uc3 etc... Items in listbox are getting updated when UI is visible. I mean, I can see for eg. in a list box item first arrow comes up, th...

How to fix the WCF maxClockSkew problem in a HTTPS Silverlight application context?

Situation: Silverlight 4 app communicating with a server component through WCF, using basicHttpBinding and HTTPS. Here is the binding used server side: <basicHttpBinding> <binding name="DefaultSecuredBinding" maxReceivedMessageSize="2147483647" maxBufferSize="2147483647"> <readerQuotas maxDepth="50" maxArrayLength="2147483647" ma...

Format Date in Bind Statement inside a ListView

Hi, is there a way that I can format a Date binded in a ListView? I have this snippet of ListView <ListView ID="lvView" runat="server"> <ItemTemplate> //... some bounded data <asp:Label ID="lblDate" runat="server" Text='<%# Bind("RequiredDate") %>' /> //... another bounded data </ItemTemplate> </ListView...

Struts 2 dynamic parameter binding

The default stack has the parms interceptor who binds the parameters to the setters found in the action who is being invoked. That works fine when you know the name of the parameter. For example if a request parameter is "employee.name" that could be binded to a property of my action which has a property "employee" with a property "name"...

Refresh problem for combobox

I have a combox box which is bind with dependencyproperty My itemsource is bind to arraylist of string and the selectedValue to a string I want to modify the combobox context by code The first one is it OK but as i click in my comboxbox and after i want to change her contains it doesn' work My xmal <ComboBox Name="ComboCateg3" Sele...

WPF - How to reuse listbox for display of different lists of objects?

Hey all, I have a ListBox which I am using to display the results of various searches. Those searches can occur on many different types of objects and I'm having a bit of trouble getting it to work in all circumstances. Most of the time I can just set ListBox.ItemSource = List and it's works fine if I also set the DisplayMemberPath an...

Attach/bind the same set of commands to multiple controls

I have a Control inside a Canvas and I want to be able to move it using the arrow keys. For the sake of trying things out, I created the following class, which does what I want. <Window x:Class="DiagramDesigner.CanvasControlArrowKeyTest" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://sc...

Binding Lua to Ada in win32 (xp,vista,etc.)?

There is only one public library for binding Lua to Ada I have found (http://coreland.ath.cx/code/lua-ada), but how can it be used on a Windows platform? What do I need to use in my ada-project to get lua.ads.adb libraries defined in project-files working properly? I tried to put lua sources in my ada-project directory befory compiling ...

For a user control, how to set the binding of a item template item to a user property?

I have a simple user control, which is essentially just an AutoCompleteBox with some custom logic. For a specific instance (a collection of Persons), I want it to look like this: <sdk:AutoCompleteBox Name="myACB" ItemsSource="{Binding People}" FilterMode="StartsWith" MinimumPrefixLength="2" ValueMemberBinding={Binding LastName}> <sdk...

GWT Deferred Binding for loding only required classes in catch

Dear All, We have product, who's front end is in GWT. As it contains many classes (Around 150 menus, you can imagine now) When user access this first time, it takes time to load. (If bandwidth is low then this increases) next time on wards it remains in catch, we dont have to worry about bandwidth. Can i reduce this first ti...